diff --git a/.travis.yml b/.travis.yml index 3991bc22a1..d8780a278f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,9 @@ matrix: - rvm: 2.3.0 env: LATEST_RUNTIME=true before_install: + - gem install bundler -v 1.14.1 - if [ "$LATEST_RUNTIME" == "true" ] ; then ./scripts/latest_runtime.sh ; fi script: - - gem install bundler - if [ "$INTEG_RECORDED" == "true" ] ; then bundle install --gemfile=Gemfile && bundle exec rake arm:spec ; fi - bundle exec rake arm:build - unset BUNDLE_GEMFILE diff --git a/ARM_VERSION b/ARM_VERSION index 142464bf22..0548fb4e9b 100644 --- a/ARM_VERSION +++ b/ARM_VERSION @@ -1 +1 @@ -0.11.0 \ No newline at end of file +0.14.0 \ No newline at end of file diff --git a/ChangeLog.md b/ChangeLog.md index 94daa9d215..2a8b07db0a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,52 @@ +## 2017.10.09 - Azure ARM version 0.14.0 + +* Regened all azure_mgmt_* sdks using [Autorest.2.0.4147](https://www.npmjs.com/package/autorest)(core) and [Autorest.Ruby.2.0.15](https://www.npmjs.com/package/@microsoft.azure/autorest.ruby) for release of ARM version 0.14.0 +* Added new gems: + - [azure_mgmt_automation](https://rubygems.org/gems/azure_mgmt_automation) + - [azure_mgmt_billing](https://rubygems.org/gems/azure_mgmt_billing) + - [azure_mgmt_consumption](https://rubygems.org/gems/azure_mgmt_consumption) + - [azure_mgmt_container_instance](https://rubygems.org/gems/azure_mgmt_container_instance) + - [azure_mgmt_customer_insights](https://rubygems.org/gems/azure_mgmt_customer_insights) + - [azure_mgmt_event_grid](https://rubygems.org/gems/azure_mgmt_event_grid) + - [azure_mgmt_links](https://rubygems.org/gems/azure_mgmt_links) + - [azure_mgmt_managed_applications](https://rubygems.org/gems/azure_mgmt_managed_applications) + - [azure_mgmt_marketplace_ordering](https://rubygems.org/gems/azure_mgmt_marketplace_ordering) + - [azure_mgmt_operational_insights](https://rubygems.org/gems/azure_mgmt_operational_insights) + - [azure_mgmt_recovery_services_site_recovery](https://rubygems.org/gems/azure_mgmt_recovery_services_site_recovery) + - [azure_mgmt_relay](https://rubygems.org/gems/azure_mgmt_relay) + - [azure_mgmt_resources_management](https://rubygems.org/gems/azure_mgmt_resources_management) + - [azure_mgmt_service_fabric](https://rubygems.org/gems/azure_mgmt_service_fabric) + - [azure_mgmt_stor_simple8000_series](https://rubygems.org/gems/azure_mgmt_stor_simple8000_series) + +## 2017.09.28 - Azure Container Registry version 0.13.0 +* Released [azure_mgmt_container_registry](https://rubygems.org/gems/azure_mgmt_container_registry) version 0.13.0. Refer [PR# 1007](https://github.com/Azure/azure-sdk-for-ruby/pull/1007) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/65a45deed027ed8e428b18e7a6da8ea83bc68f21/specification/containerregistry/resource-manager/readme.md) for further details. + +## 2017.09.27 - Azure ARM version 0.13.0 + +* Regened all azure_mgmt_* sdks using [Autorest.2.0.4144](https://www.npmjs.com/package/autorest)(core) and [Autorest.Ruby.2.0.15](https://www.npmjs.com/package/@microsoft.azure/autorest.ruby) for release of ARM version 0.13.0 +* Updated [azure_mgmt_cognitive_services](https://rubygems.org/gems/azure_mgmt_cognitive_services) operations Update, Delete, GetProperties, ListKeys, RegenerateKey & ListSkus from CognitiveServiceAccounts group to Accounts group. Refer [PR #989](https://github.com/Azure/azure-sdk-for-ruby/pull/989) and [PR #1707](https://github.com/Azure/azure-rest-api-specs/pull/1707) for further details. +* Updated [azure_mgmt_compute](https://rubygems.org/gems/azure_mgmt_compute) with Availabilty zones, Vmss rolling upgrade, Vmss patch and Vm instance view APIs. Refer [PR #999](https://github.com/Azure/azure-sdk-for-ruby/pull/999) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/0c2a12b50d8598f68d6715b507f7dd53e163407e/specification/compute/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_event_hub](https://rubygems.org/gems/azure_mgmt_event_hub) with new APIs related to disaster recovery. Refer [PR #1000](https://github.com/Azure/azure-sdk-for-ruby/pull/1000) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/acdca6054048e17353095a02989e4567f699b05f/specification/eventhub/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_graph](https://rubygems.org/gems/azure_mgmt_graph) models User, UserUpdateParameters, UserCreateParameters with new attributes. Refer [PR #992](https://github.com/Azure/azure-sdk-for-ruby/pull/992) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/143dbb7c39a63afbb81740f89407a2e4d2f55d0e/specification/graphrbac/data-plane/readme.md) for further details. +* Updated [azure_mgmt_media_services](https://rubygems.org/gems/azure_mgmt_media_services) model CheckNameAvailabilityOutput, the serialized names: NameAvailable, Reason & Message have been changed to nameAvailable, reason & message respectively. Refer [PR #974](https://github.com/Azure/azure-sdk-for-ruby/pull/974) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/b88ba52c9becb9ad2f7f83d8da6610119327dfc3/specification/mediaservices/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_monitor](https://rubygems.org/gems/azure_mgmt_monitor): + * ServiceDiagnosticSettingsOperations has been changed to DiagnosticSettingsOperations + * ServiceDiagnosticSettingsResource has been changed to DiagnosticSettingsResource + * ServiceDiagnosticSettingsResourcePatch has been removed. Refer [PR #979](https://github.com/Azure/azure-sdk-for-ruby/pull/979) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/97e69db426af23a0cdfde5e5df748565ff1070b8/specification/monitor/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_network](https://rubygems.org/gems/azure_mgmt_network) to latest API version 2017-09-01 and includes Availability zone feature. Refer latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/1a88e3f49b78c6ec74f9174115e5233cb6fe20c4/specification/network/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_service_bus](https://rubygems.org/gems/azure_mgmt_service_bus) with new APIs related to disaster recovery. Refer [PR #1001](https://github.com/Azure/azure-sdk-for-ruby/pull/1001) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/072a4331fe088b4ca0d72534ba89078c87ce1000/specification/servicebus/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_storage](https://rubygems.org/gems/azure_mgmt_storage) operation SKU to Sku. Refer [PR #965](https://github.com/Azure/azure-sdk-for-ruby/pull/965) and latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/87c3a2d9559462a39543c7d630b936c521fafbca/specification/storage/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_traffic_manager](https://rubygems.org/gems/azure_mgmt_traffic_manager) with new features related to RealUserMetricsKey and HeatMap.Refer latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/4e092c07e412fb2007ef5cfe4daaaf8a75d95729/specification/trafficmanager/resource-manager/readme.md) for further details. +* Updated [azure_mgmt_web](https://rubygems.org/gems/azure_mgmt_web) with several new changes. Refer latest [specification](https://github.com/Azure/azure-rest-api-specs/blob/5a2e2ed0fe36ca88c6abd339523b23a6280240e6/specification/web/resource-manager/readme.md) for further details. +* Updated [azure_sdk](https://rubygems.org/gems/azure_sdk) dependency with [azure-storage](https://rubygems.org/gems/azure-storage) version 0.13.0.preview. + +## 2017.09.11 - Azure ARM version 0.12.0 + +* Regened all azure_mgmt_* sdks using [AutoRest 1.9.3](https://www.npmjs.com/package/@microsoft.azure/autorest.ruby) for release of ARM version 0.12.0 +* Updated all azure_mgmt_* sdks to use [ms_rest_azure version 0.9.0](https://rubygems.org/gems/ms_rest_azure/versions/0.9.0) to include MSI based authentication +* **Skipped** generation of `azure_mgmt_traffic_manager` due to https://github.com/Azure/autorest.ruby/pull/7 +* **Skipped** generation of `azure_mgmt_web` due to https://github.com/Azure/azure-sdk-for-ruby/issues/957 + ## 2017.07.19 - Azure ARM version 0.11.0 * Regened all azure_mgmt_* sdks using [AutoRest.1.2.2.0](https://github.com/Azure/autorest/tree/v1.2.2) for release of ARM version 0.11.0 diff --git a/Gemfile b/Gemfile index 4d0b622686..bd9aaaf75c 100644 --- a/Gemfile +++ b/Gemfile @@ -14,39 +14,55 @@ end gem 'azure_mgmt_analysis_services', path: 'management/azure_mgmt_analysis_services' gem 'azure_mgmt_authorization', path: 'management/azure_mgmt_authorization' +gem 'azure_mgmt_automation', path: 'management/azure_mgmt_automation' gem 'azure_mgmt_batch', path: 'management/azure_mgmt_batch' +gem 'azure_mgmt_billing', path: 'management/azure_mgmt_billing' gem 'azure_mgmt_cdn', path: 'management/azure_mgmt_cdn' gem 'azure_mgmt_cognitive_services', path: 'management/azure_mgmt_cognitive_services' gem 'azure_mgmt_commerce', path: 'management/azure_mgmt_commerce' gem 'azure_mgmt_compute', path: 'management/azure_mgmt_compute' +gem 'azure_mgmt_consumption', path: 'management/azure_mgmt_consumption' +gem 'azure_mgmt_container_instance', path: 'management/azure_mgmt_container_instance' +gem 'azure_mgmt_container_registry', path: 'management/azure_mgmt_container_registry' +gem 'azure_mgmt_customer_insights', path: 'management/azure_mgmt_customer_insights' gem 'azure_mgmt_datalake_analytics', path: 'management/azure_mgmt_datalake_analytics' gem 'azure_mgmt_datalake_store', path: 'management/azure_mgmt_datalake_store' gem 'azure_mgmt_devtestlabs', path: 'management/azure_mgmt_devtestlabs' gem 'azure_mgmt_dns', path: 'management/azure_mgmt_dns' +gem 'azure_mgmt_event_grid', path: 'management/azure_mgmt_event_grid' gem 'azure_mgmt_event_hub', path: 'management/azure_mgmt_event_hub' gem 'azure_mgmt_features', path: 'management/azure_mgmt_features' gem 'azure_mgmt_graph', path: 'management/azure_mgmt_graph' gem 'azure_mgmt_monitor', path: 'management/azure_mgmt_monitor' gem 'azure_mgmt_iot_hub', path: 'management/azure_mgmt_iot_hub' gem 'azure_mgmt_key_vault', path: 'management/azure_mgmt_key_vault' +gem 'azure_mgmt_links', path: 'management/azure_mgmt_links' gem 'azure_mgmt_locks', path: 'management/azure_mgmt_locks' gem 'azure_mgmt_logic', path: 'management/azure_mgmt_logic' gem 'azure_mgmt_machine_learning', path: 'management/azure_mgmt_machine_learning' +gem 'azure_mgmt_managed_applications', path: 'management/azure_mgmt_managed_applications' +gem 'azure_mgmt_marketplace_ordering', path: 'management/azure_mgmt_marketplace_ordering' gem 'azure_mgmt_media_services', path: 'management/azure_mgmt_media_services' gem 'azure_mgmt_mobile_engagement', path: 'management/azure_mgmt_mobile_engagement' gem 'azure_mgmt_network', path: 'management/azure_mgmt_network' gem 'azure_mgmt_notification_hubs', path: 'management/azure_mgmt_notification_hubs' +gem 'azure_mgmt_operational_insights', path: 'management/azure_mgmt_operational_insights' gem 'azure_mgmt_policy', path: 'management/azure_mgmt_policy' gem 'azure_mgmt_powerbi_embedded', path: 'management/azure_mgmt_powerbi_embedded' gem 'azure_mgmt_recovery_services', path: 'management/azure_mgmt_recovery_services' gem 'azure_mgmt_recovery_services_backup', path: 'management/azure_mgmt_recovery_services_backup' +gem 'azure_mgmt_recovery_services_site_recovery', path: 'management/azure_mgmt_recovery_services_site_recovery' gem 'azure_mgmt_redis', path: 'management/azure_mgmt_redis' +gem 'azure_mgmt_relay', path: 'management/azure_mgmt_relay' gem 'azure_mgmt_resources', path: 'management/azure_mgmt_resources' +gem 'azure_mgmt_resources_management', path: 'management/azure_mgmt_resources_management' gem 'azure_mgmt_scheduler', path: 'management/azure_mgmt_scheduler' gem 'azure_mgmt_search', path: 'management/azure_mgmt_search' gem 'azure_mgmt_server_management', path: 'management/azure_mgmt_server_management' gem 'azure_mgmt_service_bus', path: 'management/azure_mgmt_service_bus' +gem 'azure_mgmt_service_fabric', path: 'management/azure_mgmt_service_fabric' gem 'azure_mgmt_sql', path: 'management/azure_mgmt_sql' +gem 'azure_mgmt_stor_simple8000_series', path: 'management/azure_mgmt_stor_simple8000_series' gem 'azure_mgmt_storage', path: 'management/azure_mgmt_storage' gem 'azure_mgmt_stream_analytics', path: 'management/azure_mgmt_stream_analytics' gem 'azure_mgmt_subscriptions', path: 'management/azure_mgmt_subscriptions' diff --git a/README.md b/README.md index 9c4c73c187..43ef02c5fa 100644 --- a/README.md +++ b/README.md @@ -8,36 +8,57 @@ If you're looking for Azure Service Management (ASM) please refer to this [repo] Additional info on Azure deployment models [https://azure.microsoft.com/en-us/documentation/articles/azure-classic-rm/](https://azure.microsoft.com/en-us/documentation/articles/azure-classic-rm/) ## Azure Resource Management (preview) +* [Analysis Services](https://rubygems.org/gems/azure_mgmt_analysis_services) Manage Azure Analysis Services * [Authorization](https://rubygems.org/gems/azure_mgmt_authorization) Azure Resource Manager role based authorization +* [Automation](https://rubygems.org/gems/azure_mgmt_automation) Manage Azure Automation service * [Batch](https://rubygems.org/gems/azure_mgmt_batch) Azure Batch Management Account & Application operations management +* [Billing](https://rubygems.org/gems/azure_mgmt_billing) Manage Azure Billing service * [CDN](https://rubygems.org/gems/azure_mgmt_cdn) Azure Content Delivery Network * [Cognitive Services](https://rubygems.org/gems/azure_mgmt_cognitive_services) Azure Cognitive Services Account management * [Commerce](https://rubygems.org/gems/azure_mgmt_commerce) Azure Commerce Usage aggregates & Rate card management * [Compute](https://rubygems.org/gems/azure_mgmt_compute) Virtual Machines, Images, Extensions, Availability Sets, etc... +* [Consumption](https://rubygems.org/gems/azure_mgmt_consumption) Manage Azure Consumption service +* [Container Instance](https://rubygems.org/gems/azure_mgmt_container_instance) Manage Azure Container Instance service +* [Container Registry](https://rubygems.org/gems/azure_mgmt_container_registry) Registries, Credentials, Replications, etc... +* [Customer Insights](https://rubygems.org/gems/azure_mgmt_customer_insights) Manage Azure Customer Insights service * [Datalake Analytics](https://rubygems.org/gems/azure_mgmt_datalake_analytics) Azure Datalake Analytics Account, Catalog and Job management * [Datalake Store](https://rubygems.org/gems/azure_mgmt_datalake_store) Azure Datalake Store Account and FileSystem management * [DevTest Labs](https://rubygems.org/gems/azure_mgmt_devtestlabs) Azure DevTest Labs LabOperations, ArtifactSourceOperations, ArtifactOperations, CostOperations etc... * [DNS](https://rubygems.org/gems/azure_mgmt_dns) Azure DNS Record Set and Zone management +* [Event Grid](https://rubygems.org/gems/azure_mgmt_event_grid) Azure Event Grid management service +* [Event Hub](https://rubygems.org/gems/azure_mgmt_event_hub) Azure Event Hub management service * [Features](https://rubygems.org/gems/azure_mgmt_features) Feature Exposure Controls * [Graph](https://rubygems.org/gems/azure_mgmt_graph) Azure Active Directory Applications, Users, etc... -* [Monitor](https://rubygems.org/gems/azure_mgmt_monitor) Azure Monitor management * [IoTHub](https://rubygems.org/gems/azure_mgmt_iot_hub) Azure IoTHub's Resource Management * [Key Vault](https://rubygems.org/gems/azure_mgmt_key_vault) Azure Key Vault's vault management +* [Links](https://rubygems.org/gems/azure_mgmt_links) Management links for Azure Resources * [Locks](https://rubygems.org/gems/azure_mgmt_locks) Management locks for Azure Resources -* [Logic](https://rubygems.org/gems/azure_mgmt_logic) Integration Accounts, AccountSchemas, AccountMaps, AccountPartners etc... +* [Logic](https://rubygems.org/gems/azure_mgmt_logic) Integration Accounts, AccountSchemas, AccountMaps, AccountPartners etc... * [Machine Learning](https://rubygems.org/gems/azure_mgmt_machine_learning) Azure Machine Learning web services management +* [Managed Applications](https://rubygems.org/gems/azure_mgmt_managed_applications) Manage Applications for Azure Resources +* [Marketplace Ordering](https://rubygems.org/gems/azure_mgmt_marketplace_ordering) Manage Azure Marketplace Ordering service * [Media Services](https://rubygems.org/gems/azure_mgmt_media_services) Media Services resource management APIs -* [Mobile Engagement](https://rubygems.org/gems/azure_mgmt_mobile_engagement) Azure Mobile Engagement's Apps, App Collections, Devices management APIs +* [Mobile Engagement](https://rubygems.org/gems/azure_mgmt_mobile_engagement) Azure Mobile Engagement's Apps, App Collections, Devices management APIs +* [Monitor](https://rubygems.org/gems/azure_mgmt_monitor) Azure Monitor management * [Network](https://rubygems.org/gems/azure_mgmt_network) Load Balancers, Network Gateways, Security Groups, etc... * [Notification Hubs](https://rubygems.org/gems/azure_mgmt_notification_hubs) Notification Hubs management +* [Operational Insights](https://rubygems.org/gems/azure_mgmt_operational_insights) Manage Azure Operational Insights service * [Policy](https://rubygems.org/gems/azure_mgmt_policy) Policy Assignment & Policy definition operations * [Powerbi Embedded](https://rubygems.org/gems/azure_mgmt_powerbi_embedded) Azure Powerbi Embedded Workspace & WorkspaceCollection management +* [Recovery Services](https://rubygems.org/gems/azure_mgmt_recovery_services) Azure Recovery Services management +* [Recovery Services Backup](https://rubygems.org/gems/azure_mgmt_recovery_services_backup) Azure Recovery Services Backup management +* [Recovery Services Site Recovery](https://rubygems.org/gems/azure_mgmt_recovery_services_site_recovery) Azure Recovery Services Site Recovery management * [Redis](https://rubygems.org/gems/azure_mgmt_redis) Redis resource management +* [Relay](https://rubygems.org/gems/azure_mgmt_relay) Azure Relay management * [Resources](https://rubygems.org/gems/azure_mgmt_resources) Resource Groups, Resource Providers, Template Deployments, Operations, etc... +* [Resources Management](https://rubygems.org/gems/azure_mgmt_resources_management) Azure Resources Management service * [Scheduler](https://rubygems.org/gems/azure_mgmt_scheduler) Manage scheduled jobs in Azure * [Search](https://rubygems.org/gems/azure_mgmt_search) Manage Search resources * [Server Management](https://rubygems.org/gems/azure_mgmt_server_management) Azure Server Management Service like node, gateway, powershell etc.. +* [Service Bus](https://rubygems.org/gems/azure_mgmt_service_bus) Manage Azure Service Bus +* [Service Fabric](https://rubygems.org/gems/azure_mgmt_service_fabric) Manage Azure Fabric Bus * [SQL](https://rubygems.org/gems/azure_mgmt_sql) Manage Azure SQL resources +* [Stor Simple 8000 Series](https://rubygems.org/gems/azure_mgmt_stor_simple8000_series) Manage Azure Stor Simple 8000 Series service * [Storage](https://rubygems.org/gems/azure_mgmt_storage) Account Creation, Usage Operations, etc... * [Stream Analytics](https://rubygems.org/gems/azure_mgmt_stream_analytics) Create, update, start, stop streaming jobs etc... * [Subscriptions](https://rubygems.org/gems/azure_mgmt_subscriptions) Manage Azure subscriptions @@ -146,6 +167,14 @@ bundle install Running the command ``yard`` will generate the API documentation in the `./doc` directory. +### Re-Gen all azure_mgmt_* SDKs + +Follow the steps below to regenerate all the azure_mgmt_* sdks using [autorest.ruby](https://github.com/Azure/autorest.ruby) generator: +1. Install [Node.js](https://nodejs.org/en/) version `7.10.0` or greater +2. Install autorest using `npm install -g autorest` +3. Run `bundle install` in the root directory of the project +4. Run `rake arm:regen` task to regenerate all the management SDKs + ## Provide Feedback If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-ruby/issues) section of the project. Please make sure to label the diff --git a/Rakefile b/Rakefile index 600f2d8f3f..a8adee39ca 100644 --- a/Rakefile +++ b/Rakefile @@ -45,6 +45,10 @@ namespace :arm do desc 'Push gem for each of the Azure Resource Manager projects' task :release, [:key] => :build do |_, args| each_gem do |dir| + # Delay for 10 seconds before publishing gem + puts "Going to sleep for 10 seconds before publishing #{dir} ..." + sleep(10) + # Using execute method so that keys are not logged onto console execute("gem push ./pkg/#{dir}-#{version}.gem" + (args[:key].nil? ? '' : " -k #{args[:key]}")) end @@ -57,7 +61,7 @@ namespace :arm do unless REGEN_EXCLUDES.include?(dir.to_s) puts "\nGenerating #{dir}\n" md = REGEN_METADATA[dir.to_sym] - ar_base_command = "#{OS.windows? ? '' : 'mono '} #{REGEN_METADATA[:autorest_loc]}" + ar_base_command = REGEN_METADATA[:autorest_loc] command = "#{ar_base_command} #{md[:spec_uri]} --package-version=#{md[:version]} --namespace=#{md[:ns]} --package-name=#{md[:pn].nil? ? dir : md[:pn]} --output-folder=#{File.join(Dir.pwd, 'lib')} --ruby --azure-arm" command += " --#{md[:options]}" unless md[:options].nil? @@ -130,7 +134,7 @@ def each_gem end REGEN_METADATA = { - autorest_loc: ENV.fetch('AUTOREST_LOC', '../../../autorest/binaries/net45/AutoRest.exe'), + autorest_loc: ENV.fetch('AUTOREST_LOC', 'autorest'), azure_sdk: { version: version }, @@ -144,11 +148,21 @@ REGEN_METADATA = { ns: 'Azure::ARM::Authorization', version: version }, + azure_mgmt_automation: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/automation/resource-manager/readme.md', + ns: 'Azure::ARM::Automation', + version: version + }, azure_mgmt_batch: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/batch/resource-manager/readme.md', ns: 'Azure::ARM::Batch', version: version }, + azure_mgmt_billing: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/billing/resource-manager/readme.md', + ns: 'Azure::ARM::Billing', + version: version + }, azure_mgmt_cdn: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/cdn/resource-manager/readme.md', ns: 'Azure::ARM::CDN', @@ -169,6 +183,26 @@ REGEN_METADATA = { ns: 'Azure::ARM::Compute', version: version }, + azure_mgmt_consumption: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/consumption/resource-manager/readme.md', + ns: 'Azure::ARM::Consumption', + version: version + }, + azure_mgmt_container_instance: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/containerinstance/resource-manager/readme.md', + ns: 'Azure::ARM::ContainerInstance', + version: version + }, + azure_mgmt_container_registry: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/containerregistry/resource-manager/readme.md', + ns: 'Azure::ARM::ContainerRegistry', + version: version + }, + azure_mgmt_customer_insights: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/customer-insights/resource-manager/readme.md', + ns: 'Azure::ARM::CustomerInsights', + version: version + }, azure_mgmt_datalake_analytics: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/datalake-analytics/resource-manager/readme.md', ns: 'Azure::ARM::DataLakeAnalytics', @@ -189,6 +223,11 @@ REGEN_METADATA = { ns: 'Azure::ARM::Dns', version: version }, + azure_mgmt_event_grid: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/eventgrid/resource-manager/readme.md', + ns: 'Azure::ARM::EventGrid', + version: version + }, azure_mgmt_event_hub: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/eventhub/resource-manager/readme.md', ns: 'Azure::ARM::EventHub', @@ -222,6 +261,12 @@ REGEN_METADATA = { ns: 'Azure::ARM::KeyVault', version: version }, + azure_mgmt_links: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/resources/resource-manager/readme.md', + ns: 'Azure::ARM::Links', + version: version, + options: 'package-links' + }, azure_mgmt_locks: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/resources/resource-manager/readme.md', ns: 'Azure::ARM::Locks', @@ -239,6 +284,17 @@ REGEN_METADATA = { version: version, options: 'package-webservices' }, + azure_mgmt_managed_applications: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/resources/resource-manager/readme.md', + ns: 'Azure::ARM::ManagedApplications', + version: version, + options: 'package-managedapplications' + }, + azure_mgmt_marketplace_ordering: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/marketplaceordering/resource-manager/readme.md', + ns: 'Azure::ARM::MarketplaceOrdering', + version: version + }, azure_mgmt_media_services: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/mediaservices/resource-manager/readme.md', ns: 'Azure::ARM::MediaServices', @@ -264,6 +320,11 @@ REGEN_METADATA = { ns: 'Azure::ARM::NotificationHubs', version: version }, + azure_mgmt_operational_insights: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/operationalinsights/resource-manager/readme.md', + ns: 'Azure::ARM::OperationalInsights', + version: version + }, azure_mgmt_policy: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/resources/resource-manager/readme.md', ns: 'Azure::ARM::Policy', @@ -285,17 +346,33 @@ REGEN_METADATA = { ns: 'Azure::ARM::RecoveryServicesBackup', version: version }, + azure_mgmt_recovery_services_site_recovery: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/recoveryservicessiterecovery/resource-manager/readme.md', + ns: 'Azure::ARM::RecoveryServicesSiteRecovery', + version: version + }, azure_mgmt_redis: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/redis/resource-manager/readme.md', ns: 'Azure::ARM::Redis', version: version }, + azure_mgmt_relay: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/relay/resource-manager/readme.md', + ns: 'Azure::ARM::Relay', + version: version + }, azure_mgmt_resources: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/resources/resource-manager/readme.md', ns: 'Azure::ARM::Resources', version: version, options: 'package-resources' }, + azure_mgmt_resources_management: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/resources/resource-manager/readme.md', + ns: 'Azure::ARM::ResourcesManagement', + version: version, + options: 'package-management' + }, azure_mgmt_scheduler: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/scheduler/resource-manager/readme.md', ns: 'Azure::ARM::Scheduler', @@ -316,11 +393,22 @@ REGEN_METADATA = { ns: 'Azure::ARM::ServiceBus', version: version }, + azure_mgmt_service_fabric: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/servicefabric/resource-manager/readme.md', + ns: 'Azure::ARM::ServiceFabric', + version: version, + tag: "package-2016-09" + }, azure_mgmt_sql: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/sql/resource-manager/readme.md', ns: 'Azure::ARM::SQL', version: version }, + azure_mgmt_stor_simple8000_series: { + spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/storsimple8000series/resource-manager/readme.md', + ns: 'Azure::ARM::StorSimple8000Series', + version: version + }, azure_mgmt_storage: { spec_uri: 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/storage/resource-manager/readme.md', ns: 'Azure::ARM::Storage', diff --git a/azure_sdk/azure_sdk.gemspec b/azure_sdk/azure_sdk.gemspec index e7c0ac6935..005909eec0 100644 --- a/azure_sdk/azure_sdk.gemspec +++ b/azure_sdk/azure_sdk.gemspec @@ -32,43 +32,59 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'azure_mgmt_analysis_services', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_authorization', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_automation', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_batch', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_billing', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_cdn', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_cognitive_services', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_commerce', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_compute', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_consumption', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_container_instance', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_container_registry', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_customer_insights', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_datalake_analytics', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_datalake_store', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_devtestlabs', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_dns', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_event_grid', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_event_hub', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_features', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_graph', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_monitor', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_iot_hub', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_key_vault', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_links', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_locks', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_logic', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_machine_learning', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_managed_applications', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_marketplace_ordering', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_media_services', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_mobile_engagement', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_network', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_notification_hubs', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_operational_insights', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_policy', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_powerbi_embedded', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_recovery_services', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_recovery_services_backup', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_recovery_services_site_recovery', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_redis', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_relay', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_resources', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_resources_management', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_scheduler', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_search', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_server_management', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_service_bus', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_service_fabric', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_sql', "~>#{version}" + spec.add_runtime_dependency 'azure_mgmt_stor_simple8000_series', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_storage', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_stream_analytics', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_subscriptions', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_traffic_manager', "~>#{version}" spec.add_runtime_dependency 'azure_mgmt_web', "~>#{version}" - spec.add_runtime_dependency 'azure-storage', "~>0.12.1.preview" + spec.add_runtime_dependency 'azure-storage', "~>0.14.0.preview" end diff --git a/azure_sdk/lib/azure_sdk/client.rb b/azure_sdk/lib/azure_sdk/client.rb index 8d755bf66d..b01ce51f74 100644 --- a/azure_sdk/lib/azure_sdk/client.rb +++ b/azure_sdk/lib/azure_sdk/client.rb @@ -2,36 +2,57 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. +require 'azure_mgmt_analysis_services' require 'azure_mgmt_authorization' +require 'azure_mgmt_automation' require 'azure_mgmt_batch' +require 'azure_mgmt_billing' require 'azure_mgmt_cdn' require 'azure_mgmt_cognitive_services' require 'azure_mgmt_commerce' require 'azure_mgmt_compute' +require 'azure_mgmt_consumption' +require 'azure_mgmt_container_instance' +require 'azure_mgmt_container_registry' +require 'azure_mgmt_customer_insights' require 'azure_mgmt_datalake_analytics' require 'azure_mgmt_datalake_store' require 'azure_mgmt_devtestlabs' require 'azure_mgmt_dns' +require 'azure_mgmt_event_grid' +require 'azure_mgmt_event_hub' require 'azure_mgmt_features' require 'azure_mgmt_graph' require 'azure_mgmt_iot_hub' require 'azure_mgmt_key_vault' +require 'azure_mgmt_links' require 'azure_mgmt_locks' require 'azure_mgmt_logic' require 'azure_mgmt_machine_learning' +require 'azure_mgmt_managed_applications' +require 'azure_mgmt_marketplace_ordering' require 'azure_mgmt_media_services' require 'azure_mgmt_mobile_engagement' +require 'azure_mgmt_monitor' require 'azure_mgmt_network' require 'azure_mgmt_notification_hubs' +require 'azure_mgmt_operational_insights' require 'azure_mgmt_policy' require 'azure_mgmt_powerbi_embedded' +require 'azure_mgmt_recovery_services' +require 'azure_mgmt_recovery_services_backup' +require 'azure_mgmt_recovery_services_site_recovery' require 'azure_mgmt_redis' +require 'azure_mgmt_relay' require 'azure_mgmt_resources' +require 'azure_mgmt_resources_management' require 'azure_mgmt_scheduler' require 'azure_mgmt_search' require 'azure_mgmt_server_management' require 'azure_mgmt_service_bus' +require 'azure_mgmt_service_fabric' require 'azure_mgmt_sql' +require 'azure_mgmt_stor_simple8000_series' require 'azure_mgmt_storage' require 'azure_mgmt_stream_analytics' require 'azure_mgmt_subscriptions' @@ -47,36 +68,54 @@ class Client # @return [Hash] Supported Azure::ARM clients. # @@supported_clients = { + :analysis_services => 'Azure::ARM::AnalysisServices::AnalysisServicesManagementClient', :authorization => 'Azure::ARM::Authorization::AuthorizationManagementClient', + :automation => 'Azure::ARM::Automation::AutomationClient', :batch => 'Azure::ARM::Batch::BatchManagementClient', + :billing => 'Azure::ARM::Batch::BillingManagementClient', :cdn => 'Azure::ARM::CDN::CdnManagementClient', :cognitive_services => 'Azure::ARM::CognitiveServices::CognitiveServicesManagementClient', :commerce => 'Azure::ARM::Commerce::UsageManagementClient', :compute => 'Azure::ARM::Compute::ComputeManagementClient', + :consumption => 'Azure::ARM::Compute::ConsumptionManagementClient', + :container_instance => 'Azure::ARM::ContainerInstance::ContainerInstanceManagementClient', + :container_registry => 'Azure::ARM::ContainerRegistry::ContainerRegistry::ContainerRegistryManagementClient', + :customer_insights => 'Azure::ARM::CustomerInsights::CustomerInsightsManagementClient', :datalake_analytics => 'Azure::ARM::DataLakeAnalytics::DataLakeAnalyticsAccountManagementClient', :datalake_store => 'Azure::ARM::DataLakeStore::DataLakeStoreAccountManagementClient', :devtestlabs => 'Azure::ARM::DevTestLabs::DevTestLabsClient', :dns => 'Azure::ARM::Dns::DnsManagementClient', + :event_grid => 'Azure::ARM::EventGrid::EventGridManagementClient', + :event_hub => 'Azure::ARM::EventHub::EventHubManagementClient', :features => 'Azure::ARM::Features::FeatureClient', :graph_rbac => 'Azure::ARM::Graph::GraphRbacManagementClient', :iot_hub => 'Azure::ARM::IotHub::IotHubClient', :key_vault => 'Azure::ARM::KeyVault::KeyVaultManagementClient', + :links => 'Azure::ARM::Locks::ManagementLinkClient', :locks => 'Azure::ARM::Locks::ManagementLockClient', :logic => 'Azure::ARM::Logic::LogicManagementClient', :machine_learning => 'Azure::ARM::MachineLearning::AzureMLWebServicesManagementClient', + :managed_applications => 'Azure::ARM::ManagedApplications::ManagedApplicationClient', + :marketplace_ordering => 'Azure::ARM::Marketplace_Ordering::MarketplaceOrderingAgreements', :media_services => 'Azure::ARM::MediaServices::MediaServicesManagementClient', :mobile_engagement => 'Azure::ARM::MobileEngagement::EngagementManagementClient', + :monitor => 'Azure::ARM::Monitor::MonitorManagementClient', :network => 'Azure::ARM::Network::NetworkManagementClient', :notification_hubs => 'Azure::ARM::NotificationHubs::NotificationHubsManagementClient', + :operational_insights => 'Azure::ARM::OperationalInsights::OperationalInsightsManagementClient', :policy => 'Azure::ARM::Policy::PolicyClient', :powerbi_embedded => 'Azure::ARM::PowerBiEmbedded::PowerBIEmbeddedManagementClient', :redis => 'Azure::ARM::Redis::RedisManagementClient', + :relay => 'Azure::ARM::Relay::RelayManagementClient', :resources => 'Azure::ARM::Resources::ResourceManagementClient', + :resources_management => 'Azure::ARM::ResourcesManagement::ManagementGroupsAPI', :scheduler => 'Azure::ARM::Scheduler::SchedulerManagementClient', :search => 'Azure::ARM::Search::SearchManagementClient', :server_management => 'Azure::ARM::ServerManagement::ServerManagement', :service_bus => 'Azure::ARM::ServiceBus::ServiceBusManagementClient', + :service_fabric => 'Azure::ARM::ServiceFabric::ServiceFabricManagementClient ', :sql => 'Azure::ARM::SQL::SqlManagementClient', + :stor_simple8000_series => 'Azure::ARM::StorSimple8000Series::StorSimple8000SeriesManagementClient', :storage => 'Azure::ARM::Storage::StorageManagementClient', :stream_analytics => 'Azure::ARM::StreamAnalytics::StreamAnalyticsManagementClient', :subscription => 'Azure::ARM::Subscriptions::SubscriptionClient', diff --git a/azure_sdk/lib/azure_sdk/version.rb b/azure_sdk/lib/azure_sdk/version.rb index 619af88126..f75ff583e7 100644 --- a/azure_sdk/lib/azure_sdk/version.rb +++ b/azure_sdk/lib/azure_sdk/version.rb @@ -3,5 +3,5 @@ # Licensed under the MIT License. See License.txt in the project root for license information. module Azure - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_analysis_services/azure_mgmt_analysis_services.gemspec b/management/azure_mgmt_analysis_services/azure_mgmt_analysis_services.gemspec index 685b601d3c..dd159c9d73 100644 --- a/management/azure_mgmt_analysis_services/azure_mgmt_analysis_services.gemspec +++ b/management/azure_mgmt_analysis_services/azure_mgmt_analysis_services.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services.rb old mode 100755 new mode 100644 index 189db4a5ac..9ea2e00706 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,20 +21,33 @@ module Azure::ARM::AnalysisServices autoload :Servers, 'generated/azure_mgmt_analysis_services/servers.rb' + autoload :Operations, 'generated/azure_mgmt_analysis_services/operations.rb' autoload :AnalysisServicesManagementClient, 'generated/azure_mgmt_analysis_services/analysis_services_management_client.rb' module Models - autoload :ServerAdministrators, 'generated/azure_mgmt_analysis_services/models/server_administrators.rb' + autoload :IPv4FirewallRule, 'generated/azure_mgmt_analysis_services/models/ipv4firewall_rule.rb' + autoload :IPv4FirewallSettings, 'generated/azure_mgmt_analysis_services/models/ipv4firewall_settings.rb' + autoload :Operation, 'generated/azure_mgmt_analysis_services/models/operation.rb' autoload :AnalysisServicesServerUpdateParameters, 'generated/azure_mgmt_analysis_services/models/analysis_services_server_update_parameters.rb' - autoload :Resource, 'generated/azure_mgmt_analysis_services/models/resource.rb' - autoload :SkuEnumerationForNewResourceResult, 'generated/azure_mgmt_analysis_services/models/sku_enumeration_for_new_resource_result.rb' + autoload :ResourceSku, 'generated/azure_mgmt_analysis_services/models/resource_sku.rb' + autoload :GatewayListStatusLive, 'generated/azure_mgmt_analysis_services/models/gateway_list_status_live.rb' autoload :AnalysisServicesServers, 'generated/azure_mgmt_analysis_services/models/analysis_services_servers.rb' + autoload :GatewayError, 'generated/azure_mgmt_analysis_services/models/gateway_error.rb' + autoload :GatewayDetails, 'generated/azure_mgmt_analysis_services/models/gateway_details.rb' + autoload :GatewayListStatusError, 'generated/azure_mgmt_analysis_services/models/gateway_list_status_error.rb' + autoload :OperationListResult, 'generated/azure_mgmt_analysis_services/models/operation_list_result.rb' + autoload :SkuEnumerationForNewResourceResult, 'generated/azure_mgmt_analysis_services/models/sku_enumeration_for_new_resource_result.rb' + autoload :ServerAdministrators, 'generated/azure_mgmt_analysis_services/models/server_administrators.rb' autoload :SkuDetailsForExistingResource, 'generated/azure_mgmt_analysis_services/models/sku_details_for_existing_resource.rb' - autoload :ResourceSku, 'generated/azure_mgmt_analysis_services/models/resource_sku.rb' + autoload :Resource, 'generated/azure_mgmt_analysis_services/models/resource.rb' autoload :SkuEnumerationForExistingResourceResult, 'generated/azure_mgmt_analysis_services/models/sku_enumeration_for_existing_resource_result.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_analysis_services/models/operation_display.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_analysis_services/models/error_response.rb' autoload :AnalysisServicesServer, 'generated/azure_mgmt_analysis_services/models/analysis_services_server.rb' autoload :SkuTier, 'generated/azure_mgmt_analysis_services/models/sku_tier.rb' autoload :State, 'generated/azure_mgmt_analysis_services/models/state.rb' autoload :ProvisioningState, 'generated/azure_mgmt_analysis_services/models/provisioning_state.rb' + autoload :ConnectionMode, 'generated/azure_mgmt_analysis_services/models/connection_mode.rb' + autoload :Status, 'generated/azure_mgmt_analysis_services/models/status.rb' end end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/analysis_services_management_client.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/analysis_services_management_client.rb old mode 100755 new mode 100644 index 2be97494b5..f658136f89 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/analysis_services_management_client.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/analysis_services_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -38,6 +38,9 @@ class AnalysisServicesManagementClient < MsRestAzure::AzureServiceClient # @return [Servers] servers attr_reader :servers + # @return [Operations] operations + attr_reader :operations + # # Creates initializes a new instance of the AnalysisServicesManagementClient class. # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @@ -52,7 +55,8 @@ def initialize(credentials = nil, base_url = nil, options = nil) @credentials = credentials @servers = Servers.new(self) - @api_version = '2016-05-16' + @operations = Operations.new(self) + @api_version = '2017-08-01-beta' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server.rb old mode 100755 new mode 100644 index bcadebd88f..0accb15675 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,17 +8,33 @@ module Models # # Represents an instance of an Analysis Services resource. # - class AnalysisServicesServer < MsRestAzure::Resource + class AnalysisServicesServer < Resource include MsRestAzure - include MsRest::JSONable # @return [ServerAdministrators] A collection of AS server administrators attr_accessor :as_administrators - # @return [String] The container URI of backup blob. + # @return [String] The SAS container URI to the backup container. attr_accessor :backup_blob_container_uri + # @return [GatewayDetails] The gateway details configured for the AS + # server. + attr_accessor :gateway_details + + # @return [IPv4FirewallSettings] The firewall settings for the AS server. + attr_accessor :ip_v4firewall_settings + + # @return [ConnectionMode] How the read-write server's participation in + # the query pool is controlled.
It can have the following values: + # Specifying readOnly when capacity is 1 results in + # error. Possible values include: 'All', 'ReadOnly'. Default value: 'All' + # . + attr_accessor :querypool_connection_mode + # @return [State] The current state of Analysis Services resource. The # state is to indicate more states outside of resource provisioning. # Possible values include: 'Deleting', 'Succeeded', 'Failed', 'Paused', @@ -117,6 +133,31 @@ def self.mapper() name: 'String' } }, + gateway_details: { + required: false, + serialized_name: 'properties.gatewayDetails', + type: { + name: 'Composite', + class_name: 'GatewayDetails' + } + }, + ip_v4firewall_settings: { + required: false, + serialized_name: 'properties.ipV4FirewallSettings', + type: { + name: 'Composite', + class_name: 'IPv4FirewallSettings' + } + }, + querypool_connection_mode: { + required: false, + serialized_name: 'properties.querypoolConnectionMode', + default_value: 'All', + type: { + name: 'Enum', + module: 'ConnectionMode' + } + }, state: { required: false, read_only: true, diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server_update_parameters.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server_update_parameters.rb old mode 100755 new mode 100644 index dade26c483..d508971ec6 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server_update_parameters.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_server_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AnalysisServicesServerUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [ResourceSku] The SKU of the Analysis Services resource. attr_accessor :sku @@ -23,9 +22,26 @@ class AnalysisServicesServerUpdateParameters # @return [ServerAdministrators] A collection of AS server administrators attr_accessor :as_administrators - # @return [String] The container URI of backup blob. + # @return [String] The SAS container URI to the backup container. attr_accessor :backup_blob_container_uri + # @return [GatewayDetails] The gateway details configured for the AS + # server. + attr_accessor :gateway_details + + # @return [IPv4FirewallSettings] The firewall settings for the AS server. + attr_accessor :ip_v4firewall_settings + + # @return [ConnectionMode] How the read-write server's participation in + # the query pool is controlled.
It can have the following values: + # Specifying readOnly when capacity is 1 results in + # error. Possible values include: 'All', 'ReadOnly'. Default value: 'All' + # . + attr_accessor :querypool_connection_mode + # # Mapper for AnalysisServicesServerUpdateParameters class as Ruby Hash. @@ -75,6 +91,31 @@ def self.mapper() type: { name: 'String' } + }, + gateway_details: { + required: false, + serialized_name: 'properties.gatewayDetails', + type: { + name: 'Composite', + class_name: 'GatewayDetails' + } + }, + ip_v4firewall_settings: { + required: false, + serialized_name: 'properties.ipV4FirewallSettings', + type: { + name: 'Composite', + class_name: 'IPv4FirewallSettings' + } + }, + querypool_connection_mode: { + required: false, + serialized_name: 'properties.querypoolConnectionMode', + default_value: 'All', + type: { + name: 'Enum', + module: 'ConnectionMode' + } } } } diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_servers.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_servers.rb old mode 100755 new mode 100644 index a66e688605..746af3221d --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_servers.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/analysis_services_servers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AnalysisServicesServers include MsRestAzure - include MsRest::JSONable # @return [Array] An array of Analysis Services # resources. attr_accessor :value diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/connection_mode.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/connection_mode.rb new file mode 100644 index 0000000000..71696bcdfa --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/connection_mode.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::ARM::AnalysisServices + module Models + # + # Defines values for ConnectionMode + # + module ConnectionMode + All = "All" + ReadOnly = "ReadOnly" + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/error_response.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/error_response.rb new file mode 100644 index 0000000000..6f828b6c17 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/error_response.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::ARM::AnalysisServices + module Models + # + # Describes the format of Error response. + # + class ErrorResponse + + include MsRestAzure + + # @return [String] Error code + attr_accessor :code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :message + + + # + # 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: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_details.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_details.rb new file mode 100644 index 0000000000..8c7cd5c7bf --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_details.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::ARM::AnalysisServices + module Models + # + # The gateway details. + # + class GatewayDetails + + include MsRestAzure + + # @return [String] Gateway resource to be associated with the server. + attr_accessor :gateway_resource_id + + # @return [String] Gateway object id from in the DMTS cluster for the + # gateway resource. + attr_accessor :gateway_object_id + + # @return [String] Uri of the DMTS cluster. + attr_accessor :dmts_cluster_uri + + + # + # Mapper for GatewayDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GatewayDetails', + type: { + name: 'Composite', + class_name: 'GatewayDetails', + model_properties: { + gateway_resource_id: { + required: false, + serialized_name: 'gatewayResourceId', + type: { + name: 'String' + } + }, + gateway_object_id: { + required: false, + read_only: true, + serialized_name: 'gatewayObjectId', + type: { + name: 'String' + } + }, + dmts_cluster_uri: { + required: false, + read_only: true, + serialized_name: 'dmtsClusterUri', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_error.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_error.rb new file mode 100644 index 0000000000..4c2b84407f --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_error.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::ARM::AnalysisServices + module Models + # + # Detail of gateway errors. + # + class GatewayError + + include MsRestAzure + + # @return [String] Error code of list gateway. + attr_accessor :code + + # @return [String] Error message of list gateway. + attr_accessor :message + + + # + # Mapper for GatewayError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GatewayError', + type: { + name: 'Composite', + class_name: 'GatewayError', + model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_list_status_error.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_list_status_error.rb new file mode 100644 index 0000000000..733be589e9 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_list_status_error.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::ARM::AnalysisServices + module Models + # + # Status of gateway is error. + # + class GatewayListStatusError + + include MsRestAzure + + # @return [GatewayError] Error of the list gateway status. + attr_accessor :error + + + # + # Mapper for GatewayListStatusError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GatewayListStatusError', + type: { + name: 'Composite', + class_name: 'GatewayListStatusError', + model_properties: { + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'GatewayError' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_list_status_live.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_list_status_live.rb new file mode 100644 index 0000000000..a021d58f95 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/gateway_list_status_live.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::ARM::AnalysisServices + module Models + # + # Status of gateway is live. + # + class GatewayListStatusLive + + include MsRestAzure + + # @return [Status] Live message of list gateway. Possible values include: + # 'Live' + attr_accessor :status + + + # + # Mapper for GatewayListStatusLive class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GatewayListStatusLive', + type: { + name: 'Composite', + class_name: 'GatewayListStatusLive', + model_properties: { + status: { + required: false, + serialized_name: 'status', + type: { + name: 'Enum', + module: 'Status' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/ipv4firewall_rule.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/ipv4firewall_rule.rb new file mode 100644 index 0000000000..b3edd1fe5d --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/ipv4firewall_rule.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::ARM::AnalysisServices + module Models + # + # The detail of firewall rule. + # + class IPv4FirewallRule + + include MsRestAzure + + # @return [String] The rule name. + attr_accessor :firewall_rule_name + + # @return [String] The start range of IPv4. + attr_accessor :range_start + + # @return [String] The end range of IPv4. + attr_accessor :range_end + + + # + # Mapper for IPv4FirewallRule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IPv4FirewallRule', + type: { + name: 'Composite', + class_name: 'IPv4FirewallRule', + model_properties: { + firewall_rule_name: { + required: false, + serialized_name: 'firewallRuleName', + type: { + name: 'String' + } + }, + range_start: { + required: false, + serialized_name: 'rangeStart', + type: { + name: 'String' + } + }, + range_end: { + required: false, + serialized_name: 'rangeEnd', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/ipv4firewall_settings.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/ipv4firewall_settings.rb new file mode 100644 index 0000000000..81a10f12b5 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/ipv4firewall_settings.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::ARM::AnalysisServices + module Models + # + # An array of firewall rules. + # + class IPv4FirewallSettings + + include MsRestAzure + + # @return [Array] An array of firewall rules. + attr_accessor :firewall_rules + + # @return [String] The indicator of enableing PBI service. + attr_accessor :enable_power_biservice + + + # + # Mapper for IPv4FirewallSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IPv4FirewallSettings', + type: { + name: 'Composite', + class_name: 'IPv4FirewallSettings', + model_properties: { + firewall_rules: { + required: false, + serialized_name: 'firewallRules', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IPv4FirewallRuleElementType', + type: { + name: 'Composite', + class_name: 'IPv4FirewallRule' + } + } + } + }, + enable_power_biservice: { + required: false, + serialized_name: 'enablePowerBIService', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation.rb new file mode 100644 index 0000000000..6b27ac4114 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation.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::ARM::AnalysisServices + module Models + # + # A Consumption REST API operation. + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation}. + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation_display.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation_display.rb new file mode 100644 index 0000000000..eaa34a1b05 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation_display.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::ARM::AnalysisServices + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.Consumption. + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: + # UsageDetail, etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation_list_result.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation_list_result.rb new file mode 100644 index 0000000000..5c026ab9cc --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/operation_list_result.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::ARM::AnalysisServices + module Models + # + # Result of listing consumption operations. It contains a list of + # operations and a URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of analysis services operations + # supported by the Microsoft.AnalysisServices 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/provisioning_state.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/provisioning_state.rb old mode 100755 new mode 100644 index ad068202a9..3e6f789913 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/provisioning_state.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource.rb old mode 100755 new mode 100644 index 930af56b0e..9dc04e8821 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,14 +8,30 @@ module Models # # Represents an instance of an Analysis Services resource. # - class Resource < MsRestAzure::Resource + class Resource include MsRestAzure - include MsRest::JSONable + # @return [String] An identifier that represents the Analysis Services + # resource. + attr_accessor :id + + # @return [String] The name of the Analysis Services resource. + attr_accessor :name + + # @return [String] The type of the Analysis Services resource. + attr_accessor :type + + # @return [String] Location of the Analysis Services resource. + attr_accessor :location + # @return [ResourceSku] The SKU of the Analysis Services resource. attr_accessor :sku + # @return [Hash{String => String}] Key-value pairs of additional resource + # provisioning properties. + attr_accessor :tags + # # Mapper for Resource class as Ruby Hash. diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource_sku.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource_sku.rb old mode 100755 new mode 100644 index 435c1ad5af..8d17b367da --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource_sku.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/resource_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ResourceSku include MsRestAzure - include MsRest::JSONable # @return [String] Name of the SKU level. attr_accessor :name @@ -21,6 +20,10 @@ class ResourceSku # applies. Possible values include: 'Development', 'Basic', 'Standard' attr_accessor :tier + # @return [Integer] The number of instances in the read only query pool. + # Default value: 1 . + attr_accessor :capacity + # # Mapper for ResourceSku class as Ruby Hash. @@ -47,6 +50,18 @@ def self.mapper() type: { name: 'String' } + }, + capacity: { + required: false, + serialized_name: 'capacity', + default_value: 1, + constraints: { + InclusiveMaximum: 8, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } } } } diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/server_administrators.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/server_administrators.rb old mode 100755 new mode 100644 index 02a6b3657c..79a8affa63 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/server_administrators.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/server_administrators.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::AnalysisServices module Models # - # An array of administrator user identities + # An array of administrator user identities. # class ServerAdministrators include MsRestAzure - include MsRest::JSONable # @return [Array] An array of administrator user identities. attr_accessor :members diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_details_for_existing_resource.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_details_for_existing_resource.rb index 032e94e551..ca6eb727f5 100644 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_details_for_existing_resource.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_details_for_existing_resource.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::AnalysisServices module Models # - # An object that represents SKU details for existing resources + # An object that represents SKU details for existing resources. # class SkuDetailsForExistingResource include MsRestAzure - include MsRest::JSONable # @return [ResourceSku] The SKU in SKU details for existing resources. attr_accessor :sku diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_existing_resource_result.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_existing_resource_result.rb index 0e62d1753a..34bce837b6 100644 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_existing_resource_result.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_existing_resource_result.rb @@ -1,20 +1,19 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::AnalysisServices module Models # - # An object that represents enumerating SKUs for existing resources + # An object that represents enumerating SKUs for existing resources. # class SkuEnumerationForExistingResourceResult include MsRestAzure - include MsRest::JSONable # @return [Array] The collection of - # available SKUs for existing resources + # available SKUs for existing resources. attr_accessor :value diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_new_resource_result.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_new_resource_result.rb index 3d71b68059..bf9e1a5a6f 100644 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_new_resource_result.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_enumeration_for_new_resource_result.rb @@ -1,20 +1,19 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::AnalysisServices module Models # - # An object that represents enumerating SKUs for new resources + # An object that represents enumerating SKUs for new resources. # class SkuEnumerationForNewResourceResult include MsRestAzure - include MsRest::JSONable # @return [Array] The collection of available SKUs for new - # resources + # resources. attr_accessor :value diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_tier.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_tier.rb old mode 100755 new mode 100644 index 80706423e1..577479118b --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_tier.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/state.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/state.rb old mode 100755 new mode 100644 index 1fdc7d43cb..18803390cf --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/state.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/status.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/status.rb new file mode 100644 index 0000000000..f8978554d7 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/models/status.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::AnalysisServices + module Models + # + # Defines values for Status + # + module Status + Live = "Live" + end + end +end diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/module_definition.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/module_definition.rb old mode 100755 new mode 100644 index 11dff265c5..73ed9918a9 --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/module_definition.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/operations.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/operations.rb new file mode 100644 index 0000000000..736505a806 --- /dev/null +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/operations.rb @@ -0,0 +1,215 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::AnalysisServices + # + # The Azure Analysis Services Web API provides a RESTful set of web services + # that enables users to create, retrieve, update, and delete Analysis + # Services servers + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AnalysisServicesManagementClient] reference to the AnalysisServicesManagementClient + attr_reader :client + + # + # Lists all of the available consumption REST API operations. + # + # @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 consumption REST API operations. + # + # @param custom_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 consumption REST API operations. + # + # @param [Hash{String => String}] 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.AnalysisServices/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::AnalysisServices::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 consumption REST 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 [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 consumption REST 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_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 consumption REST 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_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::ARM::AnalysisServices::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 consumption REST API operations. + # + # @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_analysis_services/lib/generated/azure_mgmt_analysis_services/servers.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/servers.rb old mode 100755 new mode 100644 index 0435429877..613e88690b --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/servers.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/servers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -719,6 +719,192 @@ def list_skus_for_existing_async(resource_group_name, server_name, custom_header promise.execute end + # + # Return the gateway status of the specified Analysis Services server instance. + # + # @param resource_group_name [String] The name of the Azure Resource group of + # which a given Analysis Services server is part. This name must be at least 1 + # character in length, and no more than 90. + # @param server_name [String] The name of the Analysis Services server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GatewayListStatusLive] operation results. + # + def list_gateway_status(resource_group_name, server_name, custom_headers = nil) + response = list_gateway_status_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Return the gateway status of the specified Analysis Services server instance. + # + # @param resource_group_name [String] The name of the Azure Resource group of + # which a given Analysis Services server is part. This name must be at least 1 + # character in length, and no more than 90. + # @param server_name [String] The name of the Analysis Services server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_gateway_status_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_gateway_status_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Return the gateway status of the specified Analysis Services server instance. + # + # @param resource_group_name [String] The name of the Azure Resource group of + # which a given Analysis Services server is part. This name must be at least 1 + # character in length, and no more than 90. + # @param server_name [String] The name of the Analysis Services server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_gateway_status_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.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.AnalysisServices/servers/{serverName}/listGatewayStatus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::AnalysisServices::Models::GatewayListStatusLive.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Dissociates a Unified Gateway associated with the server. + # + # @param resource_group_name [String] The name of the Azure Resource group of + # which a given Analysis Services server is part. This name must be at least 1 + # character in length, and no more than 90. + # @param server_name [String] The name of the Analysis Services server. It must + # be at least 3 characters in length, and no more than 63. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def dissociate_gateway(resource_group_name, server_name, custom_headers = nil) + response = dissociate_gateway_async(resource_group_name, server_name, custom_headers).value! + nil + end + + # + # Dissociates a Unified Gateway associated with the server. + # + # @param resource_group_name [String] The name of the Azure Resource group of + # which a given Analysis Services server is part. This name must be at least 1 + # character in length, and no more than 90. + # @param server_name [String] The name of the Analysis Services server. It must + # be at least 3 characters in length, and no more than 63. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def dissociate_gateway_with_http_info(resource_group_name, server_name, custom_headers = nil) + dissociate_gateway_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Dissociates a Unified Gateway associated with the server. + # + # @param resource_group_name [String] The name of the Azure Resource group of + # which a given Analysis Services server is part. This name must be at least 1 + # character in length, and no more than 90. + # @param server_name [String] The name of the Analysis Services server. It must + # be at least 3 characters in length, and no more than 63. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def dissociate_gateway_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.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.AnalysisServices/servers/{serverName}/dissociateGateway' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + # # Provisions the specified Analysis Services server based on the configuration # specified in the request. diff --git a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/version.rb b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/version.rb old mode 100755 new mode 100644 index e81e794af3..2b012bb9ba --- a/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/version.rb +++ b/management/azure_mgmt_analysis_services/lib/generated/azure_mgmt_analysis_services/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::AnalysisServices - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_authorization/azure_mgmt_authorization.gemspec b/management/azure_mgmt_authorization/azure_mgmt_authorization.gemspec index 9e9f52a300..e2fbe9a589 100644 --- a/management/azure_mgmt_authorization/azure_mgmt_authorization.gemspec +++ b/management/azure_mgmt_authorization/azure_mgmt_authorization.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization.rb old mode 100755 new mode 100644 index 460eba1ada..bf5a2afd54 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/authorization_management_client.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/authorization_management_client.rb old mode 100755 new mode 100644 index 9075da8a55..fca06e85da --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/authorization_management_client.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/authorization_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/classic_administrators.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/classic_administrators.rb old mode 100755 new mode 100644 index 56b0126557..e70ea81f65 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/classic_administrators.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/classic_administrators.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator.rb old mode 100755 new mode 100644 index a9be4071ad..ba9432f9ff --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ClassicAdministrator include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the administrator. attr_accessor :id diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb old mode 100755 new mode 100644 index 1358518576..99d19325ac --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_properties.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_properties.rb old mode 100755 new mode 100644 index 97970312d8..b0923bcee2 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_properties.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/classic_administrator_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ClassicAdministratorProperties include MsRestAzure - include MsRest::JSONable # @return [String] The email address of the administrator. attr_accessor :email_address diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission.rb old mode 100755 new mode 100644 index 40c69eeaba..4855ec8353 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Permission include MsRestAzure - include MsRest::JSONable # @return [Array] Allowed actions. attr_accessor :actions diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission_get_result.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission_get_result.rb old mode 100755 new mode 100644 index acea84a84a..d22916d55e --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission_get_result.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/permission_get_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operation.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operation.rb old mode 100755 new mode 100644 index eceed7310a..04d7830a5c --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operation.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ProviderOperation include MsRestAzure - include MsRest::JSONable # @return [String] The operation name. attr_accessor :name diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata.rb old mode 100755 new mode 100644 index d7894fa134..a45a6e353f --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ProviderOperationsMetadata include MsRestAzure - include MsRest::JSONable # @return [String] The provider id. attr_accessor :id diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb old mode 100755 new mode 100644 index f8675fd824..114b96c987 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/resource_type.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/resource_type.rb old mode 100755 new mode 100644 index 3dc7769cd9..4b3dc4a14e --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/resource_type.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/resource_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceType include MsRestAzure - include MsRest::JSONable # @return [String] The resource type name. attr_accessor :name diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment.rb old mode 100755 new mode 100644 index c6d55ae291..982b59f29b --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleAssignment include MsRestAzure - include MsRest::JSONable # @return [String] The role assignment ID. attr_accessor :id diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_create_parameters.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_create_parameters.rb old mode 100755 new mode 100644 index 35fb62d4e6..5575a6295c --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_create_parameters.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleAssignmentCreateParameters include MsRestAzure - include MsRest::JSONable # @return [RoleAssignmentProperties] Role assignment properties. attr_accessor :properties diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_filter.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_filter.rb old mode 100755 new mode 100644 index 77dba1ac56..830321404b --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_filter.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleAssignmentFilter include MsRestAzure - include MsRest::JSONable # @return [String] Returns role assignment of the specific principal. attr_accessor :principal_id diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_list_result.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_list_result.rb old mode 100755 new mode 100644 index 65e5f7b614..cbfe3897ea --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_list_result.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties.rb old mode 100755 new mode 100644 index 3560a5438b..3d669520b2 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleAssignmentProperties include MsRestAzure - include MsRest::JSONable # @return [String] The role definition ID used in the role assignment. attr_accessor :role_definition_id diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb old mode 100755 new mode 100644 index 134654524a..0e40424b82 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleAssignmentPropertiesWithScope include MsRestAzure - include MsRest::JSONable # @return [String] The role assignment scope. attr_accessor :scope diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition.rb old mode 100755 new mode 100644 index 54a7c43eeb..abb766382b --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleDefinition include MsRestAzure - include MsRest::JSONable # @return [String] The role definition ID. attr_accessor :id diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_filter.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_filter.rb old mode 100755 new mode 100644 index 24201f7d90..3d00584ff4 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_filter.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleDefinitionFilter include MsRestAzure - include MsRest::JSONable # @return [String] Returns role definition with the specific name. attr_accessor :role_name diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_list_result.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_list_result.rb old mode 100755 new mode 100644 index 02b139e82a..7131ec30b1 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_list_result.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_properties.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_properties.rb old mode 100755 new mode 100644 index a278d7031b..02347e5b3c --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_properties.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/models/role_definition_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RoleDefinitionProperties include MsRestAzure - include MsRest::JSONable # @return [String] The role name. attr_accessor :role_name diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/module_definition.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/module_definition.rb old mode 100755 new mode 100644 index b47031af1d..4e4e56a315 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/module_definition.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/permissions.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/permissions.rb old mode 100755 new mode 100644 index e52d9b5c13..be0131c25a --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/permissions.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/permissions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/provider_operations_metadata_operations.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/provider_operations_metadata_operations.rb old mode 100755 new mode 100644 index 9b07069aa4..0cc1554367 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/provider_operations_metadata_operations.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/provider_operations_metadata_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_assignments.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_assignments.rb old mode 100755 new mode 100644 index 49724c6d9b..a195e6f867 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_assignments.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_assignments.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_definitions.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_definitions.rb old mode 100755 new mode 100644 index b9a8487b45..69a61ba445 --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_definitions.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/role_definitions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/version.rb b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/version.rb old mode 100755 new mode 100644 index 75c836dbef..23d5bd170d --- a/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/version.rb +++ b/management/azure_mgmt_authorization/lib/generated/azure_mgmt_authorization/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Authorization - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_automation/.rspec b/management/azure_mgmt_automation/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_automation/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_automation/LICENSE.txt b/management/azure_mgmt_automation/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_automation/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_automation/Rakefile b/management/azure_mgmt_automation/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_automation/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_automation/azure_mgmt_automation.gemspec b/management/azure_mgmt_automation/azure_mgmt_automation.gemspec new file mode 100644 index 0000000000..dcbcf6f57b --- /dev/null +++ b/management/azure_mgmt_automation/azure_mgmt_automation.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_automation/module_definition' +require 'generated/azure_mgmt_automation/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_automation' + spec.version = Azure::ARM::Automation::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Automation Services Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Automation.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_automation/lib/azure_mgmt_automation.rb b/management/azure_mgmt_automation/lib/azure_mgmt_automation.rb new file mode 100644 index 0000000000..cea77d54ee --- /dev/null +++ b/management/azure_mgmt_automation/lib/azure_mgmt_automation.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_automation' + diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation.rb new file mode 100644 index 0000000000..ed3d3d9d6d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation.rb @@ -0,0 +1,183 @@ +# encoding: 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 'generated/azure_mgmt_automation/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::Automation + autoload :AutomationAccountOperations, 'generated/azure_mgmt_automation/automation_account_operations.rb' + autoload :Operations, 'generated/azure_mgmt_automation/operations.rb' + autoload :StatisticsOperations, 'generated/azure_mgmt_automation/statistics_operations.rb' + autoload :Usages, 'generated/azure_mgmt_automation/usages.rb' + autoload :CertificateOperations, 'generated/azure_mgmt_automation/certificate_operations.rb' + autoload :ConnectionOperations, 'generated/azure_mgmt_automation/connection_operations.rb' + autoload :ConnectionTypeOperations, 'generated/azure_mgmt_automation/connection_type_operations.rb' + autoload :CredentialOperations, 'generated/azure_mgmt_automation/credential_operations.rb' + autoload :DscCompilationJobOperations, 'generated/azure_mgmt_automation/dsc_compilation_job_operations.rb' + autoload :DscConfigurationOperations, 'generated/azure_mgmt_automation/dsc_configuration_operations.rb' + autoload :AgentRegistrationInformation, 'generated/azure_mgmt_automation/agent_registration_information.rb' + autoload :DscNodeOperations, 'generated/azure_mgmt_automation/dsc_node_operations.rb' + autoload :NodeReports, 'generated/azure_mgmt_automation/node_reports.rb' + autoload :DscNodeConfigurationOperations, 'generated/azure_mgmt_automation/dsc_node_configuration_operations.rb' + autoload :HybridRunbookWorkerGroupOperations, 'generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb' + autoload :JobOperations, 'generated/azure_mgmt_automation/job_operations.rb' + autoload :JobStreamOperations, 'generated/azure_mgmt_automation/job_stream_operations.rb' + autoload :JobScheduleOperations, 'generated/azure_mgmt_automation/job_schedule_operations.rb' + autoload :ActivityOperations, 'generated/azure_mgmt_automation/activity_operations.rb' + autoload :ModuleModelOperations, 'generated/azure_mgmt_automation/module_model_operations.rb' + autoload :ObjectDataTypes, 'generated/azure_mgmt_automation/object_data_types.rb' + autoload :Fields, 'generated/azure_mgmt_automation/fields.rb' + autoload :RunbookDraftOperations, 'generated/azure_mgmt_automation/runbook_draft_operations.rb' + autoload :RunbookOperations, 'generated/azure_mgmt_automation/runbook_operations.rb' + autoload :TestJobStreams, 'generated/azure_mgmt_automation/test_job_streams.rb' + autoload :TestJobs, 'generated/azure_mgmt_automation/test_jobs.rb' + autoload :ScheduleOperations, 'generated/azure_mgmt_automation/schedule_operations.rb' + autoload :VariableOperations, 'generated/azure_mgmt_automation/variable_operations.rb' + autoload :WebhookOperations, 'generated/azure_mgmt_automation/webhook_operations.rb' + autoload :AutomationClient, 'generated/azure_mgmt_automation/automation_client.rb' + + module Models + autoload :DscCompilationJob, 'generated/azure_mgmt_automation/models/dsc_compilation_job.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_automation/models/error_response.rb' + autoload :DscCompilationJobListResult, 'generated/azure_mgmt_automation/models/dsc_compilation_job_list_result.rb' + autoload :Usage, 'generated/azure_mgmt_automation/models/usage.rb' + autoload :DscConfigurationListResult, 'generated/azure_mgmt_automation/models/dsc_configuration_list_result.rb' + autoload :Statistics, 'generated/azure_mgmt_automation/models/statistics.rb' + autoload :DscConfigurationCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/dsc_configuration_create_or_update_parameters.rb' + autoload :RunbookParameter, 'generated/azure_mgmt_automation/models/runbook_parameter.rb' + autoload :DscMetaConfiguration, 'generated/azure_mgmt_automation/models/dsc_meta_configuration.rb' + autoload :ContentLink, 'generated/azure_mgmt_automation/models/content_link.rb' + autoload :DscNodeConfigurationCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/dsc_node_configuration_create_or_update_parameters.rb' + autoload :ContentHash, 'generated/azure_mgmt_automation/models/content_hash.rb' + autoload :ModuleErrorInfo, 'generated/azure_mgmt_automation/models/module_error_info.rb' + autoload :RunbookDraft, 'generated/azure_mgmt_automation/models/runbook_draft.rb' + autoload :DscNodeConfigurationAssociationProperty, 'generated/azure_mgmt_automation/models/dsc_node_configuration_association_property.rb' + autoload :WebhookCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/webhook_create_or_update_parameters.rb' + autoload :ContentSource, 'generated/azure_mgmt_automation/models/content_source.rb' + autoload :DscNodeConfiguration, 'generated/azure_mgmt_automation/models/dsc_node_configuration.rb' + autoload :WebhookListResult, 'generated/azure_mgmt_automation/models/webhook_list_result.rb' + autoload :DscNodeConfigurationListResult, 'generated/azure_mgmt_automation/models/dsc_node_configuration_list_result.rb' + autoload :Webhook, 'generated/azure_mgmt_automation/models/webhook.rb' + autoload :DscNodeListResult, 'generated/azure_mgmt_automation/models/dsc_node_list_result.rb' + autoload :AutomationAccountListResult, 'generated/azure_mgmt_automation/models/automation_account_list_result.rb' + autoload :DscNodeUpdateParameters, 'generated/azure_mgmt_automation/models/dsc_node_update_parameters.rb' + autoload :Operation, 'generated/azure_mgmt_automation/models/operation.rb' + autoload :DscReportError, 'generated/azure_mgmt_automation/models/dsc_report_error.rb' + autoload :AutomationAccountCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/automation_account_create_or_update_parameters.rb' + autoload :DscReportResourceNavigation, 'generated/azure_mgmt_automation/models/dsc_report_resource_navigation.rb' + autoload :Certificate, 'generated/azure_mgmt_automation/models/certificate.rb' + autoload :DscReportResource, 'generated/azure_mgmt_automation/models/dsc_report_resource.rb' + autoload :CertificateUpdateParameters, 'generated/azure_mgmt_automation/models/certificate_update_parameters.rb' + autoload :DscNodeReport, 'generated/azure_mgmt_automation/models/dsc_node_report.rb' + autoload :ConnectionTypeAssociationProperty, 'generated/azure_mgmt_automation/models/connection_type_association_property.rb' + autoload :DscNodeReportListResult, 'generated/azure_mgmt_automation/models/dsc_node_report_list_result.rb' + autoload :ConnectionListResult, 'generated/azure_mgmt_automation/models/connection_list_result.rb' + autoload :HybridRunbookWorker, 'generated/azure_mgmt_automation/models/hybrid_runbook_worker.rb' + autoload :ConnectionCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/connection_create_or_update_parameters.rb' + autoload :RunAsCredentialAssociationProperty, 'generated/azure_mgmt_automation/models/run_as_credential_association_property.rb' + autoload :ConnectionType, 'generated/azure_mgmt_automation/models/connection_type.rb' + autoload :HybridRunbookWorkerGroup, 'generated/azure_mgmt_automation/models/hybrid_runbook_worker_group.rb' + autoload :ConnectionTypeCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/connection_type_create_or_update_parameters.rb' + autoload :HybridRunbookWorkerGroupsListResult, 'generated/azure_mgmt_automation/models/hybrid_runbook_worker_groups_list_result.rb' + autoload :CredentialListResult, 'generated/azure_mgmt_automation/models/credential_list_result.rb' + autoload :HybridRunbookWorkerGroupUpdateParameters, 'generated/azure_mgmt_automation/models/hybrid_runbook_worker_group_update_parameters.rb' + autoload :CredentialCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/credential_create_or_update_parameters.rb' + autoload :RunbookAssociationProperty, 'generated/azure_mgmt_automation/models/runbook_association_property.rb' + autoload :ActivityParameterSet, 'generated/azure_mgmt_automation/models/activity_parameter_set.rb' + autoload :Job, 'generated/azure_mgmt_automation/models/job.rb' + autoload :Activity, 'generated/azure_mgmt_automation/models/activity.rb' + autoload :JobCreateParameters, 'generated/azure_mgmt_automation/models/job_create_parameters.rb' + autoload :AdvancedScheduleMonthlyOccurrence, 'generated/azure_mgmt_automation/models/advanced_schedule_monthly_occurrence.rb' + autoload :JobListResult, 'generated/azure_mgmt_automation/models/job_list_result.rb' + autoload :AgentRegistrationKeys, 'generated/azure_mgmt_automation/models/agent_registration_keys.rb' + autoload :ScheduleAssociationProperty, 'generated/azure_mgmt_automation/models/schedule_association_property.rb' + autoload :AgentRegistrationRegenerateKeyParameter, 'generated/azure_mgmt_automation/models/agent_registration_regenerate_key_parameter.rb' + autoload :JobScheduleCreateParameters, 'generated/azure_mgmt_automation/models/job_schedule_create_parameters.rb' + autoload :DscCompilationJobCreateParameters, 'generated/azure_mgmt_automation/models/dsc_compilation_job_create_parameters.rb' + autoload :JobSchedule, 'generated/azure_mgmt_automation/models/job_schedule.rb' + autoload :UsageListResult, 'generated/azure_mgmt_automation/models/usage_list_result.rb' + autoload :JobScheduleListResult, 'generated/azure_mgmt_automation/models/job_schedule_list_result.rb' + autoload :JobStream, 'generated/azure_mgmt_automation/models/job_stream.rb' + autoload :DscConfigurationParameter, 'generated/azure_mgmt_automation/models/dsc_configuration_parameter.rb' + autoload :JobStreamListResult, 'generated/azure_mgmt_automation/models/job_stream_list_result.rb' + autoload :Resource, 'generated/azure_mgmt_automation/models/resource.rb' + autoload :ModuleCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/module_create_or_update_parameters.rb' + autoload :OperationListResult, 'generated/azure_mgmt_automation/models/operation_list_result.rb' + autoload :ModuleListResult, 'generated/azure_mgmt_automation/models/module_list_result.rb' + autoload :CertificateListResult, 'generated/azure_mgmt_automation/models/certificate_list_result.rb' + autoload :ModuleUpdateParameters, 'generated/azure_mgmt_automation/models/module_update_parameters.rb' + autoload :Connection, 'generated/azure_mgmt_automation/models/connection.rb' + autoload :RunbookDraftUndoEditResult, 'generated/azure_mgmt_automation/models/runbook_draft_undo_edit_result.rb' + autoload :FieldDefinition, 'generated/azure_mgmt_automation/models/field_definition.rb' + autoload :RunbookCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/runbook_create_or_update_parameters.rb' + autoload :Credential, 'generated/azure_mgmt_automation/models/credential.rb' + autoload :RunbookCreateOrUpdateDraftProperties, 'generated/azure_mgmt_automation/models/runbook_create_or_update_draft_properties.rb' + autoload :ActivityParameter, 'generated/azure_mgmt_automation/models/activity_parameter.rb' + autoload :RunbookCreateOrUpdateDraftParameters, 'generated/azure_mgmt_automation/models/runbook_create_or_update_draft_parameters.rb' + autoload :ActivityListResult, 'generated/azure_mgmt_automation/models/activity_list_result.rb' + autoload :RunbookUpdateParameters, 'generated/azure_mgmt_automation/models/runbook_update_parameters.rb' + autoload :AgentRegistration, 'generated/azure_mgmt_automation/models/agent_registration.rb' + autoload :RunbookListResult, 'generated/azure_mgmt_automation/models/runbook_list_result.rb' + autoload :UsageCounterName, 'generated/azure_mgmt_automation/models/usage_counter_name.rb' + autoload :ScheduleCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/schedule_create_or_update_parameters.rb' + autoload :WebhookUpdateParameters, 'generated/azure_mgmt_automation/models/webhook_update_parameters.rb' + autoload :Schedule, 'generated/azure_mgmt_automation/models/schedule.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_automation/models/operation_display.rb' + autoload :ScheduleUpdateParameters, 'generated/azure_mgmt_automation/models/schedule_update_parameters.rb' + autoload :CertificateCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/certificate_create_or_update_parameters.rb' + autoload :ScheduleListResult, 'generated/azure_mgmt_automation/models/schedule_list_result.rb' + autoload :ConnectionTypeListResult, 'generated/azure_mgmt_automation/models/connection_type_list_result.rb' + autoload :SubResource, 'generated/azure_mgmt_automation/models/sub_resource.rb' + autoload :ActivityOutputType, 'generated/azure_mgmt_automation/models/activity_output_type.rb' + autoload :TestJobCreateParameters, 'generated/azure_mgmt_automation/models/test_job_create_parameters.rb' + autoload :DscConfigurationAssociationProperty, 'generated/azure_mgmt_automation/models/dsc_configuration_association_property.rb' + autoload :TestJob, 'generated/azure_mgmt_automation/models/test_job.rb' + autoload :Sku, 'generated/azure_mgmt_automation/models/sku.rb' + autoload :TypeField, 'generated/azure_mgmt_automation/models/type_field.rb' + autoload :ConnectionUpdateParameters, 'generated/azure_mgmt_automation/models/connection_update_parameters.rb' + autoload :TypeFieldListResult, 'generated/azure_mgmt_automation/models/type_field_list_result.rb' + autoload :AdvancedSchedule, 'generated/azure_mgmt_automation/models/advanced_schedule.rb' + autoload :VariableCreateOrUpdateParameters, 'generated/azure_mgmt_automation/models/variable_create_or_update_parameters.rb' + autoload :AutomationAccountUpdateParameters, 'generated/azure_mgmt_automation/models/automation_account_update_parameters.rb' + autoload :Variable, 'generated/azure_mgmt_automation/models/variable.rb' + autoload :StatisticsListResult, 'generated/azure_mgmt_automation/models/statistics_list_result.rb' + autoload :VariableListResult, 'generated/azure_mgmt_automation/models/variable_list_result.rb' + autoload :CredentialUpdateParameters, 'generated/azure_mgmt_automation/models/credential_update_parameters.rb' + autoload :VariableUpdateParameters, 'generated/azure_mgmt_automation/models/variable_update_parameters.rb' + autoload :Runbook, 'generated/azure_mgmt_automation/models/runbook.rb' + autoload :ModuleModel, 'generated/azure_mgmt_automation/models/module_model.rb' + autoload :DscNode, 'generated/azure_mgmt_automation/models/dsc_node.rb' + autoload :DscConfiguration, 'generated/azure_mgmt_automation/models/dsc_configuration.rb' + autoload :AutomationAccount, 'generated/azure_mgmt_automation/models/automation_account.rb' + autoload :RunbookTypeEnum, 'generated/azure_mgmt_automation/models/runbook_type_enum.rb' + autoload :RunbookState, 'generated/azure_mgmt_automation/models/runbook_state.rb' + autoload :RunbookProvisioningState, 'generated/azure_mgmt_automation/models/runbook_provisioning_state.rb' + autoload :ModuleProvisioningState, 'generated/azure_mgmt_automation/models/module_provisioning_state.rb' + autoload :ContentSourceType, 'generated/azure_mgmt_automation/models/content_source_type.rb' + autoload :DscConfigurationProvisioningState, 'generated/azure_mgmt_automation/models/dsc_configuration_provisioning_state.rb' + autoload :DscConfigurationState, 'generated/azure_mgmt_automation/models/dsc_configuration_state.rb' + autoload :SkuNameEnum, 'generated/azure_mgmt_automation/models/sku_name_enum.rb' + autoload :AutomationAccountState, 'generated/azure_mgmt_automation/models/automation_account_state.rb' + autoload :ScheduleDay, 'generated/azure_mgmt_automation/models/schedule_day.rb' + autoload :AgentRegistrationKeyName, 'generated/azure_mgmt_automation/models/agent_registration_key_name.rb' + autoload :JobStatus, 'generated/azure_mgmt_automation/models/job_status.rb' + autoload :JobStreamType, 'generated/azure_mgmt_automation/models/job_stream_type.rb' + autoload :HttpStatusCode, 'generated/azure_mgmt_automation/models/http_status_code.rb' + autoload :ScheduleFrequency, 'generated/azure_mgmt_automation/models/schedule_frequency.rb' + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/activity_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/activity_operations.rb new file mode 100644 index 0000000000..dacc956320 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/activity_operations.rb @@ -0,0 +1,332 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class ActivityOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the ActivityOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the activity in the module identified by module name and activity + # name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param activity_name [String] The name of activity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Activity] operation results. + # + def get(resource_group_name, automation_account_name, module_name, activity_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, module_name, activity_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the activity in the module identified by module name and activity + # name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param activity_name [String] The name of activity. + # @param custom_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, automation_account_name, module_name, activity_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, module_name, activity_name, custom_headers).value! + end + + # + # Retrieve the activity in the module identified by module name and activity + # name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param activity_name [String] The name of activity. + # @param [Hash{String => String}] 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, automation_account_name, module_name, activity_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, 'activity_name is nil' if activity_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities/{activityName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_name,'activityName' => activity_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Activity.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of activities in the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @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_module(resource_group_name, automation_account_name, module_name, custom_headers = nil) + first_page = list_by_module_as_lazy(resource_group_name, automation_account_name, module_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of activities in the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param custom_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_module_with_http_info(resource_group_name, automation_account_name, module_name, custom_headers = nil) + list_by_module_async(resource_group_name, automation_account_name, module_name, custom_headers).value! + end + + # + # Retrieve a list of activities in the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param [Hash{String => String}] 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_module_async(resource_group_name, automation_account_name, module_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_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::ARM::Automation::Models::ActivityListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of activities in the module identified by module name. + # + # @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 [ActivityListResult] operation results. + # + def list_by_module_next(next_page_link, custom_headers = nil) + response = list_by_module_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of activities in the module identified by module name. + # + # @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_module_next_with_http_info(next_page_link, custom_headers = nil) + list_by_module_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of activities in the module identified by module name. + # + # @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_module_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::ARM::Automation::Models::ActivityListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of activities in the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ActivityListResult] which provide lazy access to pages of the + # response. + # + def list_by_module_as_lazy(resource_group_name, automation_account_name, module_name, custom_headers = nil) + response = list_by_module_async(resource_group_name, automation_account_name, module_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_module_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/agent_registration_information.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/agent_registration_information.rb new file mode 100644 index 0000000000..51a320b629 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/agent_registration_information.rb @@ -0,0 +1,223 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class AgentRegistrationInformation + include MsRestAzure + + # + # Creates and initializes a new instance of the AgentRegistrationInformation class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the automation agent registration information. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AgentRegistration] operation results. + # + def get(resource_group_name, automation_account_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the automation agent registration information. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve the automation agent registration information. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AgentRegistration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a primary or secondary agent registration key + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param parameters [AgentRegistrationRegenerateKeyParameter] The name of the + # agent registration key to be regenerated + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AgentRegistration] operation results. + # + def regenerate_key(resource_group_name, automation_account_name, parameters, custom_headers = nil) + response = regenerate_key_async(resource_group_name, automation_account_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerate a primary or secondary agent registration key + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param parameters [AgentRegistrationRegenerateKeyParameter] The name of the + # agent registration key to be regenerated + # @param custom_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_key_with_http_info(resource_group_name, automation_account_name, parameters, custom_headers = nil) + regenerate_key_async(resource_group_name, automation_account_name, parameters, custom_headers).value! + end + + # + # Regenerate a primary or secondary agent registration key + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param parameters [AgentRegistrationRegenerateKeyParameter] The name of the + # agent registration key to be regenerated + # @param [Hash{String => String}] 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_key_async(resource_group_name, automation_account_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::AgentRegistrationRegenerateKeyParameter.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.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation/regenerateKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AgentRegistration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_automation/lib/generated/azure_mgmt_automation/automation_account_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/automation_account_operations.rb new file mode 100644 index 0000000000..872c8f7eb5 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/automation_account_operations.rb @@ -0,0 +1,822 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class AutomationAccountOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the AutomationAccountOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Update an automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param parameters [AutomationAccountUpdateParameters] Parameters supplied to + # the update automation account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AutomationAccount] operation results. + # + def update(resource_group_name, automation_account_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update an automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param parameters [AutomationAccountUpdateParameters] Parameters supplied to + # the update automation account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def update_with_http_info(resource_group_name, automation_account_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, parameters, custom_headers).value! + end + + # + # Update an automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param parameters [AutomationAccountUpdateParameters] Parameters supplied to + # the update automation account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(resource_group_name, automation_account_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::AutomationAccountUpdateParameters.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.Automation/automationAccounts/{automationAccountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AutomationAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or update automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Parameters supplied to the create or + # update automation account. + # @param parameters [AutomationAccountCreateOrUpdateParameters] Parameters + # supplied to the create or update automation account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AutomationAccount] operation results. + # + def create_or_update(resource_group_name, automation_account_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Parameters supplied to the create or + # update automation account. + # @param parameters [AutomationAccountCreateOrUpdateParameters] Parameters + # supplied to the create or update automation account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, automation_account_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, parameters, custom_headers).value! + end + + # + # Create or update automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Parameters supplied to the create or + # update automation account. + # @param parameters [AutomationAccountCreateOrUpdateParameters] Parameters + # supplied to the create or update automation account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, automation_account_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::AutomationAccountCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_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::ARM::Automation::Models::AutomationAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AutomationAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, custom_headers).value! + nil + end + + # + # Delete an automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Delete an automation account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 information about an Automation Account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AutomationAccount] operation results. + # + def get(resource_group_name, automation_account_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get information about an Automation Account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Get information about an Automation Account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AutomationAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of accounts within a given resource group. + # + # @param resource_group_name [String] The resource group name. + # @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 + + # + # Retrieve a list of accounts within a given resource group. + # + # @param resource_group_name [String] The resource group name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def 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 + + # + # Retrieve a list of accounts within a given resource group. + # + # @param resource_group_name [String] The resource group name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_async(resource_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AutomationAccountListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Automation Accounts within an Azure subscription. + # + # Retrieve a list of accounts within a given 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 the Automation Accounts within an Azure subscription. + # + # Retrieve a list of accounts within a given 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 the Automation Accounts within an Azure subscription. + # + # Retrieve a list of accounts within a given subscription. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AutomationAccountListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of accounts within a given 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 [AutomationAccountListResult] 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 + + # + # Retrieve a list of accounts within a given 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 + + # + # Retrieve a list of accounts within a given 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AutomationAccountListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Automation Accounts within an Azure subscription. + # + # Retrieve a list of accounts within a given 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 [AutomationAccountListResult] 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 Automation Accounts within an Azure subscription. + # + # Retrieve a list of accounts within a given 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 the Automation Accounts within an Azure subscription. + # + # Retrieve a list of accounts within a given 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::AutomationAccountListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of accounts within a given resource group. + # + # @param resource_group_name [String] The resource group name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AutomationAccountListResult] 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 the Automation Accounts within an Azure subscription. + # + # Retrieve a list of accounts within a given subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AutomationAccountListResult] 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_automation/lib/generated/azure_mgmt_automation/automation_client.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/automation_client.rb new file mode 100644 index 0000000000..5aec9db271 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/automation_client.rb @@ -0,0 +1,245 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # A service client - single point of access to the REST API. + # + class AutomationClient < 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] Client Api Version. + attr_reader :api_version + + # @return [String] Gets subscription credentials which uniquely identify + # Microsoft Azure subscription. The subscription ID forms part of the URI + # for every service call. + attr_accessor :subscription_id + + # @return [String] 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 [AutomationAccountOperations] automation_account_operations + attr_reader :automation_account_operations + + # @return [Operations] operations + attr_reader :operations + + # @return [StatisticsOperations] statistics_operations + attr_reader :statistics_operations + + # @return [Usages] usages + attr_reader :usages + + # @return [CertificateOperations] certificate_operations + attr_reader :certificate_operations + + # @return [ConnectionOperations] connection_operations + attr_reader :connection_operations + + # @return [ConnectionTypeOperations] connection_type_operations + attr_reader :connection_type_operations + + # @return [CredentialOperations] credential_operations + attr_reader :credential_operations + + # @return [DscCompilationJobOperations] dsc_compilation_job_operations + attr_reader :dsc_compilation_job_operations + + # @return [DscConfigurationOperations] dsc_configuration_operations + attr_reader :dsc_configuration_operations + + # @return [AgentRegistrationInformation] agent_registration_information + attr_reader :agent_registration_information + + # @return [DscNodeOperations] dsc_node_operations + attr_reader :dsc_node_operations + + # @return [NodeReports] node_reports + attr_reader :node_reports + + # @return [DscNodeConfigurationOperations] + # dsc_node_configuration_operations + attr_reader :dsc_node_configuration_operations + + # @return [HybridRunbookWorkerGroupOperations] + # hybrid_runbook_worker_group_operations + attr_reader :hybrid_runbook_worker_group_operations + + # @return [JobOperations] job_operations + attr_reader :job_operations + + # @return [JobStreamOperations] job_stream_operations + attr_reader :job_stream_operations + + # @return [JobScheduleOperations] job_schedule_operations + attr_reader :job_schedule_operations + + # @return [ActivityOperations] activity_operations + attr_reader :activity_operations + + # @return [ModuleModelOperations] module_model_operations + attr_reader :module_model_operations + + # @return [ObjectDataTypes] object_data_types + attr_reader :object_data_types + + # @return [Fields] fields + attr_reader :fields + + # @return [RunbookDraftOperations] runbook_draft_operations + attr_reader :runbook_draft_operations + + # @return [RunbookOperations] runbook_operations + attr_reader :runbook_operations + + # @return [TestJobStreams] test_job_streams + attr_reader :test_job_streams + + # @return [TestJobs] test_jobs + attr_reader :test_jobs + + # @return [ScheduleOperations] schedule_operations + attr_reader :schedule_operations + + # @return [VariableOperations] variable_operations + attr_reader :variable_operations + + # @return [WebhookOperations] webhook_operations + attr_reader :webhook_operations + + # + # Creates initializes a new instance of the AutomationClient 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 + + @automation_account_operations = AutomationAccountOperations.new(self) + @operations = Operations.new(self) + @statistics_operations = StatisticsOperations.new(self) + @usages = Usages.new(self) + @certificate_operations = CertificateOperations.new(self) + @connection_operations = ConnectionOperations.new(self) + @connection_type_operations = ConnectionTypeOperations.new(self) + @credential_operations = CredentialOperations.new(self) + @dsc_compilation_job_operations = DscCompilationJobOperations.new(self) + @dsc_configuration_operations = DscConfigurationOperations.new(self) + @agent_registration_information = AgentRegistrationInformation.new(self) + @dsc_node_operations = DscNodeOperations.new(self) + @node_reports = NodeReports.new(self) + @dsc_node_configuration_operations = DscNodeConfigurationOperations.new(self) + @hybrid_runbook_worker_group_operations = HybridRunbookWorkerGroupOperations.new(self) + @job_operations = JobOperations.new(self) + @job_stream_operations = JobStreamOperations.new(self) + @job_schedule_operations = JobScheduleOperations.new(self) + @activity_operations = ActivityOperations.new(self) + @module_model_operations = ModuleModelOperations.new(self) + @object_data_types = ObjectDataTypes.new(self) + @fields = Fields.new(self) + @runbook_draft_operations = RunbookDraftOperations.new(self) + @runbook_operations = RunbookOperations.new(self) + @test_job_streams = TestJobStreams.new(self) + @test_jobs = TestJobs.new(self) + @schedule_operations = ScheduleOperations.new(self) + @variable_operations = VariableOperations.new(self) + @webhook_operations = WebhookOperations.new(self) + @api_version = '2015-10-31' + @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_automation' + if defined? Azure::ARM::Automation::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::Automation::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/certificate_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/certificate_operations.rb new file mode 100644 index 0000000000..85eb3e3e4f --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/certificate_operations.rb @@ -0,0 +1,642 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class CertificateOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the CertificateOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The name of certificate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, certificate_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, certificate_name, custom_headers).value! + nil + end + + # + # Delete the certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The name of certificate. + # @param custom_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, automation_account_name, certificate_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, certificate_name, custom_headers).value! + end + + # + # Delete the certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The name of certificate. + # @param [Hash{String => String}] 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, automation_account_name, certificate_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'certificateName' => certificate_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the certificate identified by certificate name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The name of certificate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Certificate] operation results. + # + def get(resource_group_name, automation_account_name, certificate_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, certificate_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the certificate identified by certificate name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The name of certificate. + # @param custom_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, automation_account_name, certificate_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, certificate_name, custom_headers).value! + end + + # + # Retrieve the certificate identified by certificate name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The name of certificate. + # @param [Hash{String => String}] 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, automation_account_name, certificate_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'certificateName' => certificate_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::ARM::Automation::Models::Certificate.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The parameters supplied to the create or + # update certificate operation. + # @param parameters [CertificateCreateOrUpdateParameters] The parameters + # supplied to the create or update certificate operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Certificate] operation results. + # + def create_or_update(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The parameters supplied to the create or + # update certificate operation. + # @param parameters [CertificateCreateOrUpdateParameters] The parameters + # supplied to the create or update certificate 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 create_or_update_with_http_info(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers).value! + end + + # + # Create a certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The parameters supplied to the create or + # update certificate operation. + # @param parameters [CertificateCreateOrUpdateParameters] The parameters + # supplied to the create or update certificate 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 create_or_update_async(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::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.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'certificateName' => certificate_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::ARM::Automation::Models::Certificate.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Certificate.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The parameters supplied to the update + # certificate operation. + # @param parameters [CertificateUpdateParameters] The parameters supplied to + # the update certificate operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Certificate] operation results. + # + def update(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update a certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The parameters supplied to the update + # certificate operation. + # @param parameters [CertificateUpdateParameters] The parameters supplied to + # the update certificate 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 update_with_http_info(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers).value! + end + + # + # Update a certificate. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param certificate_name [String] The parameters supplied to the update + # certificate operation. + # @param parameters [CertificateUpdateParameters] The parameters supplied to + # the update certificate 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 update_async(resource_group_name, automation_account_name, certificate_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::CertificateUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'certificateName' => certificate_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Certificate.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of certificates. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of certificates. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of certificates. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/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,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::CertificateListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of certificates. + # + # @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 [CertificateListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of certificates. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of certificates. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::CertificateListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of certificates. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/connection_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/connection_operations.rb new file mode 100644 index 0000000000..50eb06d025 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/connection_operations.rb @@ -0,0 +1,653 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class ConnectionOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the ConnectionOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The name of connection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Connection] operation results. + # + def delete(resource_group_name, automation_account_name, connection_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, connection_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Delete the connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The name of connection. + # @param custom_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, automation_account_name, connection_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, connection_name, custom_headers).value! + end + + # + # Delete the connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The name of connection. + # @param [Hash{String => String}] 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, automation_account_name, connection_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'connection_name is nil' if connection_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'connectionName' => connection_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? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Connection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the connection identified by connection name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The name of connection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Connection] operation results. + # + def get(resource_group_name, automation_account_name, connection_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, connection_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the connection identified by connection name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The name of connection. + # @param custom_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, automation_account_name, connection_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, connection_name, custom_headers).value! + end + + # + # Retrieve the connection identified by connection name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The name of connection. + # @param [Hash{String => String}] 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, automation_account_name, connection_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'connection_name is nil' if connection_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'connectionName' => connection_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::ARM::Automation::Models::Connection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or update a connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The parameters supplied to the create or + # update connection operation. + # @param parameters [ConnectionCreateOrUpdateParameters] The parameters + # supplied to the create or update connection operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Connection] operation results. + # + def create_or_update(resource_group_name, automation_account_name, connection_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update a connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The parameters supplied to the create or + # update connection operation. + # @param parameters [ConnectionCreateOrUpdateParameters] The parameters + # supplied to the create or update connection 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 create_or_update_with_http_info(resource_group_name, automation_account_name, connection_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers).value! + end + + # + # Create or update a connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The parameters supplied to the create or + # update connection operation. + # @param parameters [ConnectionCreateOrUpdateParameters] The parameters + # supplied to the create or update connection 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 create_or_update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'connection_name is nil' if connection_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::ConnectionCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'connectionName' => connection_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::ARM::Automation::Models::Connection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Connection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The parameters supplied to the update a + # connection operation. + # @param parameters [ConnectionUpdateParameters] The parameters supplied to the + # update a connection operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Connection] operation results. + # + def update(resource_group_name, automation_account_name, connection_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update a connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The parameters supplied to the update a + # connection operation. + # @param parameters [ConnectionUpdateParameters] The parameters supplied to the + # update a connection 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 update_with_http_info(resource_group_name, automation_account_name, connection_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers).value! + end + + # + # Update a connection. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_name [String] The parameters supplied to the update a + # connection operation. + # @param parameters [ConnectionUpdateParameters] The parameters supplied to the + # update a connection 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 update_async(resource_group_name, automation_account_name, connection_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'connection_name is nil' if connection_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::ConnectionUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'connectionName' => connection_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Connection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of connections. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of connections. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of connections. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ConnectionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of connections. + # + # @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 [ConnectionListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of connections. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of connections. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ConnectionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of connections. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectionListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/connection_type_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/connection_type_operations.rb new file mode 100644 index 0000000000..bce9c70e88 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/connection_type_operations.rb @@ -0,0 +1,528 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class ConnectionTypeOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the ConnectionTypeOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the connectiontype. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The name of connectiontype. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, connection_type_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, connection_type_name, custom_headers).value! + nil + end + + # + # Delete the connectiontype. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The name of connectiontype. + # @param custom_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, automation_account_name, connection_type_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, connection_type_name, custom_headers).value! + end + + # + # Delete the connectiontype. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The name of connectiontype. + # @param [Hash{String => String}] 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, automation_account_name, connection_type_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'connection_type_name is nil' if connection_type_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'connectionTypeName' => connection_type_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 + + # + # Retrieve the connectiontype identified by connectiontype name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The name of connectiontype. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectionType] operation results. + # + def get(resource_group_name, automation_account_name, connection_type_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, connection_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the connectiontype identified by connectiontype name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The name of connectiontype. + # @param custom_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, automation_account_name, connection_type_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, connection_type_name, custom_headers).value! + end + + # + # Retrieve the connectiontype identified by connectiontype name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The name of connectiontype. + # @param [Hash{String => String}] 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, automation_account_name, connection_type_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'connection_type_name is nil' if connection_type_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'connectionTypeName' => connection_type_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::ARM::Automation::Models::ConnectionType.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a connectiontype. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The parameters supplied to the create or + # update connectiontype operation. + # @param parameters [ConnectionTypeCreateOrUpdateParameters] The parameters + # supplied to the create or update connectiontype operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectionType] operation results. + # + def create_or_update(resource_group_name, automation_account_name, connection_type_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, connection_type_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a connectiontype. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The parameters supplied to the create or + # update connectiontype operation. + # @param parameters [ConnectionTypeCreateOrUpdateParameters] The parameters + # supplied to the create or update connectiontype 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 create_or_update_with_http_info(resource_group_name, automation_account_name, connection_type_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, connection_type_name, parameters, custom_headers).value! + end + + # + # Create a connectiontype. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param connection_type_name [String] The parameters supplied to the create or + # update connectiontype operation. + # @param parameters [ConnectionTypeCreateOrUpdateParameters] The parameters + # supplied to the create or update connectiontype 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 create_or_update_async(resource_group_name, automation_account_name, connection_type_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'connection_type_name is nil' if connection_type_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::ConnectionTypeCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'connectionTypeName' => connection_type_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 == 409 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ConnectionType.mapper() + result.body = @client.deserialize(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 == 409 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ConnectionType.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of connectiontypes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of connectiontypes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of connectiontypes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ConnectionTypeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of connectiontypes. + # + # @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 [ConnectionTypeListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of connectiontypes. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of connectiontypes. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ConnectionTypeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of connectiontypes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectionTypeListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/credential_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/credential_operations.rb new file mode 100644 index 0000000000..f7107d9ad9 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/credential_operations.rb @@ -0,0 +1,642 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class CredentialOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the CredentialOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The name of credential. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, credential_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, credential_name, custom_headers).value! + nil + end + + # + # Delete the credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The name of credential. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, credential_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, credential_name, custom_headers).value! + end + + # + # Delete the credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The name of credential. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, credential_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'credential_name is nil' if credential_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'credentialName' => credential_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the credential identified by credential name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The name of credential. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Credential] operation results. + # + def get(resource_group_name, automation_account_name, credential_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, credential_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the credential identified by credential name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The name of credential. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, credential_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, credential_name, custom_headers).value! + end + + # + # Retrieve the credential identified by credential name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The name of credential. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, credential_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'credential_name is nil' if credential_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'credentialName' => credential_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Credential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The parameters supplied to the create or + # update credential operation. + # @param parameters [CredentialCreateOrUpdateParameters] The parameters + # supplied to the create or update credential operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Credential] operation results. + # + def create_or_update(resource_group_name, automation_account_name, credential_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, credential_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The parameters supplied to the create or + # update credential operation. + # @param parameters [CredentialCreateOrUpdateParameters] The parameters + # supplied to the create or update credential 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 create_or_update_with_http_info(resource_group_name, automation_account_name, credential_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, credential_name, parameters, custom_headers).value! + end + + # + # Create a credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The parameters supplied to the create or + # update credential operation. + # @param parameters [CredentialCreateOrUpdateParameters] The parameters + # supplied to the create or update credential 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 create_or_update_async(resource_group_name, automation_account_name, credential_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'credential_name is nil' if credential_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::CredentialCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'credentialName' => credential_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 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::ARM::Automation::Models::Credential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Credential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The parameters supplied to the Update + # credential operation. + # @param parameters [CredentialUpdateParameters] The parameters supplied to the + # Update credential operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Credential] operation results. + # + def update(resource_group_name, automation_account_name, credential_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, credential_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update a credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The parameters supplied to the Update + # credential operation. + # @param parameters [CredentialUpdateParameters] The parameters supplied to the + # Update credential 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 update_with_http_info(resource_group_name, automation_account_name, credential_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, credential_name, parameters, custom_headers).value! + end + + # + # Update a credential. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param credential_name [String] The parameters supplied to the Update + # credential operation. + # @param parameters [CredentialUpdateParameters] The parameters supplied to the + # Update credential 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 update_async(resource_group_name, automation_account_name, credential_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'credential_name is nil' if credential_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::CredentialUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'credentialName' => credential_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Credential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of credentials. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of credentials. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of credentials. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::CredentialListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of credentials. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CredentialListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of credentials. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of credentials. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::CredentialListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of credentials. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CredentialListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb new file mode 100644 index 0000000000..a16440e8ba --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb @@ -0,0 +1,534 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class DscCompilationJobOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DscCompilationJobOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Creates the Dsc compilation job of the configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param compilation_job_id The the DSC configuration Id. + # @param parameters [DscCompilationJobCreateParameters] The parameters supplied + # to the create compilation job operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscCompilationJob] operation results. + # + def create(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers = nil) + response = create_async(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates the Dsc compilation job of the configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param compilation_job_id The the DSC configuration Id. + # @param parameters [DscCompilationJobCreateParameters] The parameters supplied + # to the create compilation job 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 create_with_http_info(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers = nil) + create_async(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers).value! + end + + # + # Creates the Dsc compilation job of the configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param compilation_job_id The the DSC configuration Id. + # @param parameters [DscCompilationJobCreateParameters] The parameters supplied + # to the create compilation job 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 create_async(resource_group_name, automation_account_name, compilation_job_id, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'compilation_job_id is nil' if compilation_job_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::DscCompilationJobCreateParameters.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.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'compilationJobId' => compilation_job_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 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscCompilationJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the Dsc configuration compilation job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param compilation_job_id The Dsc configuration compilation job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscCompilationJob] operation results. + # + def get(resource_group_name, automation_account_name, compilation_job_id, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, compilation_job_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the Dsc configuration compilation job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param compilation_job_id The Dsc configuration compilation job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, compilation_job_id, custom_headers = nil) + get_async(resource_group_name, automation_account_name, compilation_job_id, custom_headers).value! + end + + # + # Retrieve the Dsc configuration compilation job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param compilation_job_id The Dsc configuration compilation job id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, compilation_job_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'compilation_job_id is nil' if compilation_job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'compilationJobId' => compilation_job_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::ARM::Automation::Models::DscCompilationJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc compilation jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @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_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of dsc compilation jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + end + + # + # Retrieve a list of dsc compilation jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::DscCompilationJobListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the job stream identified by job stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param job_stream_id [String] The job stream id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStream] operation results. + # + def get_stream(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil) + response = get_stream_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the job stream identified by job stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param job_stream_id [String] The job stream id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_stream_with_http_info(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil) + get_stream_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers).value! + end + + # + # Retrieve the job stream identified by job stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param job_stream_id [String] The job stream id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_stream_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, 'job_stream_id is nil' if job_stream_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_id,'jobStreamId' => job_stream_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::ARM::Automation::Models::JobStream.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc compilation jobs. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscCompilationJobListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of dsc compilation jobs. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of dsc compilation jobs. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscCompilationJobListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc compilation jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscCompilationJobListResult] which provide lazy access to pages of + # the response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_configuration_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_configuration_operations.rb new file mode 100644 index 0000000000..d815e8ea34 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_configuration_operations.rb @@ -0,0 +1,629 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class DscConfigurationOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DscConfigurationOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the dsc configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, configuration_name, custom_headers).value! + nil + end + + # + # Delete the dsc configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, configuration_name, custom_headers).value! + end + + # + # Delete the dsc configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'configuration_name is nil' if configuration_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'configurationName' => configuration_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 + + # + # Retrieve the configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscConfiguration] operation results. + # + def get(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, configuration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, configuration_name, custom_headers).value! + end + + # + # Retrieve the configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'configuration_name is nil' if configuration_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'configurationName' => configuration_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::ARM::Automation::Models::DscConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The create or update parameters for + # configuration. + # @param parameters [DscConfigurationCreateOrUpdateParameters] The create or + # update parameters for configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscConfiguration] operation results. + # + def create_or_update(resource_group_name, automation_account_name, configuration_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, configuration_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create the configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The create or update parameters for + # configuration. + # @param parameters [DscConfigurationCreateOrUpdateParameters] The create or + # update parameters for configuration. + # @param custom_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, automation_account_name, configuration_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, configuration_name, parameters, custom_headers).value! + end + + # + # Create the configuration identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The create or update parameters for + # configuration. + # @param parameters [DscConfigurationCreateOrUpdateParameters] The create or + # update parameters for configuration. + # @param [Hash{String => String}] 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, automation_account_name, configuration_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'configuration_name is nil' if configuration_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::DscConfigurationCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'configurationName' => configuration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the configuration script identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NOT_IMPLEMENTED] operation results. + # + def get_content(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + response = get_content_async(resource_group_name, automation_account_name, configuration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the configuration script identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_content_with_http_info(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + get_content_async(resource_group_name, automation_account_name, configuration_name, custom_headers).value! + end + + # + # Retrieve the configuration script identified by configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param configuration_name [String] The configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_content_async(resource_group_name, automation_account_name, configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'configuration_name is nil' if configuration_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}/content' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'configurationName' => configuration_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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of configurations. + # + # @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 [DscConfigurationListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of configurations. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of configurations. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscConfigurationListResult] which provide lazy access to pages of + # the response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_node_configuration_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_node_configuration_operations.rb new file mode 100644 index 0000000000..0ddaaaeaa0 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_node_configuration_operations.rb @@ -0,0 +1,532 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class DscNodeConfigurationOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DscNodeConfigurationOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the Dsc node configurations by node configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The Dsc node configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value! + nil + end + + # + # Delete the Dsc node configurations by node configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The Dsc node configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value! + end + + # + # Delete the Dsc node configurations by node configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The Dsc node configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_configuration_name is nil' if node_configuration_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeConfigurationName' => node_configuration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the Dsc node configurations by node configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The Dsc node configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNodeConfiguration] operation results. + # + def get(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the Dsc node configurations by node configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The Dsc node configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value! + end + + # + # Retrieve the Dsc node configurations by node configuration. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The Dsc node configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_configuration_name is nil' if node_configuration_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeConfigurationName' => node_configuration_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::ARM::Automation::Models::DscNodeConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the node configuration identified by node configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The create or update parameters for + # configuration. + # @param parameters [DscNodeConfigurationCreateOrUpdateParameters] The create + # or update parameters for configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNodeConfiguration] operation results. + # + def create_or_update(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create the node configuration identified by node configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The create or update parameters for + # configuration. + # @param parameters [DscNodeConfigurationCreateOrUpdateParameters] The create + # or update parameters for configuration. + # @param custom_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, automation_account_name, node_configuration_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers).value! + end + + # + # Create the node configuration identified by node configuration name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_configuration_name [String] The create or update parameters for + # configuration. + # @param parameters [DscNodeConfigurationCreateOrUpdateParameters] The create + # or update parameters for configuration. + # @param [Hash{String => String}] 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, automation_account_name, node_configuration_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_configuration_name is nil' if node_configuration_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::DscNodeConfigurationCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeConfigurationName' => node_configuration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscNodeConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscNodeConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc node configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @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_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of dsc node configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + end + + # + # Retrieve a list of dsc node configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::DscNodeConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc node configurations. + # + # @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 [DscNodeConfigurationListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of dsc node configurations. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of dsc node configurations. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscNodeConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc node configurations. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNodeConfigurationListResult] which provide lazy access to pages + # of the response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_node_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_node_operations.rb new file mode 100644 index 0000000000..7540b8f15e --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/dsc_node_operations.rb @@ -0,0 +1,530 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class DscNodeOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DscNodeOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the dsc node identified by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param node_id [String] The node id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNode] operation results. + # + def delete(resource_group_name, automation_account_name, node_id, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, node_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Delete the dsc node identified by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param node_id [String] The node id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, node_id, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, node_id, custom_headers).value! + end + + # + # Delete the dsc node identified by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param node_id [String] The node id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, node_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_id is nil' if node_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeId' => node_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 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscNode.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the dsc node identified by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The node id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNode] operation results. + # + def get(resource_group_name, automation_account_name, node_id, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, node_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the dsc node identified by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The node id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, node_id, custom_headers = nil) + get_async(resource_group_name, automation_account_name, node_id, custom_headers).value! + end + + # + # Retrieve the dsc node identified by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The node id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, node_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_id is nil' if node_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeId' => node_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::ARM::Automation::Models::DscNode.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the dsc node. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] Parameters supplied to the update dsc node. + # @param parameters [DscNodeUpdateParameters] Parameters supplied to the update + # dsc node. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNode] operation results. + # + def update(resource_group_name, automation_account_name, node_id, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, node_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update the dsc node. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] Parameters supplied to the update dsc node. + # @param parameters [DscNodeUpdateParameters] Parameters supplied to the update + # dsc node. + # @param custom_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, automation_account_name, node_id, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, node_id, parameters, custom_headers).value! + end + + # + # Update the dsc node. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] Parameters supplied to the update dsc node. + # @param parameters [DscNodeUpdateParameters] Parameters supplied to the update + # dsc node. + # @param [Hash{String => String}] 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, automation_account_name, node_id, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_id is nil' if node_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::DscNodeUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeId' => node_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 == 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::ARM::Automation::Models::DscNode.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc nodes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @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_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of dsc nodes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + end + + # + # Retrieve a list of dsc nodes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::DscNodeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc nodes. + # + # @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 [DscNodeListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of dsc nodes. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of dsc nodes. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::DscNodeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of dsc nodes. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNodeListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/fields.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/fields.rb new file mode 100644 index 0000000000..b7cc94ff52 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/fields.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::ARM::Automation + # + # Automation Client + # + class Fields + include MsRestAzure + + # + # Creates and initializes a new instance of the Fields class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve a list of fields of a given type identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param type_name [String] The name of type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TypeFieldListResult] operation results. + # + def list_by_type(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil) + response = list_by_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of fields of a given type identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param type_name [String] The name of type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_type_with_http_info(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil) + list_by_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers).value! + end + + # + # Retrieve a list of fields of a given type identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param type_name [String] The name of type. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, 'type_name is nil' if type_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/types/{typeName}/fields' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_name,'typeName' => type_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::ARM::Automation::Models::TypeFieldListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_automation/lib/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb new file mode 100644 index 0000000000..1a7264b7ee --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb @@ -0,0 +1,524 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class HybridRunbookWorkerGroupOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the HybridRunbookWorkerGroupOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value! + nil + end + + # + # Delete a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value! + end + + # + # Delete a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] Automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'hybrid_runbook_worker_group_name is nil' if hybrid_runbook_worker_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'hybridRunbookWorkerGroupName' => hybrid_runbook_worker_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HybridRunbookWorkerGroup] operation results. + # + def get(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value! + end + + # + # Retrieve a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'hybrid_runbook_worker_group_name is nil' if hybrid_runbook_worker_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'hybridRunbookWorkerGroupName' => hybrid_runbook_worker_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param parameters [HybridRunbookWorkerGroupUpdateParameters] The hybrid + # runbook worker group + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HybridRunbookWorkerGroup] operation results. + # + def update(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param parameters [HybridRunbookWorkerGroupUpdateParameters] The hybrid + # runbook worker 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 update_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers).value! + end + + # + # Update a hybrid runbook worker group. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker + # group name + # @param parameters [HybridRunbookWorkerGroupUpdateParameters] The hybrid + # runbook worker 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 update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'hybrid_runbook_worker_group_name is nil' if hybrid_runbook_worker_group_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroupUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'hybridRunbookWorkerGroupName' => hybrid_runbook_worker_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of hybrid runbook worker groups. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of hybrid runbook worker groups. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of hybrid runbook worker groups. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroupsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of hybrid runbook worker 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 [HybridRunbookWorkerGroupsListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of hybrid runbook worker 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_by_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of hybrid runbook worker 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_by_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroupsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of hybrid runbook worker groups. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HybridRunbookWorkerGroupsListResult] which provide lazy access to + # pages of the response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_operations.rb new file mode 100644 index 0000000000..bb9964e00c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_operations.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::ARM::Automation + # + # Automation Client + # + class JobOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the JobOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the job output identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NOT_IMPLEMENTED] operation results. + # + def get_output(resource_group_name, automation_account_name, job_id, custom_headers = nil) + response = get_output_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the job output identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_output_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers = nil) + get_output_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + end + + # + # Retrieve the job output identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_output_async(resource_group_name, automation_account_name, job_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/output' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the runbook content of the job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NOT_IMPLEMENTED] operation results. + # + def get_runbook_content(resource_group_name, automation_account_name, job_id, custom_headers = nil) + response = get_runbook_content_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the runbook content of the job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_runbook_content_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers = nil) + get_runbook_content_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + end + + # + # Retrieve the runbook content of the job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_runbook_content_async(resource_group_name, automation_account_name, job_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/runbookContent' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Suspend the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def suspend(resource_group_name, automation_account_name, job_id, custom_headers = nil) + response = suspend_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + nil + end + + # + # Suspend the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def suspend_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers = nil) + suspend_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + end + + # + # Suspend the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def suspend_async(resource_group_name, automation_account_name, job_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/suspend' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Stop the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def stop(resource_group_name, automation_account_name, job_id, custom_headers = nil) + response = stop_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + nil + end + + # + # Stop the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def stop_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers = nil) + stop_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + end + + # + # Stop the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def stop_async(resource_group_name, automation_account_name, job_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/stop' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def get(resource_group_name, automation_account_name, job_id, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers = nil) + get_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + end + + # + # Retrieve the job identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, job_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_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::ARM::Automation::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Create a job of the runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param parameters [JobCreateParameters] The parameters supplied to the create + # job operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def create(resource_group_name, automation_account_name, job_id, parameters, custom_headers = nil) + response = create_async(resource_group_name, automation_account_name, job_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a job of the runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param parameters [JobCreateParameters] The parameters supplied to the create + # job 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 create_with_http_info(resource_group_name, automation_account_name, job_id, parameters, custom_headers = nil) + create_async(resource_group_name, automation_account_name, job_id, parameters, custom_headers).value! + end + + # + # Create a job of the runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param parameters [JobCreateParameters] The parameters supplied to the create + # job 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 create_async(resource_group_name, automation_account_name, job_id, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::JobCreateParameters.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.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_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 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @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_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + end + + # + # Retrieve a list of jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::JobListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Resume the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def resume(resource_group_name, automation_account_name, job_id, custom_headers = nil) + response = resume_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + nil + end + + # + # Resume the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def resume_with_http_info(resource_group_name, automation_account_name, job_id, custom_headers = nil) + resume_async(resource_group_name, automation_account_name, job_id, custom_headers).value! + end + + # + # Resume the job identified by jobId. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id The job id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def resume_async(resource_group_name, automation_account_name, job_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/resume' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve a list of jobs. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of jobs. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of jobs. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::JobListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of jobs. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobListResult] which provide lazy access to pages of the response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_schedule_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_schedule_operations.rb new file mode 100644 index 0000000000..cb795b6ba8 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_schedule_operations.rb @@ -0,0 +1,515 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class JobScheduleOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the JobScheduleOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the job schedule identified by job schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, job_schedule_id, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers).value! + nil + end + + # + # Delete the job schedule identified by job schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, job_schedule_id, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers).value! + end + + # + # Delete the job schedule identified by job schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_schedule_id is nil' if job_schedule_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobScheduleId' => job_schedule_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 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the job schedule identified by job schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobSchedule] operation results. + # + def get(resource_group_name, automation_account_name, job_schedule_id, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the job schedule identified by job schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, job_schedule_id, custom_headers = nil) + get_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers).value! + end + + # + # Retrieve the job schedule identified by job schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, job_schedule_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_schedule_id is nil' if job_schedule_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobScheduleId' => job_schedule_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::ARM::Automation::Models::JobSchedule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a job schedule. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param parameters [JobScheduleCreateParameters] The parameters supplied to + # the create job schedule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobSchedule] operation results. + # + def create(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers = nil) + response = create_async(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a job schedule. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param parameters [JobScheduleCreateParameters] The parameters supplied to + # the create job schedule 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 create_with_http_info(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers = nil) + create_async(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers).value! + end + + # + # Create a job schedule. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_schedule_id The job schedule name. + # @param parameters [JobScheduleCreateParameters] The parameters supplied to + # the create job schedule 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 create_async(resource_group_name, automation_account_name, job_schedule_id, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_schedule_id is nil' if job_schedule_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::JobScheduleCreateParameters.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.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobScheduleId' => job_schedule_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 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::JobSchedule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of job schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of job schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of job schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::JobScheduleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of job schedules. + # + # @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 [JobScheduleListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of job schedules. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of job schedules. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::JobScheduleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of job schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobScheduleListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_stream_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_stream_operations.rb new file mode 100644 index 0000000000..092a2c343c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/job_stream_operations.rb @@ -0,0 +1,333 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class JobStreamOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the JobStreamOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the job stream identified by job stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param job_stream_id [String] The job stream id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStream] operation results. + # + def get(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the job stream identified by job stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param job_stream_id [String] The job stream id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil) + get_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers).value! + end + + # + # Retrieve the job stream identified by job stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job id. + # @param job_stream_id [String] The job stream id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, 'job_stream_id is nil' if job_stream_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/streams/{jobStreamId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_id,'jobStreamId' => job_stream_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::ARM::Automation::Models::JobStream.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of jobs streams identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job Id. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_job(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil) + first_page = list_by_job_as_lazy(resource_group_name, automation_account_name, job_id, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of jobs streams identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job Id. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_job_with_http_info(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil) + list_by_job_async(resource_group_name, automation_account_name, job_id, filter, custom_headers).value! + end + + # + # Retrieve a list of jobs streams identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job Id. + # @param filter [String] The filter to apply on the operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_job_async(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'job_id is nil' if job_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/streams' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::JobStreamListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of jobs streams identified by job id. + # + # @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 [JobStreamListResult] operation results. + # + def list_by_job_next(next_page_link, custom_headers = nil) + response = list_by_job_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of jobs streams identified by job id. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_job_next_with_http_info(next_page_link, custom_headers = nil) + list_by_job_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of jobs streams identified by job id. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_job_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::JobStreamListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of jobs streams identified by job id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param job_id [String] The job Id. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStreamListResult] which provide lazy access to pages of the + # response. + # + def list_by_job_as_lazy(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil) + response = list_by_job_async(resource_group_name, automation_account_name, job_id, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_job_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity.rb new file mode 100644 index 0000000000..47dca94a1a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity.rb @@ -0,0 +1,133 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the activity. + # + class Activity + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [String] Gets the name of the activity. + attr_accessor :name + + # @return [String] Gets or sets the user name of the activity. + attr_accessor :definition + + # @return [Array] Gets or sets the parameter sets + # of the activity. + attr_accessor :parameter_sets + + # @return [Array] Gets or sets the output types of + # the activity. + attr_accessor :output_types + + # @return [DateTime] Gets or sets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for Activity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Activity', + type: { + name: 'Composite', + class_name: 'Activity', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + definition: { + required: false, + serialized_name: 'properties.definition', + type: { + name: 'String' + } + }, + parameter_sets: { + required: false, + serialized_name: 'properties.parameterSets', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ActivityParameterSetElementType', + type: { + name: 'Composite', + class_name: 'ActivityParameterSet' + } + } + } + }, + output_types: { + required: false, + serialized_name: 'properties.outputTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ActivityOutputTypeElementType', + type: { + name: 'Composite', + class_name: 'ActivityOutputType' + } + } + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_list_result.rb new file mode 100644 index 0000000000..1c7c908516 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_list_result.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::ARM::Automation + module Models + # + # The response model for the list activity operation. + # + class ActivityListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of activities. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [ActivityListResult] 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 ActivityListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ActivityListResult', + type: { + name: 'Composite', + class_name: 'ActivityListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ActivityElementType', + type: { + name: 'Composite', + class_name: 'Activity' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_output_type.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_output_type.rb new file mode 100644 index 0000000000..63f4e61570 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_output_type.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::ARM::Automation + module Models + # + # Definition of the activity output type. + # + class ActivityOutputType + + include MsRestAzure + + # @return [String] Gets or sets the name of the activity output type. + attr_accessor :name + + # @return [String] Gets or sets the type of the activity output type. + attr_accessor :type + + + # + # Mapper for ActivityOutputType class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ActivityOutputType', + type: { + name: 'Composite', + class_name: 'ActivityOutputType', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_parameter.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_parameter.rb new file mode 100644 index 0000000000..2e5eac8d43 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_parameter.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::ARM::Automation + module Models + # + # Definition of the activity parameter. + # + class ActivityParameter + + include MsRestAzure + + # @return [String] Gets or sets the name of the activity parameter. + attr_accessor :name + + # @return [String] Gets or sets the type of the activity parameter. + attr_accessor :type + + # @return [Boolean] Gets or sets a Boolean value that indicates true if + # the parameter is required. If the value is false, the parameter is + # optional. + attr_accessor :is_mandatory + + # @return [Boolean] Gets or sets a Boolean value that indicates true if + # the parameter is dynamic. + attr_accessor :is_dynamic + + # @return [Boolean] Gets or sets the position of the activity parameter. + attr_accessor :position + + # @return [Boolean] Gets or sets a Boolean value that indicates true if + # the parameter can take values from the incoming pipeline objects. This + # setting is used if the cmdlet must access the complete input object. + # false indicates that the parameter cannot take values from the complete + # input object. + attr_accessor :value_from_pipeline + + # @return [Boolean] Gets or sets a Boolean value that indicates true if + # the parameter can be filled from a property of the incoming pipeline + # object that has the same name as this parameter. false indicates that + # the parameter cannot be filled from the incoming pipeline object + # property with the same name. + attr_accessor :value_from_pipeline_by_property_name + + # @return [Boolean] Gets or sets a Boolean value that indicates true if + # the cmdlet parameter accepts all the remaining command-line arguments + # that are associated with this parameter in the form of an array. false + # if the cmdlet parameter does not accept all the remaining argument + # values. + attr_accessor :value_from_remaining_arguments + + + # + # Mapper for ActivityParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ActivityParameter', + type: { + name: 'Composite', + class_name: 'ActivityParameter', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + is_mandatory: { + required: false, + serialized_name: 'isMandatory', + type: { + name: 'Boolean' + } + }, + is_dynamic: { + required: false, + serialized_name: 'isDynamic', + type: { + name: 'Boolean' + } + }, + position: { + required: false, + serialized_name: 'position', + type: { + name: 'Boolean' + } + }, + value_from_pipeline: { + required: false, + serialized_name: 'valueFromPipeline', + type: { + name: 'Boolean' + } + }, + value_from_pipeline_by_property_name: { + required: false, + serialized_name: 'valueFromPipelineByPropertyName', + type: { + name: 'Boolean' + } + }, + value_from_remaining_arguments: { + required: false, + serialized_name: 'valueFromRemainingArguments', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_parameter_set.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_parameter_set.rb new file mode 100644 index 0000000000..045bb4c158 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/activity_parameter_set.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the activity parameter set. + # + class ActivityParameterSet + + include MsRestAzure + + # @return [String] Gets or sets the name of the activity parameter set. + attr_accessor :name + + # @return [Array] Gets or sets the parameters of the + # activity parameter set. + attr_accessor :parameters + + + # + # Mapper for ActivityParameterSet class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ActivityParameterSet', + type: { + name: 'Composite', + class_name: 'ActivityParameterSet', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'parameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ActivityParameterElementType', + type: { + name: 'Composite', + class_name: 'ActivityParameter' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/advanced_schedule.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/advanced_schedule.rb new file mode 100644 index 0000000000..4fb46ed65d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/advanced_schedule.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::ARM::Automation + module Models + # + # The properties of the create Advanced Schedule. + # + class AdvancedSchedule + + include MsRestAzure + + # @return [Array] Days of the week that the job should execute + # on. + attr_accessor :week_days + + # @return [Array] Days of the month that the job should execute + # on. Must be between 1 and 31. + attr_accessor :month_days + + # @return [Array] Occurrences of days + # within a month. + attr_accessor :monthly_occurrences + + + # + # Mapper for AdvancedSchedule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AdvancedSchedule', + type: { + name: 'Composite', + class_name: 'AdvancedSchedule', + model_properties: { + week_days: { + required: false, + serialized_name: 'weekDays', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + month_days: { + required: false, + serialized_name: 'monthDays', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NumberElementType', + type: { + name: 'Number' + } + } + } + }, + monthly_occurrences: { + required: false, + serialized_name: 'monthlyOccurrences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AdvancedScheduleMonthlyOccurrenceElementType', + type: { + name: 'Composite', + class_name: 'AdvancedScheduleMonthlyOccurrence' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/advanced_schedule_monthly_occurrence.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/advanced_schedule_monthly_occurrence.rb new file mode 100644 index 0000000000..b22bbbb8af --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/advanced_schedule_monthly_occurrence.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::ARM::Automation + module Models + # + # The properties of the create advanced schedule monthly occurrence. + # + class AdvancedScheduleMonthlyOccurrence + + include MsRestAzure + + # @return [Integer] Occurrence of the week within the month. Must be + # between 1 and 5 + attr_accessor :occurrence + + # @return [ScheduleDay] Day of the occurrence. Must be one of monday, + # tuesday, wednesday,thursday, friday, saturday, sunday. Possible values + # include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + # 'Saturday', 'Sunday' + attr_accessor :day + + + # + # Mapper for AdvancedScheduleMonthlyOccurrence class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AdvancedScheduleMonthlyOccurrence', + type: { + name: 'Composite', + class_name: 'AdvancedScheduleMonthlyOccurrence', + model_properties: { + occurrence: { + required: false, + serialized_name: 'occurrence', + type: { + name: 'Number' + } + }, + day: { + required: false, + serialized_name: 'day', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration.rb new file mode 100644 index 0000000000..6e719de416 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the agent registration infomration type. + # + class AgentRegistration + + include MsRestAzure + + # @return [String] Gets or sets the dsc meta configuration. + attr_accessor :dsc_meta_configuration + + # @return [String] Gets or sets the dsc server endpoint. + attr_accessor :endpoint + + # @return [AgentRegistrationKeys] Gets or sets the agent registration + # keys. + attr_accessor :keys + + # @return [String] Gets or sets the id. + attr_accessor :id + + + # + # Mapper for AgentRegistration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AgentRegistration', + type: { + name: 'Composite', + class_name: 'AgentRegistration', + model_properties: { + dsc_meta_configuration: { + required: false, + serialized_name: 'dscMetaConfiguration', + type: { + name: 'String' + } + }, + endpoint: { + required: false, + serialized_name: 'endpoint', + type: { + name: 'String' + } + }, + keys: { + required: false, + serialized_name: 'keys', + type: { + name: 'Composite', + class_name: 'AgentRegistrationKeys' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_key_name.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_key_name.rb new file mode 100644 index 0000000000..dc90007378 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_key_name.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for AgentRegistrationKeyName + # + module AgentRegistrationKeyName + Primary = "Primary" + Secondary = "Secondary" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_keys.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_keys.rb new file mode 100644 index 0000000000..c4986b19d8 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_keys.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::ARM::Automation + module Models + # + # Definition of the agent registration keys. + # + class AgentRegistrationKeys + + include MsRestAzure + + # @return [String] Gets or sets the primary key. + attr_accessor :primary + + # @return [String] Gets or sets the secondary key. + attr_accessor :secondary + + + # + # Mapper for AgentRegistrationKeys class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AgentRegistrationKeys', + type: { + name: 'Composite', + class_name: 'AgentRegistrationKeys', + model_properties: { + primary: { + required: false, + serialized_name: 'primary', + type: { + name: 'String' + } + }, + secondary: { + required: false, + serialized_name: 'secondary', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_regenerate_key_parameter.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_regenerate_key_parameter.rb new file mode 100644 index 0000000000..eeaef136c0 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/agent_registration_regenerate_key_parameter.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The parameters supplied to the regenerate keys operation. + # + class AgentRegistrationRegenerateKeyParameter + + include MsRestAzure + + # @return [AgentRegistrationKeyName] Gets or sets the agent registration + # key name - Primary or Secondary. Possible values include: 'Primary', + # 'Secondary' + attr_accessor :key_name + + # @return [String] Gets or sets the name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for AgentRegistrationRegenerateKeyParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AgentRegistrationRegenerateKeyParameter', + type: { + name: 'Composite', + class_name: 'AgentRegistrationRegenerateKeyParameter', + model_properties: { + key_name: { + required: true, + serialized_name: 'keyName', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account.rb new file mode 100644 index 0000000000..5fa6eafdd0 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account.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::ARM::Automation + module Models + # + # Definition of the automation account type. + # + class AutomationAccount < Resource + + include MsRestAzure + + # @return [Sku] Gets or sets the SKU of account. + attr_accessor :sku + + # @return [String] Gets or sets the last modified by. + attr_accessor :last_modified_by + + # @return [AutomationAccountState] Gets status of account. Possible + # values include: 'Ok', 'Unavailable', 'Suspended' + attr_accessor :state + + # @return [DateTime] Gets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + # @return [String] Gets or sets the etag of the resource. + attr_accessor :etag + + + # + # Mapper for AutomationAccount class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AutomationAccount', + type: { + name: 'Composite', + class_name: 'AutomationAccount', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serialized_name: 'properties.sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + last_modified_by: { + required: false, + serialized_name: 'properties.lastModifiedBy', + type: { + name: 'String' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + creation_time: { + required: false, + read_only: true, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_create_or_update_parameters.rb new file mode 100644 index 0000000000..cb5f6428e6 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_create_or_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update automation account + # operation. + # + class AutomationAccountCreateOrUpdateParameters + + include MsRestAzure + + # @return [Sku] Gets or sets account SKU. + attr_accessor :sku + + # @return [String] Gets or sets name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for AutomationAccountCreateOrUpdateParameters class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AutomationAccountCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'AutomationAccountCreateOrUpdateParameters', + model_properties: { + sku: { + required: false, + serialized_name: 'properties.sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_list_result.rb new file mode 100644 index 0000000000..c0bb3e08a9 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_list_result.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::ARM::Automation + module Models + # + # The response model for the list account operation. + # + class AutomationAccountListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets list of accounts. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [AutomationAccountListResult] 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 AutomationAccountListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AutomationAccountListResult', + type: { + name: 'Composite', + class_name: 'AutomationAccountListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AutomationAccountElementType', + type: { + name: 'Composite', + class_name: 'AutomationAccount' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_state.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_state.rb new file mode 100644 index 0000000000..7e830aa94a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_state.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for AutomationAccountState + # + module AutomationAccountState + Ok = "Ok" + Unavailable = "Unavailable" + Suspended = "Suspended" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_update_parameters.rb new file mode 100644 index 0000000000..40c889e613 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/automation_account_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::ARM::Automation + module Models + # + # The parameters supplied to the update automation account operation. + # + class AutomationAccountUpdateParameters + + include MsRestAzure + + # @return [Sku] Gets or sets account SKU. + attr_accessor :sku + + # @return [String] Gets or sets the name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for AutomationAccountUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AutomationAccountUpdateParameters', + type: { + name: 'Composite', + class_name: 'AutomationAccountUpdateParameters', + model_properties: { + sku: { + required: false, + serialized_name: 'properties.sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate.rb new file mode 100644 index 0000000000..e4d3eb5ab3 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate.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::ARM::Automation + module Models + # + # Definition of the certificate. + # + class Certificate + + include MsRestAzure + + # @return [String] Gets the id of the resource. + attr_accessor :id + + # @return [String] Gets the name of the certificate. + attr_accessor :name + + # @return [String] Gets the thumbprint of the certificate. + attr_accessor :thumbprint + + # @return [DateTime] Gets the expiry time of the certificate. + attr_accessor :expiry_time + + # @return [Boolean] Gets the is exportable flag of the certificate. + attr_accessor :is_exportable + + # @return [DateTime] Gets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for Certificate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Certificate', + type: { + name: 'Composite', + class_name: 'Certificate', + 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' + } + }, + thumbprint: { + required: false, + read_only: true, + serialized_name: 'properties.thumbprint', + type: { + name: 'String' + } + }, + expiry_time: { + required: false, + read_only: true, + serialized_name: 'properties.expiryTime', + type: { + name: 'DateTime' + } + }, + is_exportable: { + required: false, + read_only: true, + serialized_name: 'properties.isExportable', + type: { + name: 'Boolean' + } + }, + creation_time: { + required: false, + read_only: true, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_create_or_update_parameters.rb new file mode 100644 index 0000000000..d052053814 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_create_or_update_parameters.rb @@ -0,0 +1,87 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The parameters supplied to the create or update or replace certificate + # operation. + # + class CertificateCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the certificate. + attr_accessor :name + + # @return [String] Gets or sets the base64 encoded value of the + # certificate. + attr_accessor :base64value + + # @return [String] Gets or sets the description of the certificate. + attr_accessor :description + + # @return [String] Gets or sets the thumbprint of the certificate. + attr_accessor :thumbprint + + # @return [Boolean] Gets or sets the is exportable flag of the + # certificate. + attr_accessor :is_exportable + + + # + # 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: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + base64value: { + required: true, + serialized_name: 'properties.base64Value', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + thumbprint: { + required: false, + serialized_name: 'properties.thumbprint', + type: { + name: 'String' + } + }, + is_exportable: { + required: false, + serialized_name: 'properties.isExportable', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_list_result.rb new file mode 100644 index 0000000000..cfd0f3327f --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_list_result.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::ARM::Automation + module Models + # + # The response model for the list certificate operation. + # + class CertificateListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of certificates. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [CertificateListResult] 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 CertificateListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateListResult', + type: { + name: 'Composite', + class_name: 'CertificateListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CertificateElementType', + type: { + name: 'Composite', + class_name: 'Certificate' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_update_parameters.rb new file mode 100644 index 0000000000..c8214e4fdf --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/certificate_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the update certificate operation. + # + class CertificateUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the certificate. + attr_accessor :name + + # @return [String] Gets or sets the description of the certificate. + attr_accessor :description + + + # + # Mapper for CertificateUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateUpdateParameters', + type: { + name: 'Composite', + class_name: 'CertificateUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection.rb new file mode 100644 index 0000000000..4d0074c5a1 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection.rb @@ -0,0 +1,119 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the connection. + # + class Connection + + include MsRestAzure + + # @return [String] Gets the id of the resource. + attr_accessor :id + + # @return [String] Gets the name of the connection. + attr_accessor :name + + # @return [ConnectionTypeAssociationProperty] Gets or sets the + # connectionType of the connection. + attr_accessor :connection_type + + # @return [Hash{String => String}] Gets the field definition values of + # the connection. + attr_accessor :field_definition_values + + # @return [DateTime] Gets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for Connection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Connection', + type: { + name: 'Composite', + class_name: 'Connection', + 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' + } + }, + connection_type: { + required: false, + serialized_name: 'properties.connectionType', + type: { + name: 'Composite', + class_name: 'ConnectionTypeAssociationProperty' + } + }, + field_definition_values: { + required: false, + read_only: true, + serialized_name: 'properties.fieldDefinitionValues', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + creation_time: { + required: false, + read_only: true, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_create_or_update_parameters.rb new file mode 100644 index 0000000000..9b87f41a7b --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_create_or_update_parameters.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The parameters supplied to the create or update connection operation. + # + class ConnectionCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the connection. + attr_accessor :name + + # @return [String] Gets or sets the description of the connection. + attr_accessor :description + + # @return [ConnectionTypeAssociationProperty] Gets or sets the + # connectionType of the connection. + attr_accessor :connection_type + + # @return [Hash{String => String}] Gets or sets the field definition + # properties of the connection. + attr_accessor :field_definition_values + + + # + # Mapper for ConnectionCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectionCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'ConnectionCreateOrUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + connection_type: { + required: true, + serialized_name: 'properties.connectionType', + type: { + name: 'Composite', + class_name: 'ConnectionTypeAssociationProperty' + } + }, + field_definition_values: { + required: false, + serialized_name: 'properties.fieldDefinitionValues', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_list_result.rb new file mode 100644 index 0000000000..4bccda3cf1 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_list_result.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::ARM::Automation + module Models + # + # The response model for the list connection operation. + # + class ConnectionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of connection. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [ConnectionListResult] 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 ConnectionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectionListResult', + type: { + name: 'Composite', + class_name: 'ConnectionListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ConnectionElementType', + type: { + name: 'Composite', + class_name: 'Connection' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type.rb new file mode 100644 index 0000000000..70ed7c2bd0 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type.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::ARM::Automation + module Models + # + # Definition of the connection type. + # + class ConnectionType + + include MsRestAzure + + # @return [String] Gets the id of the resource. + attr_accessor :id + + # @return [String] Gets the name of the connection type. + attr_accessor :name + + # @return [Boolean] Gets or sets a Boolean value to indicate if the + # connection type is global. + attr_accessor :is_global + + # @return [Hash{String => FieldDefinition}] Gets the field definitions of + # the connection type. + attr_accessor :field_definitions + + # @return [DateTime] Gets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for ConnectionType class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectionType', + type: { + name: 'Composite', + class_name: 'ConnectionType', + 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' + } + }, + is_global: { + required: false, + serialized_name: 'properties.isGlobal', + type: { + name: 'Boolean' + } + }, + field_definitions: { + required: false, + read_only: true, + serialized_name: 'properties.fieldDefinitions', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'FieldDefinitionElementType', + type: { + name: 'Composite', + class_name: 'FieldDefinition' + } + } + } + }, + creation_time: { + required: false, + read_only: true, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_association_property.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_association_property.rb new file mode 100644 index 0000000000..f5e0fb19b2 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_association_property.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::ARM::Automation + module Models + # + # The connection type property associated with the entity. + # + class ConnectionTypeAssociationProperty + + include MsRestAzure + + # @return [String] Gets or sets the name of the connection type. + attr_accessor :name + + + # + # Mapper for ConnectionTypeAssociationProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectionTypeAssociationProperty', + type: { + name: 'Composite', + class_name: 'ConnectionTypeAssociationProperty', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_create_or_update_parameters.rb new file mode 100644 index 0000000000..8d78cb0175 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_create_or_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update connection type + # operation. + # + class ConnectionTypeCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the connection type. + attr_accessor :name + + # @return [Boolean] Gets or sets a Boolean value to indicate if the + # connection type is global. + attr_accessor :is_global + + # @return [Hash{String => FieldDefinition}] Gets or sets the field + # definitions of the connection type. + attr_accessor :field_definitions + + + # + # Mapper for ConnectionTypeCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectionTypeCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'ConnectionTypeCreateOrUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + is_global: { + required: false, + serialized_name: 'properties.isGlobal', + type: { + name: 'Boolean' + } + }, + field_definitions: { + required: true, + serialized_name: 'properties.fieldDefinitions', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'FieldDefinitionElementType', + type: { + name: 'Composite', + class_name: 'FieldDefinition' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_list_result.rb new file mode 100644 index 0000000000..15beb315c8 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_type_list_result.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::ARM::Automation + module Models + # + # The response model for the list connection type operation. + # + class ConnectionTypeListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of connection + # types. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [ConnectionTypeListResult] 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 ConnectionTypeListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectionTypeListResult', + type: { + name: 'Composite', + class_name: 'ConnectionTypeListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ConnectionTypeElementType', + type: { + name: 'Composite', + class_name: 'ConnectionType' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_update_parameters.rb new file mode 100644 index 0000000000..4142ac710c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/connection_update_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::ARM::Automation + module Models + # + # The parameters supplied to the update connection operation. + # + class ConnectionUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the connection. + attr_accessor :name + + # @return [String] Gets or sets the description of the connection. + attr_accessor :description + + # @return [Hash{String => String}] Gets or sets the field definition + # values of the connection. + attr_accessor :field_definition_values + + + # + # Mapper for ConnectionUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectionUpdateParameters', + type: { + name: 'Composite', + class_name: 'ConnectionUpdateParameters', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + field_definition_values: { + required: false, + serialized_name: 'properties.fieldDefinitionValues', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_hash.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_hash.rb new file mode 100644 index 0000000000..4d884e4cda --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_hash.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::ARM::Automation + module Models + # + # Definition of the runbook property type. + # + class ContentHash + + include MsRestAzure + + # @return [String] Gets or sets the content hash algorithm used to hash + # the content. + attr_accessor :algorithm + + # @return [String] Gets or sets expected hash value of the content. + attr_accessor :value + + + # + # Mapper for ContentHash class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContentHash', + type: { + name: 'Composite', + class_name: 'ContentHash', + model_properties: { + algorithm: { + required: true, + serialized_name: 'algorithm', + type: { + name: 'String' + } + }, + value: { + required: true, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_link.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_link.rb new file mode 100644 index 0000000000..72eb41714b --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_link.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::ARM::Automation + module Models + # + # Definition of the content link. + # + class ContentLink + + include MsRestAzure + + # @return [String] Gets or sets the uri of the runbook content. + attr_accessor :uri + + # @return [ContentHash] Gets or sets the hash. + attr_accessor :content_hash + + # @return [String] Gets or sets the version of the content. + attr_accessor :version + + + # + # Mapper for ContentLink class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContentLink', + type: { + name: 'Composite', + class_name: 'ContentLink', + model_properties: { + uri: { + required: false, + serialized_name: 'uri', + type: { + name: 'String' + } + }, + content_hash: { + required: false, + serialized_name: 'contentHash', + type: { + name: 'Composite', + class_name: 'ContentHash' + } + }, + version: { + required: false, + serialized_name: 'version', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_source.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_source.rb new file mode 100644 index 0000000000..f322c1a802 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_source.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::ARM::Automation + module Models + # + # Definition of the content source. + # + class ContentSource + + include MsRestAzure + + # @return [ContentHash] Gets or sets the hash. + attr_accessor :hash + + # @return [ContentSourceType] Gets or sets the content source type. + # Possible values include: 'embeddedContent', 'uri' + attr_accessor :type + + # @return [String] Gets or sets the value of the content. This is based + # on the content source type. + attr_accessor :value + + # @return [String] Gets or sets the version of the content. + attr_accessor :version + + + # + # Mapper for ContentSource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContentSource', + type: { + name: 'Composite', + class_name: 'ContentSource', + model_properties: { + hash: { + required: false, + serialized_name: 'hash', + type: { + name: 'Composite', + class_name: 'ContentHash' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + }, + version: { + required: false, + serialized_name: 'version', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_source_type.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_source_type.rb new file mode 100644 index 0000000000..84ce946b09 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/content_source_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::ARM::Automation + module Models + # + # Defines values for ContentSourceType + # + module ContentSourceType + EmbeddedContent = "embeddedContent" + Uri = "uri" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential.rb new file mode 100644 index 0000000000..91c5a2943d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential.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::ARM::Automation + module Models + # + # Definition of the credential. + # + class Credential + + include MsRestAzure + + # @return [String] Gets the id of the resource. + attr_accessor :id + + # @return [String] Gets the name of the credential. + attr_accessor :name + + # @return [String] Gets the user name of the credential. + attr_accessor :user_name + + # @return [DateTime] Gets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for Credential class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Credential', + type: { + name: 'Composite', + class_name: 'Credential', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + user_name: { + required: false, + read_only: true, + serialized_name: 'properties.userName', + type: { + name: 'String' + } + }, + creation_time: { + required: false, + read_only: true, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_create_or_update_parameters.rb new file mode 100644 index 0000000000..8ab8c0bf47 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_create_or_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update credential operation. + # + class CredentialCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the credential. + attr_accessor :name + + # @return [String] Gets or sets the user name of the credential. + attr_accessor :user_name + + # @return [String] Gets or sets the password of the credential. + attr_accessor :password + + # @return [String] Gets or sets the description of the credential. + attr_accessor :description + + + # + # Mapper for CredentialCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CredentialCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'CredentialCreateOrUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + user_name: { + required: true, + serialized_name: 'properties.userName', + type: { + name: 'String' + } + }, + password: { + required: true, + serialized_name: 'properties.password', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_list_result.rb new file mode 100644 index 0000000000..ac8b3d8152 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_list_result.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::ARM::Automation + module Models + # + # The response model for the list credential operation. + # + class CredentialListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of credentials. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [CredentialListResult] 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 CredentialListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CredentialListResult', + type: { + name: 'Composite', + class_name: 'CredentialListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CredentialElementType', + type: { + name: 'Composite', + class_name: 'Credential' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_update_parameters.rb new file mode 100644 index 0000000000..3f7428367a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/credential_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the Update credential operation. + # + class CredentialUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the credential. + attr_accessor :name + + # @return [String] Gets or sets the user name of the credential. + attr_accessor :user_name + + # @return [String] Gets or sets the password of the credential. + attr_accessor :password + + # @return [String] Gets or sets the description of the credential. + attr_accessor :description + + + # + # Mapper for CredentialUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CredentialUpdateParameters', + type: { + name: 'Composite', + class_name: 'CredentialUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + user_name: { + required: false, + serialized_name: 'properties.userName', + type: { + name: 'String' + } + }, + password: { + required: false, + serialized_name: 'properties.password', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job.rb new file mode 100644 index 0000000000..62b9e8a518 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job.rb @@ -0,0 +1,186 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the Dsc Compilation job. + # + class DscCompilationJob + + include MsRestAzure + + # @return [String] Gets the id of the resource. + attr_accessor :id + + # @return [DscConfigurationAssociationProperty] Gets or sets the + # configuration. + attr_accessor :configuration + + # @return [String] Gets the compilation job started by. + attr_accessor :started_by + + # @return Gets the id of the job. + attr_accessor :job_id + + # @return [DateTime] Gets the creation time of the job. + attr_accessor :creation_time + + # @return [JobStatus] Gets or sets the status of the job. Possible values + # include: 'New', 'Activating', 'Running', 'Completed', 'Failed', + # 'Stopped', 'Blocked', 'Suspended', 'Disconnected', 'Suspending', + # 'Stopping', 'Resuming', 'Removing' + attr_accessor :status + + # @return [String] Gets or sets the status details of the job. + attr_accessor :status_details + + # @return [DateTime] Gets the start time of the job. + attr_accessor :start_time + + # @return [DateTime] Gets the end time of the job. + attr_accessor :end_time + + # @return [String] Gets the exception of the job. + attr_accessor :exception + + # @return [DateTime] Gets the last modified time of the job. + attr_accessor :last_modified_time + + # @return [DateTime] Gets the last status modified time of the job. + attr_accessor :last_status_modified_time + + # @return [Hash{String => String}] Gets or sets the parameters of the + # job. + attr_accessor :parameters + + + # + # Mapper for DscCompilationJob class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscCompilationJob', + type: { + name: 'Composite', + class_name: 'DscCompilationJob', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + configuration: { + required: false, + serialized_name: 'properties.configuration', + type: { + name: 'Composite', + class_name: 'DscConfigurationAssociationProperty' + } + }, + started_by: { + required: false, + read_only: true, + serialized_name: 'properties.startedBy', + type: { + name: 'String' + } + }, + job_id: { + required: false, + read_only: true, + serialized_name: 'properties.jobId', + type: { + name: 'String' + } + }, + creation_time: { + required: false, + read_only: true, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + status_details: { + required: false, + serialized_name: 'properties.statusDetails', + type: { + name: 'String' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + read_only: true, + serialized_name: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + exception: { + required: false, + read_only: true, + serialized_name: 'properties.exception', + type: { + name: 'String' + } + }, + last_modified_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + last_status_modified_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastStatusModifiedTime', + type: { + name: 'DateTime' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_create_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_create_parameters.rb new file mode 100644 index 0000000000..e9e88b8a50 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_create_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create compilation job operation. + # + class DscCompilationJobCreateParameters + + include MsRestAzure + + # @return [DscConfigurationAssociationProperty] Gets or sets the + # configuration. + attr_accessor :configuration + + # @return [Hash{String => String}] Gets or sets the parameters of the + # job. + attr_accessor :parameters + + # @return [String] Gets or sets name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for DscCompilationJobCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscCompilationJobCreateParameters', + type: { + name: 'Composite', + class_name: 'DscCompilationJobCreateParameters', + model_properties: { + configuration: { + required: true, + serialized_name: 'properties.configuration', + type: { + name: 'Composite', + class_name: 'DscConfigurationAssociationProperty' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_list_result.rb new file mode 100644 index 0000000000..b4e223891f --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_list_result.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::ARM::Automation + module Models + # + # The response model for the list job operation. + # + class DscCompilationJobListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of Dsc + # Compilation jobs. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [DscCompilationJobListResult] 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 DscCompilationJobListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscCompilationJobListResult', + type: { + name: 'Composite', + class_name: 'DscCompilationJobListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscCompilationJobElementType', + type: { + name: 'Composite', + class_name: 'DscCompilationJob' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration.rb new file mode 100644 index 0000000000..39ed29f452 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration.rb @@ -0,0 +1,193 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the configuration type. + # + class DscConfiguration < Resource + + include MsRestAzure + + # @return [DscConfigurationProvisioningState] Gets or sets the + # provisioning state of the configuration. Possible values include: + # 'Succeeded' + attr_accessor :provisioning_state + + # @return [Integer] Gets or sets the job count of the configuration. + attr_accessor :job_count + + # @return [Hash{String => DscConfigurationParameter}] Gets or sets the + # configuration parameters. + attr_accessor :parameters + + # @return [ContentSource] Gets or sets the source. + attr_accessor :source + + # @return [DscConfigurationState] Gets or sets the state of the + # configuration. Possible values include: 'New', 'Edit', 'Published' + attr_accessor :state + + # @return [Boolean] Gets or sets verbose log option. + attr_accessor :log_verbose + + # @return [DateTime] Gets or sets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + # @return [String] Gets or sets the etag of the resource. + attr_accessor :etag + + + # + # Mapper for DscConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscConfiguration', + type: { + name: 'Composite', + class_name: 'DscConfiguration', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'DscConfigurationProvisioningState' + } + }, + job_count: { + required: false, + serialized_name: 'properties.jobCount', + type: { + name: 'Number' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'DscConfigurationParameterElementType', + type: { + name: 'Composite', + class_name: 'DscConfigurationParameter' + } + } + } + }, + source: { + required: false, + serialized_name: 'properties.source', + type: { + name: 'Composite', + class_name: 'ContentSource' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + log_verbose: { + required: false, + serialized_name: 'properties.logVerbose', + type: { + name: 'Boolean' + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_association_property.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_association_property.rb new file mode 100644 index 0000000000..2486f1080c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_association_property.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::ARM::Automation + module Models + # + # The Dsc configuration property associated with the entity. + # + class DscConfigurationAssociationProperty + + include MsRestAzure + + # @return [String] Gets or sets the name of the Dsc configuration. + attr_accessor :name + + + # + # Mapper for DscConfigurationAssociationProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscConfigurationAssociationProperty', + type: { + name: 'Composite', + class_name: 'DscConfigurationAssociationProperty', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_create_or_update_parameters.rb new file mode 100644 index 0000000000..24964ec1ad --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_create_or_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::ARM::Automation + module Models + # + # The parameters supplied to the create or update configuration operation. + # + class DscConfigurationCreateOrUpdateParameters + + include MsRestAzure + + # @return [Boolean] Gets or sets verbose log option. + attr_accessor :log_verbose + + # @return [Boolean] Gets or sets progress log option. + attr_accessor :log_progress + + # @return [ContentSource] Gets or sets the source. + attr_accessor :source + + # @return [Hash{String => DscConfigurationParameter}] Gets or sets the + # configuration parameters. + attr_accessor :parameters + + # @return [String] Gets or sets the description of the configuration. + attr_accessor :description + + # @return [String] Gets or sets name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for DscConfigurationCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscConfigurationCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'DscConfigurationCreateOrUpdateParameters', + model_properties: { + log_verbose: { + required: false, + serialized_name: 'properties.logVerbose', + type: { + name: 'Boolean' + } + }, + log_progress: { + required: false, + serialized_name: 'properties.logProgress', + type: { + name: 'Boolean' + } + }, + source: { + required: true, + serialized_name: 'properties.source', + type: { + name: 'Composite', + class_name: 'ContentSource' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'DscConfigurationParameterElementType', + type: { + name: 'Composite', + class_name: 'DscConfigurationParameter' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_list_result.rb new file mode 100644 index 0000000000..182b4daf68 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_list_result.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::ARM::Automation + module Models + # + # The response model for the list configuration operation. + # + class DscConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of + # configurations. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [DscConfigurationListResult] 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 DscConfigurationListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscConfigurationListResult', + type: { + name: 'Composite', + class_name: 'DscConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscConfigurationElementType', + type: { + name: 'Composite', + class_name: 'DscConfiguration' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_parameter.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_parameter.rb new file mode 100644 index 0000000000..289a82f614 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_parameter.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::ARM::Automation + module Models + # + # Definition of the configuration parameter type. + # + class DscConfigurationParameter + + include MsRestAzure + + # @return [String] Gets or sets the type of the parameter. + attr_accessor :type + + # @return [Boolean] Gets or sets a Boolean value to indicate whether the + # parameter is madatory or not. + attr_accessor :is_mandatory + + # @return [Integer] Get or sets the position of the parameter. + attr_accessor :position + + # @return [String] Gets or sets the default value of parameter. + attr_accessor :default_value + + + # + # Mapper for DscConfigurationParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscConfigurationParameter', + type: { + name: 'Composite', + class_name: 'DscConfigurationParameter', + model_properties: { + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + is_mandatory: { + required: false, + serialized_name: 'isMandatory', + type: { + name: 'Boolean' + } + }, + position: { + required: false, + serialized_name: 'position', + type: { + name: 'Number' + } + }, + default_value: { + required: false, + serialized_name: 'defaultValue', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_provisioning_state.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_provisioning_state.rb new file mode 100644 index 0000000000..b824851e11 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_provisioning_state.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for DscConfigurationProvisioningState + # + module DscConfigurationProvisioningState + Succeeded = "Succeeded" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_state.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_state.rb new file mode 100644 index 0000000000..20c2dbaf69 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_configuration_state.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for DscConfigurationState + # + module DscConfigurationState + New = "New" + Edit = "Edit" + Published = "Published" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_meta_configuration.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_meta_configuration.rb new file mode 100644 index 0000000000..90f9016901 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_meta_configuration.rb @@ -0,0 +1,111 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the DSC Meta Configuration. + # + class DscMetaConfiguration + + include MsRestAzure + + # @return [Integer] Gets or sets the ConfigurationModeFrequencyMins value + # of the meta configuration. + attr_accessor :configuration_mode_frequency_mins + + # @return [Boolean] Gets or sets the RebootNodeIfNeeded value of the meta + # configuration. + attr_accessor :reboot_node_if_needed + + # @return [String] Gets or sets the ConfigurationMode value of the meta + # configuration. + attr_accessor :configuration_mode + + # @return [String] Gets or sets the ActionAfterReboot value of the meta + # configuration. + attr_accessor :action_after_reboot + + # @return [String] Gets or sets the CertificateId value of the meta + # configuration. + attr_accessor :certificate_id + + # @return [Integer] Gets or sets the RefreshFrequencyMins value of the + # meta configuration. + attr_accessor :refresh_frequency_mins + + # @return [Boolean] Gets or sets the AllowModuleOverwrite value of the + # meta configuration. + attr_accessor :allow_module_overwrite + + + # + # Mapper for DscMetaConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscMetaConfiguration', + type: { + name: 'Composite', + class_name: 'DscMetaConfiguration', + model_properties: { + configuration_mode_frequency_mins: { + required: false, + serialized_name: 'configurationModeFrequencyMins', + type: { + name: 'Number' + } + }, + reboot_node_if_needed: { + required: false, + serialized_name: 'rebootNodeIfNeeded', + type: { + name: 'Boolean' + } + }, + configuration_mode: { + required: false, + serialized_name: 'configurationMode', + type: { + name: 'String' + } + }, + action_after_reboot: { + required: false, + serialized_name: 'actionAfterReboot', + type: { + name: 'String' + } + }, + certificate_id: { + required: false, + serialized_name: 'certificateId', + type: { + name: 'String' + } + }, + refresh_frequency_mins: { + required: false, + serialized_name: 'refreshFrequencyMins', + type: { + name: 'Number' + } + }, + allow_module_overwrite: { + required: false, + serialized_name: 'allowModuleOverwrite', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node.rb new file mode 100644 index 0000000000..db5cf275e1 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node.rb @@ -0,0 +1,161 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the dsc node type. + # + class DscNode < Resource + + include MsRestAzure + + # @return [DateTime] Gets or sets the last seen time of the node. + attr_accessor :last_seen + + # @return [DateTime] Gets or sets the registration time of the node. + attr_accessor :registration_time + + # @return [String] Gets or sets the ip of the node. + attr_accessor :ip + + # @return [String] Gets or sets the account id of the node. + attr_accessor :account_id + + # @return [DscNodeConfigurationAssociationProperty] Gets or sets the + # configuration of the node. + attr_accessor :node_configuration + + # @return [String] Gets or sets the status of the node. + attr_accessor :status + + # @return [String] Gets or sets the node id. + attr_accessor :node_id + + # @return [String] Gets or sets the etag of the resource. + attr_accessor :etag + + + # + # Mapper for DscNode class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNode', + type: { + name: 'Composite', + class_name: 'DscNode', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + last_seen: { + required: false, + serialized_name: 'lastSeen', + type: { + name: 'DateTime' + } + }, + registration_time: { + required: false, + serialized_name: 'registrationTime', + type: { + name: 'DateTime' + } + }, + ip: { + required: false, + serialized_name: 'ip', + type: { + name: 'String' + } + }, + account_id: { + required: false, + serialized_name: 'accountId', + type: { + name: 'String' + } + }, + node_configuration: { + required: false, + serialized_name: 'nodeConfiguration', + type: { + name: 'Composite', + class_name: 'DscNodeConfigurationAssociationProperty' + } + }, + status: { + required: false, + serialized_name: 'status', + type: { + name: 'String' + } + }, + node_id: { + required: false, + serialized_name: 'nodeId', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration.rb new file mode 100644 index 0000000000..3bf2feb5d4 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the dsc node configuration. + # + class DscNodeConfiguration + + include MsRestAzure + + # @return [String] Gets or sets the node configuration name. + attr_accessor :name + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [DateTime] Gets or sets creation time. + attr_accessor :creation_time + + # @return [DscConfigurationAssociationProperty] Gets or sets the + # configuration of the node. + attr_accessor :configuration + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + + # + # Mapper for DscNodeConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeConfiguration', + type: { + name: 'Composite', + class_name: 'DscNodeConfiguration', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + last_modified_time: { + required: false, + serialized_name: 'lastModifiedTime', + type: { + name: 'DateTime' + } + }, + creation_time: { + required: false, + serialized_name: 'creationTime', + type: { + name: 'DateTime' + } + }, + configuration: { + required: false, + serialized_name: 'configuration', + type: { + name: 'Composite', + class_name: 'DscConfigurationAssociationProperty' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_association_property.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_association_property.rb new file mode 100644 index 0000000000..9b963168dc --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_association_property.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::ARM::Automation + module Models + # + # The dsc nodeconfiguration property associated with the entity. + # + class DscNodeConfigurationAssociationProperty + + include MsRestAzure + + # @return [String] Gets or sets the name of the dsc nodeconfiguration. + attr_accessor :name + + + # + # Mapper for DscNodeConfigurationAssociationProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeConfigurationAssociationProperty', + type: { + name: 'Composite', + class_name: 'DscNodeConfigurationAssociationProperty', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_create_or_update_parameters.rb new file mode 100644 index 0000000000..9b9d42e49a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_create_or_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update node configuration + # operation. + # + class DscNodeConfigurationCreateOrUpdateParameters + + include MsRestAzure + + # @return [ContentSource] Gets or sets the source. + attr_accessor :source + + # @return [String] Gets or sets the type of the parameter. + attr_accessor :name + + # @return [DscConfigurationAssociationProperty] Gets or sets the + # configuration of the node. + attr_accessor :configuration + + + # + # Mapper for DscNodeConfigurationCreateOrUpdateParameters class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeConfigurationCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'DscNodeConfigurationCreateOrUpdateParameters', + model_properties: { + source: { + required: true, + serialized_name: 'source', + type: { + name: 'Composite', + class_name: 'ContentSource' + } + }, + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + configuration: { + required: true, + serialized_name: 'configuration', + type: { + name: 'Composite', + class_name: 'DscConfigurationAssociationProperty' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_list_result.rb new file mode 100644 index 0000000000..03fcb4884c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_list_result.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::ARM::Automation + module Models + # + # The response model for the list job operation. + # + class DscNodeConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of Dsc node + # configurations. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [DscNodeConfigurationListResult] 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 DscNodeConfigurationListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeConfigurationListResult', + type: { + name: 'Composite', + class_name: 'DscNodeConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscNodeConfigurationElementType', + type: { + name: 'Composite', + class_name: 'DscNodeConfiguration' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_list_result.rb new file mode 100644 index 0000000000..41e2f7fab4 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_list_result.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::ARM::Automation + module Models + # + # The response model for the list dsc nodes operation. + # + class DscNodeListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of dsc nodes. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [DscNodeListResult] 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 DscNodeListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeListResult', + type: { + name: 'Composite', + class_name: 'DscNodeListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscNodeElementType', + type: { + name: 'Composite', + class_name: 'DscNode' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_report.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_report.rb new file mode 100644 index 0000000000..5c55f82161 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_report.rb @@ -0,0 +1,265 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the dsc node report type. + # + class DscNodeReport + + include MsRestAzure + + # @return [DateTime] Gets or sets the end time of the node report. + attr_accessor :end_time + + # @return [DateTime] Gets or sets the lastModifiedTime of the node + # report. + attr_accessor :last_modified_time + + # @return [DateTime] Gets or sets the start time of the node report. + attr_accessor :start_time + + # @return [String] Gets or sets the type of the node report. + attr_accessor :type + + # @return [String] Gets or sets the id of the node report. + attr_accessor :report_id + + # @return [String] Gets or sets the status of the node report. + attr_accessor :status + + # @return [String] Gets or sets the refreshMode of the node report. + attr_accessor :refresh_mode + + # @return [String] Gets or sets the rebootRequested of the node report. + attr_accessor :reboot_requested + + # @return [String] Gets or sets the reportFormatVersion of the node + # report. + attr_accessor :report_format_version + + # @return [String] Gets or sets the configurationVersion of the node + # report. + attr_accessor :configuration_version + + # @return [String] Gets or sets the id. + attr_accessor :id + + # @return [Array] Gets or sets the errors for the node + # report. + attr_accessor :errors + + # @return [Array] Gets or sets the resource for the + # node report. + attr_accessor :resources + + # @return [DscMetaConfiguration] Gets or sets the metaConfiguration of + # the node at the time of the report. + attr_accessor :meta_configuration + + # @return [String] Gets or sets the hostname of the node that sent the + # report. + attr_accessor :host_name + + # @return [Array] Gets or sets the IPv4 address of the node that + # sent the report. + attr_accessor :i_pv4addresses + + # @return [Array] Gets or sets the IPv6 address of the node that + # sent the report. + attr_accessor :i_pv6addresses + + # @return [Integer] Gets or sets the number of resource in the node + # report. + attr_accessor :number_of_resources + + # @return [String] Gets or sets the unparsed errors for the node report. + attr_accessor :raw_errors + + + # + # Mapper for DscNodeReport class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeReport', + type: { + name: 'Composite', + class_name: 'DscNodeReport', + model_properties: { + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'lastModifiedTime', + type: { + name: 'DateTime' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + report_id: { + required: false, + serialized_name: 'reportId', + type: { + name: 'String' + } + }, + status: { + required: false, + serialized_name: 'status', + type: { + name: 'String' + } + }, + refresh_mode: { + required: false, + serialized_name: 'refreshMode', + type: { + name: 'String' + } + }, + reboot_requested: { + required: false, + serialized_name: 'rebootRequested', + type: { + name: 'String' + } + }, + report_format_version: { + required: false, + serialized_name: 'reportFormatVersion', + type: { + name: 'String' + } + }, + configuration_version: { + required: false, + serialized_name: 'configurationVersion', + type: { + name: 'String' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + errors: { + required: false, + serialized_name: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscReportErrorElementType', + type: { + name: 'Composite', + class_name: 'DscReportError' + } + } + } + }, + resources: { + required: false, + serialized_name: 'resources', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscReportResourceElementType', + type: { + name: 'Composite', + class_name: 'DscReportResource' + } + } + } + }, + meta_configuration: { + required: false, + serialized_name: 'metaConfiguration', + type: { + name: 'Composite', + class_name: 'DscMetaConfiguration' + } + }, + host_name: { + required: false, + serialized_name: 'hostName', + type: { + name: 'String' + } + }, + i_pv4addresses: { + required: false, + serialized_name: 'iPV4Addresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + i_pv6addresses: { + required: false, + serialized_name: 'iPV6Addresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + number_of_resources: { + required: false, + serialized_name: 'numberOfResources', + type: { + name: 'Number' + } + }, + raw_errors: { + required: false, + serialized_name: 'rawErrors', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_report_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_report_list_result.rb new file mode 100644 index 0000000000..2fb8759a37 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_report_list_result.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::ARM::Automation + module Models + # + # The response model for the list dsc nodes operation. + # + class DscNodeReportListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of dsc node reports. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [DscNodeReportListResult] 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 DscNodeReportListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeReportListResult', + type: { + name: 'Composite', + class_name: 'DscNodeReportListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscNodeReportElementType', + type: { + name: 'Composite', + class_name: 'DscNodeReport' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_update_parameters.rb new file mode 100644 index 0000000000..c5e729aa0b --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_node_update_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::ARM::Automation + module Models + # + # The parameters supplied to the update dsc node operation. + # + class DscNodeUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the id of the dsc node. + attr_accessor :node_id + + # @return [DscNodeConfigurationAssociationProperty] Gets or sets the + # configuration of the node. + attr_accessor :node_configuration + + + # + # Mapper for DscNodeUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscNodeUpdateParameters', + type: { + name: 'Composite', + class_name: 'DscNodeUpdateParameters', + model_properties: { + node_id: { + required: false, + serialized_name: 'nodeId', + type: { + name: 'String' + } + }, + node_configuration: { + required: false, + serialized_name: 'nodeConfiguration', + type: { + name: 'Composite', + class_name: 'DscNodeConfigurationAssociationProperty' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_error.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_error.rb new file mode 100644 index 0000000000..fcca5c25d7 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_error.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::ARM::Automation + module Models + # + # Definition of the dsc node report error type. + # + class DscReportError + + include MsRestAzure + + # @return [String] Gets or sets the source of the error. + attr_accessor :error_source + + # @return [String] Gets or sets the resource ID which generated the + # error. + attr_accessor :resource_id + + # @return [String] Gets or sets the error code. + attr_accessor :error_code + + # @return [String] Gets or sets the error message. + attr_accessor :error_message + + # @return [String] Gets or sets the locale of the error. + attr_accessor :locale + + # @return [String] Gets or sets the error details. + attr_accessor :error_details + + + # + # Mapper for DscReportError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscReportError', + type: { + name: 'Composite', + class_name: 'DscReportError', + model_properties: { + error_source: { + required: false, + serialized_name: 'errorSource', + type: { + name: 'String' + } + }, + resource_id: { + required: false, + serialized_name: 'resourceId', + type: { + name: 'String' + } + }, + error_code: { + required: false, + serialized_name: 'errorCode', + type: { + name: 'String' + } + }, + error_message: { + required: false, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + }, + locale: { + required: false, + serialized_name: 'locale', + type: { + name: 'String' + } + }, + error_details: { + required: false, + serialized_name: 'errorDetails', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_resource.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_resource.rb new file mode 100644 index 0000000000..fca73c37b7 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_resource.rb @@ -0,0 +1,143 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the DSC Report Resource. + # + class DscReportResource + + include MsRestAzure + + # @return [String] Gets or sets the ID of the resource. + attr_accessor :resource_id + + # @return [String] Gets or sets the source info of the resource. + attr_accessor :source_info + + # @return [Array] Gets or sets the Resource + # Navigation values for resources the resource depends on. + attr_accessor :depends_on + + # @return [String] Gets or sets the module name of the resource. + attr_accessor :module_name + + # @return [String] Gets or sets the module version of the resource. + attr_accessor :module_version + + # @return [String] Gets or sets the name of the resource. + attr_accessor :resource_name + + # @return [String] Gets or sets the error of the resource. + attr_accessor :error + + # @return [String] Gets or sets the status of the resource. + attr_accessor :status + + # @return [Float] Gets or sets the duration in seconds for the resource. + attr_accessor :duration_in_seconds + + # @return [DateTime] Gets or sets the start date of the resource. + attr_accessor :start_date + + + # + # Mapper for DscReportResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscReportResource', + type: { + name: 'Composite', + class_name: 'DscReportResource', + model_properties: { + resource_id: { + required: false, + serialized_name: 'resourceId', + type: { + name: 'String' + } + }, + source_info: { + required: false, + serialized_name: 'sourceInfo', + type: { + name: 'String' + } + }, + depends_on: { + required: false, + serialized_name: 'dependsOn', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DscReportResourceNavigationElementType', + type: { + name: 'Composite', + class_name: 'DscReportResourceNavigation' + } + } + } + }, + module_name: { + required: false, + serialized_name: 'moduleName', + type: { + name: 'String' + } + }, + module_version: { + required: false, + serialized_name: 'moduleVersion', + type: { + name: 'String' + } + }, + resource_name: { + required: false, + serialized_name: 'resourceName', + type: { + name: 'String' + } + }, + error: { + required: false, + serialized_name: 'error', + type: { + name: 'String' + } + }, + status: { + required: false, + serialized_name: 'status', + type: { + name: 'String' + } + }, + duration_in_seconds: { + required: false, + serialized_name: 'durationInSeconds', + type: { + name: 'Double' + } + }, + start_date: { + required: false, + serialized_name: 'startDate', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_resource_navigation.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_resource_navigation.rb new file mode 100644 index 0000000000..0338ab3306 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/dsc_report_resource_navigation.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::ARM::Automation + module Models + # + # Navigation for DSC Report Resource. + # + class DscReportResourceNavigation + + include MsRestAzure + + # @return [String] Gets or sets the ID of the resource to navigate to. + attr_accessor :resource_id + + + # + # Mapper for DscReportResourceNavigation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DscReportResourceNavigation', + type: { + name: 'Composite', + class_name: 'DscReportResourceNavigation', + model_properties: { + resource_id: { + required: false, + serialized_name: 'resourceId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/error_response.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/error_response.rb new file mode 100644 index 0000000000..ae4c614a48 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/error_response.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::ARM::Automation + module Models + # + # Error response of an operation failure + # + class ErrorResponse + + include MsRestAzure + + # @return [String] Error code + attr_accessor :code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :message + + + # + # 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: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/field_definition.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/field_definition.rb new file mode 100644 index 0000000000..ea1f71aa46 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/field_definition.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::ARM::Automation + module Models + # + # Definition of the connection fields. + # + class FieldDefinition + + include MsRestAzure + + # @return [Boolean] Gets or sets the isEncrypted flag of the connection + # field definition. + attr_accessor :is_encrypted + + # @return [Boolean] Gets or sets the isOptional flag of the connection + # field definition. + attr_accessor :is_optional + + # @return [String] Gets or sets the type of the connection field + # definition. + attr_accessor :type + + + # + # Mapper for FieldDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FieldDefinition', + type: { + name: 'Composite', + class_name: 'FieldDefinition', + model_properties: { + is_encrypted: { + required: false, + serialized_name: 'isEncrypted', + type: { + name: 'Boolean' + } + }, + is_optional: { + required: false, + serialized_name: 'isOptional', + type: { + name: 'Boolean' + } + }, + type: { + required: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/http_status_code.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/http_status_code.rb new file mode 100644 index 0000000000..a6a1979f69 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/http_status_code.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::ARM::Automation + module Models + # + # Defines values for HttpStatusCode + # + module HttpStatusCode + Continue = "Continue" + SwitchingProtocols = "SwitchingProtocols" + OK = "OK" + Created = "Created" + Accepted = "Accepted" + NonAuthoritativeInformation = "NonAuthoritativeInformation" + NoContent = "NoContent" + ResetContent = "ResetContent" + PartialContent = "PartialContent" + MultipleChoices = "MultipleChoices" + Ambiguous = "Ambiguous" + MovedPermanently = "MovedPermanently" + Moved = "Moved" + Found = "Found" + Redirect = "Redirect" + SeeOther = "SeeOther" + RedirectMethod = "RedirectMethod" + NotModified = "NotModified" + UseProxy = "UseProxy" + Unused = "Unused" + TemporaryRedirect = "TemporaryRedirect" + RedirectKeepVerb = "RedirectKeepVerb" + BadRequest = "BadRequest" + Unauthorized = "Unauthorized" + PaymentRequired = "PaymentRequired" + Forbidden = "Forbidden" + NotFound = "NotFound" + MethodNotAllowed = "MethodNotAllowed" + NotAcceptable = "NotAcceptable" + ProxyAuthenticationRequired = "ProxyAuthenticationRequired" + RequestTimeout = "RequestTimeout" + Conflict = "Conflict" + Gone = "Gone" + LengthRequired = "LengthRequired" + PreconditionFailed = "PreconditionFailed" + RequestEntityTooLarge = "RequestEntityTooLarge" + RequestUriTooLong = "RequestUriTooLong" + UnsupportedMediaType = "UnsupportedMediaType" + RequestedRangeNotSatisfiable = "RequestedRangeNotSatisfiable" + ExpectationFailed = "ExpectationFailed" + UpgradeRequired = "UpgradeRequired" + InternalServerError = "InternalServerError" + NotImplemented = "NotImplemented" + BadGateway = "BadGateway" + ServiceUnavailable = "ServiceUnavailable" + GatewayTimeout = "GatewayTimeout" + HttpVersionNotSupported = "HttpVersionNotSupported" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker.rb new file mode 100644 index 0000000000..a7761e1e34 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker.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::ARM::Automation + module Models + # + # Definition of hybrid runbook worker. + # + class HybridRunbookWorker + + include MsRestAzure + + # @return [String] Gets or sets the worker machine name. + attr_accessor :name + + # @return [String] Gets or sets the assigned machine IP address. + attr_accessor :ip + + # @return [DateTime] Gets or sets the registration time of the worker + # machine. + attr_accessor :registration_time + + + # + # Mapper for HybridRunbookWorker class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HybridRunbookWorker', + type: { + name: 'Composite', + class_name: 'HybridRunbookWorker', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + ip: { + required: false, + serialized_name: 'ip', + type: { + name: 'String' + } + }, + registration_time: { + required: false, + serialized_name: 'registrationTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group.rb new file mode 100644 index 0000000000..110fd5506d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group.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::ARM::Automation + module Models + # + # Definition of hybrid runbook worker group. + # + class HybridRunbookWorkerGroup + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [String] Gets or sets the name of the group. + attr_accessor :name + + # @return [Array] Gets or sets the list of hybrid + # runbook workers. + attr_accessor :hybrid_runbook_workers + + # @return [RunAsCredentialAssociationProperty] Sets the credential of a + # worker group. + attr_accessor :credential + + + # + # Mapper for HybridRunbookWorkerGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HybridRunbookWorkerGroup', + type: { + name: 'Composite', + class_name: 'HybridRunbookWorkerGroup', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + hybrid_runbook_workers: { + required: false, + serialized_name: 'hybridRunbookWorkers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HybridRunbookWorkerElementType', + type: { + name: 'Composite', + class_name: 'HybridRunbookWorker' + } + } + } + }, + credential: { + required: false, + serialized_name: 'credential', + type: { + name: 'Composite', + class_name: 'RunAsCredentialAssociationProperty' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group_update_parameters.rb new file mode 100644 index 0000000000..8a39a7d2c2 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group_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::ARM::Automation + module Models + # + # Parameters supplied to the update operation. + # + class HybridRunbookWorkerGroupUpdateParameters + + include MsRestAzure + + # @return [RunAsCredentialAssociationProperty] Sets the credential of a + # worker group. + attr_accessor :credential + + + # + # Mapper for HybridRunbookWorkerGroupUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HybridRunbookWorkerGroupUpdateParameters', + type: { + name: 'Composite', + class_name: 'HybridRunbookWorkerGroupUpdateParameters', + model_properties: { + credential: { + required: false, + serialized_name: 'credential', + type: { + name: 'Composite', + class_name: 'RunAsCredentialAssociationProperty' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_groups_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_groups_list_result.rb new file mode 100644 index 0000000000..b638944fbc --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_groups_list_result.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::ARM::Automation + module Models + # + # The response model for the list hybrid runbook worker groups. + # + class HybridRunbookWorkerGroupsListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of hybrid + # runbook worker groups. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [HybridRunbookWorkerGroupsListResult] 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 HybridRunbookWorkerGroupsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HybridRunbookWorkerGroupsListResult', + type: { + name: 'Composite', + class_name: 'HybridRunbookWorkerGroupsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HybridRunbookWorkerGroupElementType', + type: { + name: 'Composite', + class_name: 'HybridRunbookWorkerGroup' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job.rb new file mode 100644 index 0000000000..efcc0ea787 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job.rb @@ -0,0 +1,188 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the job. + # + class Job + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [RunbookAssociationProperty] Gets or sets the runbook. + attr_accessor :runbook + + # @return [String] Gets or sets the job started by. + attr_accessor :started_by + + # @return [String] Gets or sets the runOn which specifies the group name + # where the job is to be executed. + attr_accessor :run_on + + # @return Gets or sets the id of the job. + attr_accessor :job_id + + # @return [DateTime] Gets or sets the creation time of the job. + attr_accessor :creation_time + + # @return [JobStatus] Gets or sets the status of the job. Possible values + # include: 'New', 'Activating', 'Running', 'Completed', 'Failed', + # 'Stopped', 'Blocked', 'Suspended', 'Disconnected', 'Suspending', + # 'Stopping', 'Resuming', 'Removing' + attr_accessor :status + + # @return [String] Gets or sets the status details of the job. + attr_accessor :status_details + + # @return [DateTime] Gets or sets the start time of the job. + attr_accessor :start_time + + # @return [DateTime] Gets or sets the end time of the job. + attr_accessor :end_time + + # @return [String] Gets or sets the exception of the job. + attr_accessor :exception + + # @return [DateTime] Gets or sets the last modified time of the job. + attr_accessor :last_modified_time + + # @return [DateTime] Gets or sets the last status modified time of the + # job. + attr_accessor :last_status_modified_time + + # @return [Hash{String => String}] Gets or sets the parameters of the + # job. + attr_accessor :parameters + + + # + # Mapper for Job class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Job', + type: { + name: 'Composite', + class_name: 'Job', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + runbook: { + required: false, + serialized_name: 'properties.runbook', + type: { + name: 'Composite', + class_name: 'RunbookAssociationProperty' + } + }, + started_by: { + required: false, + serialized_name: 'properties.startedBy', + type: { + name: 'String' + } + }, + run_on: { + required: false, + serialized_name: 'properties.runOn', + type: { + name: 'String' + } + }, + job_id: { + required: false, + serialized_name: 'properties.jobId', + type: { + name: 'String' + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + status_details: { + required: false, + serialized_name: 'properties.statusDetails', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + exception: { + required: false, + serialized_name: 'properties.exception', + type: { + name: 'String' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + last_status_modified_time: { + required: false, + serialized_name: 'properties.lastStatusModifiedTime', + type: { + name: 'DateTime' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_create_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_create_parameters.rb new file mode 100644 index 0000000000..66e4a0531a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_create_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create job operation. + # + class JobCreateParameters + + include MsRestAzure + + # @return [RunbookAssociationProperty] Gets or sets the runbook. + attr_accessor :runbook + + # @return [Hash{String => String}] Gets or sets the parameters of the + # job. + attr_accessor :parameters + + # @return [String] Gets or sets the runOn which specifies the group name + # where the job is to be executed. + attr_accessor :run_on + + # @return [String] Gets or sets name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for JobCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobCreateParameters', + type: { + name: 'Composite', + class_name: 'JobCreateParameters', + model_properties: { + runbook: { + required: true, + serialized_name: 'properties.runbook', + type: { + name: 'Composite', + class_name: 'RunbookAssociationProperty' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + run_on: { + required: false, + serialized_name: 'properties.runOn', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_list_result.rb new file mode 100644 index 0000000000..b9cd31bfc3 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_list_result.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::ARM::Automation + module Models + # + # The response model for the list job operation. + # + class JobListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of jobs. + attr_accessor :value + + # @return [String] Gets or sets the next link. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobListResult] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for JobListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobListResult', + type: { + name: 'Composite', + class_name: 'JobListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobElementType', + type: { + name: 'Composite', + class_name: 'Job' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule.rb new file mode 100644 index 0000000000..47bb02e6ca --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule.rb @@ -0,0 +1,105 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the job schedule. + # + class JobSchedule + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [String] Gets or sets the id of job schedule. + attr_accessor :job_schedule_id + + # @return [ScheduleAssociationProperty] Gets or sets the schedule. + attr_accessor :schedule + + # @return [RunbookAssociationProperty] Gets or sets the runbook. + attr_accessor :runbook + + # @return [String] Gets or sets the hybrid worker group that the + # scheduled job should run on. + attr_accessor :run_on + + # @return [Hash{String => String}] Gets or sets the parameters of the job + # schedule. + attr_accessor :parameters + + + # + # Mapper for JobSchedule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobSchedule', + type: { + name: 'Composite', + class_name: 'JobSchedule', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + job_schedule_id: { + required: false, + serialized_name: 'properties.jobScheduleId', + type: { + name: 'String' + } + }, + schedule: { + required: false, + serialized_name: 'properties.schedule', + type: { + name: 'Composite', + class_name: 'ScheduleAssociationProperty' + } + }, + runbook: { + required: false, + serialized_name: 'properties.runbook', + type: { + name: 'Composite', + class_name: 'RunbookAssociationProperty' + } + }, + run_on: { + required: false, + serialized_name: 'properties.runOn', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule_create_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule_create_parameters.rb new file mode 100644 index 0000000000..a172d03dee --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule_create_parameters.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The parameters supplied to the create job schedule operation. + # + class JobScheduleCreateParameters + + include MsRestAzure + + # @return [ScheduleAssociationProperty] Gets or sets the schedule. + attr_accessor :schedule + + # @return [RunbookAssociationProperty] Gets or sets the runbook. + attr_accessor :runbook + + # @return [String] Gets or sets the hybrid worker group that the + # scheduled job should run on. + attr_accessor :run_on + + # @return [Hash{String => String}] Gets or sets a list of job properties. + attr_accessor :parameters + + + # + # Mapper for JobScheduleCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobScheduleCreateParameters', + type: { + name: 'Composite', + class_name: 'JobScheduleCreateParameters', + model_properties: { + schedule: { + required: true, + serialized_name: 'properties.schedule', + type: { + name: 'Composite', + class_name: 'ScheduleAssociationProperty' + } + }, + runbook: { + required: true, + serialized_name: 'properties.runbook', + type: { + name: 'Composite', + class_name: 'RunbookAssociationProperty' + } + }, + run_on: { + required: false, + serialized_name: 'properties.runOn', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule_list_result.rb new file mode 100644 index 0000000000..8f86a61787 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_schedule_list_result.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::ARM::Automation + module Models + # + # The response model for the list job schedule operation. + # + class JobScheduleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of job schedules. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [JobScheduleListResult] 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 JobScheduleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobScheduleListResult', + type: { + name: 'Composite', + class_name: 'JobScheduleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobScheduleElementType', + type: { + name: 'Composite', + class_name: 'JobSchedule' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_status.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_status.rb new file mode 100644 index 0000000000..3bc3613443 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_status.rb @@ -0,0 +1,27 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for JobStatus + # + module JobStatus + New = "New" + Activating = "Activating" + Running = "Running" + Completed = "Completed" + Failed = "Failed" + Stopped = "Stopped" + Blocked = "Blocked" + Suspended = "Suspended" + Disconnected = "Disconnected" + Suspending = "Suspending" + Stopping = "Stopping" + Resuming = "Resuming" + Removing = "Removing" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream.rb new file mode 100644 index 0000000000..080717e356 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream.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::ARM::Automation + module Models + # + # Definition of the job stream. + # + class JobStream + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [String] Gets or sets the id of the job stream. + attr_accessor :job_stream_id + + # @return [DateTime] Gets or sets the creation time of the job. + attr_accessor :time + + # @return [JobStreamType] Gets or sets the stream type. Possible values + # include: 'Progress', 'Output', 'Warning', 'Error', 'Debug', 'Verbose', + # 'Any' + attr_accessor :stream_type + + # @return [String] Gets or sets the stream text. + attr_accessor :stream_text + + # @return [String] Gets or sets the summary. + attr_accessor :summary + + # @return Gets or sets the values of the job stream. + attr_accessor :value + + + # + # Mapper for JobStream class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStream', + type: { + name: 'Composite', + class_name: 'JobStream', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + job_stream_id: { + required: false, + serialized_name: 'properties.jobStreamId', + type: { + name: 'String' + } + }, + time: { + required: false, + serialized_name: 'properties.time', + type: { + name: 'DateTime' + } + }, + stream_type: { + required: false, + serialized_name: 'properties.streamType', + type: { + name: 'String' + } + }, + stream_text: { + required: false, + serialized_name: 'properties.streamText', + type: { + name: 'String' + } + }, + summary: { + required: false, + serialized_name: 'properties.summary', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'properties.value', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream_list_result.rb new file mode 100644 index 0000000000..7c0b1cb31a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream_list_result.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::ARM::Automation + module Models + # + # The response model for the list job stream operation. + # + class JobStreamListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of job streams. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [JobStreamListResult] 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 JobStreamListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStreamListResult', + type: { + name: 'Composite', + class_name: 'JobStreamListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobStreamElementType', + type: { + name: 'Composite', + class_name: 'JobStream' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream_type.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream_type.rb new file mode 100644 index 0000000000..358ba67630 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/job_stream_type.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::ARM::Automation + module Models + # + # Defines values for JobStreamType + # + module JobStreamType + Progress = "Progress" + Output = "Output" + Warning = "Warning" + Error = "Error" + Debug = "Debug" + Verbose = "Verbose" + Any = "Any" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_create_or_update_parameters.rb new file mode 100644 index 0000000000..66bfae4b20 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_create_or_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::ARM::Automation + module Models + # + # The parameters supplied to the create or update module operation. + # + class ModuleCreateOrUpdateParameters + + include MsRestAzure + + # @return [ContentLink] Gets or sets the module content link. + attr_accessor :content_link + + # @return [String] Gets or sets name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for ModuleCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ModuleCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'ModuleCreateOrUpdateParameters', + model_properties: { + content_link: { + required: true, + serialized_name: 'properties.contentLink', + type: { + name: 'Composite', + class_name: 'ContentLink' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_error_info.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_error_info.rb new file mode 100644 index 0000000000..7f80b533a6 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_error_info.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::ARM::Automation + module Models + # + # Definition of the module error info type. + # + class ModuleErrorInfo + + include MsRestAzure + + # @return [String] Gets or sets the error code. + attr_accessor :code + + # @return [String] Gets or sets the error message. + attr_accessor :message + + + # + # Mapper for ModuleErrorInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ModuleErrorInfo', + type: { + name: 'Composite', + class_name: 'ModuleErrorInfo', + model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_list_result.rb new file mode 100644 index 0000000000..ad7708bb27 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_list_result.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::ARM::Automation + module Models + # + # The response model for the list module operation. + # + class ModuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of modules. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [ModuleListResult] 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 ModuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ModuleListResult', + type: { + name: 'Composite', + class_name: 'ModuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ModuleModelElementType', + type: { + name: 'Composite', + class_name: 'ModuleModel' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_model.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_model.rb new file mode 100644 index 0000000000..18a9a799c4 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_model.rb @@ -0,0 +1,198 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the module type. + # + class ModuleModel < Resource + + include MsRestAzure + + # @return [Boolean] Gets or sets the isGlobal flag of the module. + attr_accessor :is_global + + # @return [String] Gets or sets the version of the module. + attr_accessor :version + + # @return [Integer] Gets or sets the size in bytes of the module. + attr_accessor :size_in_bytes + + # @return [Integer] Gets or sets the activity count of the module. + attr_accessor :activity_count + + # @return [ModuleProvisioningState] Gets or sets the provisioning state + # of the module. Possible values include: 'Created', 'Creating', + # 'StartingImportModuleRunbook', 'RunningImportModuleRunbook', + # 'ContentRetrieved', 'ContentDownloaded', 'ContentValidated', + # 'ConnectionTypeImported', 'ContentStored', 'ModuleDataStored', + # 'ActivitiesStored', 'ModuleImportRunbookComplete', 'Succeeded', + # 'Failed', 'Cancelled', 'Updating' + attr_accessor :provisioning_state + + # @return [ContentLink] Gets or sets the contentLink of the module. + attr_accessor :content_link + + # @return [ModuleErrorInfo] Gets or sets the error info of the module. + attr_accessor :error + + # @return [DateTime] Gets or sets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + # @return [String] Gets or sets the etag of the resource. + attr_accessor :etag + + + # + # Mapper for ModuleModel class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Module', + type: { + name: 'Composite', + class_name: 'ModuleModel', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + is_global: { + required: false, + serialized_name: 'properties.isGlobal', + type: { + name: 'Boolean' + } + }, + version: { + required: false, + serialized_name: 'properties.version', + type: { + name: 'String' + } + }, + size_in_bytes: { + required: false, + serialized_name: 'properties.sizeInBytes', + type: { + name: 'Number' + } + }, + activity_count: { + required: false, + serialized_name: 'properties.activityCount', + type: { + name: 'Number' + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'ModuleProvisioningState' + } + }, + content_link: { + required: false, + serialized_name: 'properties.contentLink', + type: { + name: 'Composite', + class_name: 'ContentLink' + } + }, + error: { + required: false, + serialized_name: 'properties.error', + type: { + name: 'Composite', + class_name: 'ModuleErrorInfo' + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_provisioning_state.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_provisioning_state.rb new file mode 100644 index 0000000000..46c319bbae --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_provisioning_state.rb @@ -0,0 +1,30 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for ModuleProvisioningState + # + module ModuleProvisioningState + Created = "Created" + Creating = "Creating" + StartingImportModuleRunbook = "StartingImportModuleRunbook" + RunningImportModuleRunbook = "RunningImportModuleRunbook" + ContentRetrieved = "ContentRetrieved" + ContentDownloaded = "ContentDownloaded" + ContentValidated = "ContentValidated" + ConnectionTypeImported = "ConnectionTypeImported" + ContentStored = "ContentStored" + ModuleDataStored = "ModuleDataStored" + ActivitiesStored = "ActivitiesStored" + ModuleImportRunbookComplete = "ModuleImportRunbookComplete" + Succeeded = "Succeeded" + Failed = "Failed" + Cancelled = "Cancelled" + Updating = "Updating" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_update_parameters.rb new file mode 100644 index 0000000000..70d6ad0d11 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/module_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::ARM::Automation + module Models + # + # The parameters supplied to the update module operation. + # + class ModuleUpdateParameters + + include MsRestAzure + + # @return [ContentLink] Gets or sets the module content link. + attr_accessor :content_link + + # @return [String] Gets or sets name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for ModuleUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ModuleUpdateParameters', + type: { + name: 'Composite', + class_name: 'ModuleUpdateParameters', + model_properties: { + content_link: { + required: false, + serialized_name: 'properties.contentLink', + type: { + name: 'Composite', + class_name: 'ContentLink' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation.rb new file mode 100644 index 0000000000..33ca06abdd --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation.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::ARM::Automation + module Models + # + # Automation REST API operation + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation} + attr_accessor :name + + # @return [OperationDisplay] Provider, Resource and Operation values + attr_accessor :display + + + # + # 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' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation_display.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation_display.rb new file mode 100644 index 0000000000..cae74e082c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation_display.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::ARM::Automation + module Models + # + # Provider, Resource and Operation values + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.Automation + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: + # Runbooks, Jobs etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation_list_result.rb new file mode 100644 index 0000000000..b914c59df8 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/operation_list_result.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The response model for the list of Automation operations + # + class OperationListResult + + include MsRestAzure + + # @return [Array] List of Automation operations supported by + # the Automation resource provider. + attr_accessor :value + + + # + # 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' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/resource.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/resource.rb new file mode 100644 index 0000000000..37fbbf4beb --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/resource.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::ARM::Automation + 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 + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/run_as_credential_association_property.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/run_as_credential_association_property.rb new file mode 100644 index 0000000000..b2853a1fce --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/run_as_credential_association_property.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::ARM::Automation + module Models + # + # Definition of runas credential to use for hybrid worker. + # + class RunAsCredentialAssociationProperty + + include MsRestAzure + + # @return [String] Gets or sets the name of the credential. + attr_accessor :name + + + # + # Mapper for RunAsCredentialAssociationProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunAsCredentialAssociationProperty', + type: { + name: 'Composite', + class_name: 'RunAsCredentialAssociationProperty', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook.rb new file mode 100644 index 0000000000..470e0f3f6d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook.rb @@ -0,0 +1,263 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the runbook type. + # + class Runbook < Resource + + include MsRestAzure + + # @return [RunbookTypeEnum] Gets or sets the type of the runbook. + # Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + # 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + attr_accessor :runbook_type + + # @return [ContentLink] Gets or sets the published runbook content link. + attr_accessor :publish_content_link + + # @return [RunbookState] Gets or sets the state of the runbook. Possible + # values include: 'New', 'Edit', 'Published' + attr_accessor :state + + # @return [Boolean] Gets or sets verbose log option. + attr_accessor :log_verbose + + # @return [Boolean] Gets or sets progress log option. + attr_accessor :log_progress + + # @return [Integer] Gets or sets the option to log activity trace of the + # runbook. + attr_accessor :log_activity_trace + + # @return [Integer] Gets or sets the job count of the runbook. + attr_accessor :job_count + + # @return [Hash{String => RunbookParameter}] Gets or sets the runbook + # parameters. + attr_accessor :parameters + + # @return [Array] Gets or sets the runbook output types. + attr_accessor :output_types + + # @return [RunbookDraft] Gets or sets the draft runbook properties. + attr_accessor :draft + + # @return [RunbookProvisioningState] Gets or sets the provisioning state + # of the runbook. Possible values include: 'Succeeded' + attr_accessor :provisioning_state + + # @return [String] Gets or sets the last modified by. + attr_accessor :last_modified_by + + # @return [DateTime] Gets or sets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + # @return [String] Gets or sets the etag of the resource. + attr_accessor :etag + + + # + # Mapper for Runbook class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Runbook', + type: { + name: 'Composite', + class_name: 'Runbook', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + runbook_type: { + required: false, + serialized_name: 'properties.runbookType', + type: { + name: 'String' + } + }, + publish_content_link: { + required: false, + serialized_name: 'properties.publishContentLink', + type: { + name: 'Composite', + class_name: 'ContentLink' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + log_verbose: { + required: false, + serialized_name: 'properties.logVerbose', + type: { + name: 'Boolean' + } + }, + log_progress: { + required: false, + serialized_name: 'properties.logProgress', + type: { + name: 'Boolean' + } + }, + log_activity_trace: { + required: false, + serialized_name: 'properties.logActivityTrace', + type: { + name: 'Number' + } + }, + job_count: { + required: false, + serialized_name: 'properties.jobCount', + type: { + name: 'Number' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'RunbookParameterElementType', + type: { + name: 'Composite', + class_name: 'RunbookParameter' + } + } + } + }, + output_types: { + required: false, + serialized_name: 'properties.outputTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + draft: { + required: false, + serialized_name: 'properties.draft', + type: { + name: 'Composite', + class_name: 'RunbookDraft' + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'RunbookProvisioningState' + } + }, + last_modified_by: { + required: false, + serialized_name: 'properties.lastModifiedBy', + type: { + name: 'String' + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_association_property.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_association_property.rb new file mode 100644 index 0000000000..78f5c6ff98 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_association_property.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::ARM::Automation + module Models + # + # The runbook property associated with the entity. + # + class RunbookAssociationProperty + + include MsRestAzure + + # @return [String] Gets or sets the name of the runbook. + attr_accessor :name + + + # + # Mapper for RunbookAssociationProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookAssociationProperty', + type: { + name: 'Composite', + class_name: 'RunbookAssociationProperty', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_parameters.rb new file mode 100644 index 0000000000..7d6dc887cd --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update runbook operation. + # + class RunbookCreateOrUpdateDraftParameters + + include MsRestAzure + + # @return [String] Content of the Runbook. + attr_accessor :runbook_content + + + # + # Mapper for RunbookCreateOrUpdateDraftParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookCreateOrUpdateDraftParameters', + type: { + name: 'Composite', + class_name: 'RunbookCreateOrUpdateDraftParameters', + model_properties: { + runbook_content: { + required: true, + serialized_name: 'runbookContent', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_properties.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_properties.rb new file mode 100644 index 0000000000..5656d55a0f --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_properties.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update dratft runbook + # properties. + # + class RunbookCreateOrUpdateDraftProperties + + include MsRestAzure + + # @return [Boolean] Gets or sets verbose log option. + attr_accessor :log_verbose + + # @return [Boolean] Gets or sets progress log option. + attr_accessor :log_progress + + # @return [RunbookTypeEnum] Gets or sets the type of the runbook. + # Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + # 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + attr_accessor :runbook_type + + # @return [RunbookDraft] Gets or sets the draft runbook properties. + attr_accessor :draft + + # @return [String] Gets or sets the description of the runbook. + attr_accessor :description + + # @return [Integer] Gets or sets the activity-level tracing options of + # the runbook. + attr_accessor :log_activity_trace + + + # + # Mapper for RunbookCreateOrUpdateDraftProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookCreateOrUpdateDraftProperties', + type: { + name: 'Composite', + class_name: 'RunbookCreateOrUpdateDraftProperties', + model_properties: { + log_verbose: { + required: false, + serialized_name: 'logVerbose', + type: { + name: 'Boolean' + } + }, + log_progress: { + required: false, + serialized_name: 'logProgress', + type: { + name: 'Boolean' + } + }, + runbook_type: { + required: true, + serialized_name: 'runbookType', + type: { + name: 'String' + } + }, + draft: { + required: true, + serialized_name: 'draft', + type: { + name: 'Composite', + class_name: 'RunbookDraft' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + log_activity_trace: { + required: false, + serialized_name: 'logActivityTrace', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_parameters.rb new file mode 100644 index 0000000000..ed8dfc3b7a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update runbook operation. + # + class RunbookCreateOrUpdateParameters + + include MsRestAzure + + # @return [Boolean] Gets or sets verbose log option. + attr_accessor :log_verbose + + # @return [Boolean] Gets or sets progress log option. + attr_accessor :log_progress + + # @return [RunbookTypeEnum] Gets or sets the type of the runbook. + # Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + # 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + attr_accessor :runbook_type + + # @return [RunbookDraft] Gets or sets the draft runbook properties. + attr_accessor :draft + + # @return [ContentLink] Gets or sets the published runbook content link. + attr_accessor :publish_content_link + + # @return [String] Gets or sets the description of the runbook. + attr_accessor :description + + # @return [Integer] Gets or sets the activity-level tracing options of + # the runbook. + attr_accessor :log_activity_trace + + # @return [String] Gets or sets the name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for RunbookCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'RunbookCreateOrUpdateParameters', + model_properties: { + log_verbose: { + required: false, + serialized_name: 'properties.logVerbose', + type: { + name: 'Boolean' + } + }, + log_progress: { + required: false, + serialized_name: 'properties.logProgress', + type: { + name: 'Boolean' + } + }, + runbook_type: { + required: true, + serialized_name: 'properties.runbookType', + type: { + name: 'String' + } + }, + draft: { + required: false, + serialized_name: 'properties.draft', + type: { + name: 'Composite', + class_name: 'RunbookDraft' + } + }, + publish_content_link: { + required: false, + serialized_name: 'properties.publishContentLink', + type: { + name: 'Composite', + class_name: 'ContentLink' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + log_activity_trace: { + required: false, + serialized_name: 'properties.logActivityTrace', + type: { + name: 'Number' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_draft.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_draft.rb new file mode 100644 index 0000000000..f3555e2e76 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_draft.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::ARM::Automation + module Models + # + # Definition of the runbook type. + # + class RunbookDraft + + include MsRestAzure + + # @return [Boolean] Gets or sets whether runbook is in edit mode. + attr_accessor :in_edit + + # @return [ContentLink] Gets or sets the draft runbook content link. + attr_accessor :draft_content_link + + # @return [DateTime] Gets or sets the creation time of the runbook draft. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time of the runbook + # draft. + attr_accessor :last_modified_time + + # @return [Hash{String => RunbookParameter}] Gets or sets the runbook + # draft parameters. + attr_accessor :parameters + + # @return [Array] Gets or sets the runbook output types. + attr_accessor :output_types + + + # + # Mapper for RunbookDraft class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookDraft', + type: { + name: 'Composite', + class_name: 'RunbookDraft', + model_properties: { + in_edit: { + required: false, + serialized_name: 'inEdit', + type: { + name: 'Boolean' + } + }, + draft_content_link: { + required: false, + serialized_name: 'draftContentLink', + type: { + name: 'Composite', + class_name: 'ContentLink' + } + }, + creation_time: { + required: false, + serialized_name: 'creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'lastModifiedTime', + type: { + name: 'DateTime' + } + }, + parameters: { + required: false, + serialized_name: 'parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'RunbookParameterElementType', + type: { + name: 'Composite', + class_name: 'RunbookParameter' + } + } + } + }, + output_types: { + required: false, + serialized_name: 'outputTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_draft_undo_edit_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_draft_undo_edit_result.rb new file mode 100644 index 0000000000..dc8a1b0e69 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_draft_undo_edit_result.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::ARM::Automation + module Models + # + # The response model for the undoedit runbook operation. + # + class RunbookDraftUndoEditResult + + include MsRestAzure + + # @return [HttpStatusCode] Possible values include: 'Continue', + # 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + # 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + # 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + # 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', + # 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + # 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', + # 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', + # 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', + # 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', + # 'RequestUriTooLong', 'UnsupportedMediaType', + # 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', + # 'InternalServerError', 'NotImplemented', 'BadGateway', + # 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported' + attr_accessor :status_code + + # @return [String] + attr_accessor :request_id + + + # + # Mapper for RunbookDraftUndoEditResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookDraftUndoEditResult', + type: { + name: 'Composite', + class_name: 'RunbookDraftUndoEditResult', + model_properties: { + status_code: { + required: false, + serialized_name: 'statusCode', + type: { + name: 'Enum', + module: 'HttpStatusCode' + } + }, + request_id: { + required: false, + serialized_name: 'requestId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_list_result.rb new file mode 100644 index 0000000000..8c2d97f03d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_list_result.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::ARM::Automation + module Models + # + # The response model for the list runbook operation. + # + class RunbookListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of runbooks. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [RunbookListResult] 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 RunbookListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookListResult', + type: { + name: 'Composite', + class_name: 'RunbookListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RunbookElementType', + type: { + name: 'Composite', + class_name: 'Runbook' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_parameter.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_parameter.rb new file mode 100644 index 0000000000..25a6f9710b --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_parameter.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::ARM::Automation + module Models + # + # Definition of the runbook parameter type. + # + class RunbookParameter + + include MsRestAzure + + # @return [String] Gets or sets the type of the parameter. + attr_accessor :type + + # @return [Boolean] Gets or sets a Boolean value to indicate whether the + # parameter is madatory or not. + attr_accessor :is_mandatory + + # @return [Integer] Get or sets the position of the parameter. + attr_accessor :position + + # @return [String] Gets or sets the default value of parameter. + attr_accessor :default_value + + + # + # Mapper for RunbookParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookParameter', + type: { + name: 'Composite', + class_name: 'RunbookParameter', + model_properties: { + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + is_mandatory: { + required: false, + serialized_name: 'isMandatory', + type: { + name: 'Boolean' + } + }, + position: { + required: false, + serialized_name: 'position', + type: { + name: 'Number' + } + }, + default_value: { + required: false, + serialized_name: 'defaultValue', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_provisioning_state.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_provisioning_state.rb new file mode 100644 index 0000000000..77d1c108f7 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_provisioning_state.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for RunbookProvisioningState + # + module RunbookProvisioningState + Succeeded = "Succeeded" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_state.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_state.rb new file mode 100644 index 0000000000..bf106c042c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_state.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Defines values for RunbookState + # + module RunbookState + New = "New" + Edit = "Edit" + Published = "Published" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_type_enum.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_type_enum.rb new file mode 100644 index 0000000000..17da499b07 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_type_enum.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::ARM::Automation + module Models + # + # Defines values for RunbookTypeEnum + # + module RunbookTypeEnum + Script = "Script" + Graph = "Graph" + PowerShellWorkflow = "PowerShellWorkflow" + PowerShell = "PowerShell" + GraphPowerShellWorkflow = "GraphPowerShellWorkflow" + GraphPowerShell = "GraphPowerShell" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_update_parameters.rb new file mode 100644 index 0000000000..d4c8a2e03b --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/runbook_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the update runbook operation. + # + class RunbookUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the description of the runbook. + attr_accessor :description + + # @return [Boolean] Gets or sets verbose log option. + attr_accessor :log_verbose + + # @return [Boolean] Gets or sets progress log option. + attr_accessor :log_progress + + # @return [Integer] Gets or sets the activity-level tracing options of + # the runbook. + attr_accessor :log_activity_trace + + # @return [String] Gets or sets the name of the resource. + attr_accessor :name + + # @return [String] Gets or sets the location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets the tags attached to the + # resource. + attr_accessor :tags + + + # + # Mapper for RunbookUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunbookUpdateParameters', + type: { + name: 'Composite', + class_name: 'RunbookUpdateParameters', + model_properties: { + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + log_verbose: { + required: false, + serialized_name: 'properties.logVerbose', + type: { + name: 'Boolean' + } + }, + log_progress: { + required: false, + serialized_name: 'properties.logProgress', + type: { + name: 'Boolean' + } + }, + log_activity_trace: { + required: false, + serialized_name: 'properties.logActivityTrace', + type: { + name: 'Number' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule.rb new file mode 100644 index 0000000000..a3195673cb --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule.rb @@ -0,0 +1,199 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the schedule. + # + class Schedule + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [String] Gets or sets the name of the schedule. + attr_accessor :name + + # @return [DateTime] Gets or sets the start time of the schedule. + attr_accessor :start_time + + # @return [Float] Gets the start time's offset in minutes. + attr_accessor :start_time_offset_minutes + + # @return [DateTime] Gets or sets the end time of the schedule. + attr_accessor :expiry_time + + # @return [Float] Gets or sets the expiry time's offset in minutes. + attr_accessor :expiry_time_offset_minutes + + # @return [Boolean] Gets or sets a value indicating whether this schedule + # is enabled. Default value: false . + attr_accessor :is_enabled + + # @return [DateTime] Gets or sets the next run time of the schedule. + attr_accessor :next_run + + # @return [Float] Gets or sets the next run time's offset in minutes. + attr_accessor :next_run_offset_minutes + + # @return Gets or sets the interval of the schedule. + attr_accessor :interval + + # @return [ScheduleFrequency] Gets or sets the frequency of the schedule. + # Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + attr_accessor :frequency + + # @return [String] Gets or sets the time zone of the schedule. + attr_accessor :time_zone + + # @return [AdvancedSchedule] Gets or sets the advanced schedule. + attr_accessor :advanced_schedule + + # @return [DateTime] Gets or sets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for Schedule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Schedule', + type: { + name: 'Composite', + class_name: 'Schedule', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + start_time_offset_minutes: { + required: false, + read_only: true, + serialized_name: 'properties.startTimeOffsetMinutes', + type: { + name: 'Double' + } + }, + expiry_time: { + required: false, + serialized_name: 'properties.expiryTime', + type: { + name: 'DateTime' + } + }, + expiry_time_offset_minutes: { + required: false, + serialized_name: 'properties.expiryTimeOffsetMinutes', + type: { + name: 'Double' + } + }, + is_enabled: { + required: false, + serialized_name: 'properties.isEnabled', + default_value: false, + type: { + name: 'Boolean' + } + }, + next_run: { + required: false, + serialized_name: 'properties.nextRun', + type: { + name: 'DateTime' + } + }, + next_run_offset_minutes: { + required: false, + serialized_name: 'properties.nextRunOffsetMinutes', + type: { + name: 'Double' + } + }, + interval: { + required: false, + serialized_name: 'properties.interval', + type: { + name: 'Object' + } + }, + frequency: { + required: false, + serialized_name: 'properties.frequency', + type: { + name: 'String' + } + }, + time_zone: { + required: false, + serialized_name: 'properties.timeZone', + type: { + name: 'String' + } + }, + advanced_schedule: { + required: false, + serialized_name: 'properties.advancedSchedule', + type: { + name: 'Composite', + class_name: 'AdvancedSchedule' + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_association_property.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_association_property.rb new file mode 100644 index 0000000000..ecfceb8c8d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_association_property.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::ARM::Automation + module Models + # + # The schedule property associated with the entity. + # + class ScheduleAssociationProperty + + include MsRestAzure + + # @return [String] Gets or sets the name of the schedule. + attr_accessor :name + + + # + # Mapper for ScheduleAssociationProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ScheduleAssociationProperty', + type: { + name: 'Composite', + class_name: 'ScheduleAssociationProperty', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_create_or_update_parameters.rb new file mode 100644 index 0000000000..9e19b8cf27 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_create_or_update_parameters.rb @@ -0,0 +1,116 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The parameters supplied to the create or update schedule operation. + # + class ScheduleCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the schedule. + attr_accessor :name + + # @return [String] Gets or sets the description of the schedule. + attr_accessor :description + + # @return [DateTime] Gets or sets the start time of the schedule. + attr_accessor :start_time + + # @return [DateTime] Gets or sets the end time of the schedule. + attr_accessor :expiry_time + + # @return Gets or sets the interval of the schedule. + attr_accessor :interval + + # @return [ScheduleFrequency] Gets or sets the frequency of the schedule. + # Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + attr_accessor :frequency + + # @return [String] Gets or sets the time zone of the schedule. + attr_accessor :time_zone + + # @return [AdvancedSchedule] Gets or sets the AdvancedSchedule. + attr_accessor :advanced_schedule + + + # + # Mapper for ScheduleCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ScheduleCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'ScheduleCreateOrUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + start_time: { + required: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + expiry_time: { + required: false, + serialized_name: 'properties.expiryTime', + type: { + name: 'DateTime' + } + }, + interval: { + required: false, + serialized_name: 'properties.interval', + type: { + name: 'Object' + } + }, + frequency: { + required: true, + serialized_name: 'properties.frequency', + type: { + name: 'String' + } + }, + time_zone: { + required: false, + serialized_name: 'properties.timeZone', + type: { + name: 'String' + } + }, + advanced_schedule: { + required: false, + serialized_name: 'properties.advancedSchedule', + type: { + name: 'Composite', + class_name: 'AdvancedSchedule' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_day.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_day.rb new file mode 100644 index 0000000000..5569fe5e97 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_day.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::ARM::Automation + module Models + # + # Defines values for ScheduleDay + # + module ScheduleDay + Monday = "Monday" + Tuesday = "Tuesday" + Wednesday = "Wednesday" + Thursday = "Thursday" + Friday = "Friday" + Saturday = "Saturday" + Sunday = "Sunday" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_frequency.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_frequency.rb new file mode 100644 index 0000000000..da7fd8edc2 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_frequency.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::ARM::Automation + module Models + # + # Defines values for ScheduleFrequency + # + module ScheduleFrequency + OneTime = "OneTime" + Day = "Day" + Hour = "Hour" + Week = "Week" + Month = "Month" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_list_result.rb new file mode 100644 index 0000000000..fe36ea2b6d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_list_result.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::ARM::Automation + module Models + # + # The response model for the list schedule operation. + # + class ScheduleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of schedules. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [ScheduleListResult] 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 ScheduleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ScheduleListResult', + type: { + name: 'Composite', + class_name: 'ScheduleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ScheduleElementType', + type: { + name: 'Composite', + class_name: 'Schedule' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_update_parameters.rb new file mode 100644 index 0000000000..d7861335e9 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/schedule_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the update schedule operation. + # + class ScheduleUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the schedule. + attr_accessor :name + + # @return [String] Gets or sets the description of the schedule. + attr_accessor :description + + # @return [Boolean] Gets or sets a value indicating whether this schedule + # is enabled. + attr_accessor :is_enabled + + + # + # Mapper for ScheduleUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ScheduleUpdateParameters', + type: { + name: 'Composite', + class_name: 'ScheduleUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + is_enabled: { + required: false, + serialized_name: 'properties.isEnabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sku.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sku.rb new file mode 100644 index 0000000000..bb12d59e17 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sku.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::ARM::Automation + module Models + # + # The account SKU. + # + class Sku + + include MsRestAzure + + # @return [SkuNameEnum] Gets or sets the SKU name of the account. + # Possible values include: 'Free', 'Basic' + attr_accessor :name + + # @return [String] Gets or sets the SKU family. + attr_accessor :family + + # @return [Integer] Gets or sets the SKU capacity. + attr_accessor :capacity + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + family: { + required: false, + serialized_name: 'family', + type: { + name: 'String' + } + }, + capacity: { + required: false, + serialized_name: 'capacity', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sku_name_enum.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sku_name_enum.rb new file mode 100644 index 0000000000..47a40ba740 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sku_name_enum.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::ARM::Automation + module Models + # + # Defines values for SkuNameEnum + # + module SkuNameEnum + Free = "Free" + Basic = "Basic" + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/statistics.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/statistics.rb new file mode 100644 index 0000000000..8bed5d2a1c --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/statistics.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::ARM::Automation + module Models + # + # Definition of the statistic. + # + class Statistics + + include MsRestAzure + + # @return [String] Gets the property value of the statistic. + attr_accessor :counter_property + + # @return [Integer] Gets the value of the statistic. + attr_accessor :counter_value + + # @return [DateTime] Gets the startTime of the statistic. + attr_accessor :start_time + + # @return [DateTime] Gets the endTime of the statistic. + attr_accessor :end_time + + # @return [String] Gets the id. + attr_accessor :id + + + # + # Mapper for Statistics class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Statistics', + type: { + name: 'Composite', + class_name: 'Statistics', + model_properties: { + counter_property: { + required: false, + read_only: true, + serialized_name: 'counterProperty', + type: { + name: 'String' + } + }, + counter_value: { + required: false, + read_only: true, + serialized_name: 'counterValue', + type: { + name: 'Number' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + read_only: true, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/statistics_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/statistics_list_result.rb new file mode 100644 index 0000000000..6452b6c388 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/statistics_list_result.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::ARM::Automation + module Models + # + # The response model for the list statistics operation. + # + class StatisticsListResult + + include MsRestAzure + + # @return [Array] Gets or sets a list of statistics. + attr_accessor :value + + + # + # Mapper for StatisticsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StatisticsListResult', + type: { + name: 'Composite', + class_name: 'StatisticsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StatisticsElementType', + type: { + name: 'Composite', + class_name: 'Statistics' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sub_resource.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sub_resource.rb new file mode 100644 index 0000000000..2eb139dea8 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/sub_resource.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::ARM::Automation + module Models + # + # The Sub Resource definition. + # + class SubResource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + + # + # Mapper for SubResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubResource', + type: { + name: 'Composite', + class_name: 'SubResource', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/test_job.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/test_job.rb new file mode 100644 index 0000000000..d5e8cd6dae --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/test_job.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::ARM::Automation + module Models + # + # Definition of the test job. + # + class TestJob + + include MsRestAzure + + # @return [DateTime] Gets or sets the creation time of the test job. + attr_accessor :creation_time + + # @return [String] Gets or sets the status of the test job. + attr_accessor :status + + # @return [String] Gets or sets the status details of the test job. + attr_accessor :status_details + + # @return [String] Gets or sets the runOn which specifies the group name + # where the job is to be executed. + attr_accessor :run_on + + # @return [DateTime] Gets or sets the start time of the test job. + attr_accessor :start_time + + # @return [DateTime] Gets or sets the end time of the test job. + attr_accessor :end_time + + # @return [String] Gets or sets the exception of the test job. + attr_accessor :exception + + # @return [DateTime] Gets or sets the last modified time of the test job. + attr_accessor :last_modified_time + + # @return [DateTime] Gets or sets the last status modified time of the + # test job. + attr_accessor :last_status_modified_time + + # @return [Hash{String => String}] Gets or sets the parameters of the + # test job. + attr_accessor :parameters + + + # + # Mapper for TestJob class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TestJob', + type: { + name: 'Composite', + class_name: 'TestJob', + model_properties: { + creation_time: { + required: false, + serialized_name: 'creationTime', + type: { + name: 'DateTime' + } + }, + status: { + required: false, + serialized_name: 'status', + type: { + name: 'String' + } + }, + status_details: { + required: false, + serialized_name: 'statusDetails', + type: { + name: 'String' + } + }, + run_on: { + required: false, + serialized_name: 'runOn', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + exception: { + required: false, + serialized_name: 'exception', + type: { + name: 'String' + } + }, + last_modified_time: { + required: false, + serialized_name: 'lastModifiedTime', + type: { + name: 'DateTime' + } + }, + last_status_modified_time: { + required: false, + serialized_name: 'lastStatusModifiedTime', + type: { + name: 'DateTime' + } + }, + parameters: { + required: false, + serialized_name: 'parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/test_job_create_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/test_job_create_parameters.rb new file mode 100644 index 0000000000..8ead444523 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/test_job_create_parameters.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The parameters supplied to the create test job operation. + # + class TestJobCreateParameters + + include MsRestAzure + + # @return [String] Gets or sets the runbook name. + attr_accessor :runbook_name + + # @return [Hash{String => String}] Gets or sets the parameters of the + # test job. + attr_accessor :parameters + + # @return [String] Gets or sets the runOn which specifies the group name + # where the job is to be executed. + attr_accessor :run_on + + + # + # Mapper for TestJobCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TestJobCreateParameters', + type: { + name: 'Composite', + class_name: 'TestJobCreateParameters', + model_properties: { + runbook_name: { + required: true, + serialized_name: 'runbookName', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + run_on: { + required: false, + serialized_name: 'runOn', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/type_field.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/type_field.rb new file mode 100644 index 0000000000..b1bd507a30 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/type_field.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::ARM::Automation + module Models + # + # Information about a field of a type. + # + class TypeField + + include MsRestAzure + + # @return [String] Gets or sets the name of the field. + attr_accessor :name + + # @return [String] Gets or sets the type of the field. + attr_accessor :type + + + # + # Mapper for TypeField class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TypeField', + type: { + name: 'Composite', + class_name: 'TypeField', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/type_field_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/type_field_list_result.rb new file mode 100644 index 0000000000..cc9d1c1197 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/type_field_list_result.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::ARM::Automation + module Models + # + # The response model for the list fields operation. + # + class TypeFieldListResult + + include MsRestAzure + + # @return [Array] Gets or sets a list of fields. + attr_accessor :value + + + # + # Mapper for TypeFieldListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TypeFieldListResult', + type: { + name: 'Composite', + class_name: 'TypeFieldListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TypeFieldElementType', + type: { + name: 'Composite', + class_name: 'TypeField' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage.rb new file mode 100644 index 0000000000..51a9c8063d --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage.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::ARM::Automation + module Models + # + # Definition of Usage. + # + class Usage + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [UsageCounterName] Gets or sets the usage counter name. + attr_accessor :name + + # @return [String] Gets or sets the usage unit name. + attr_accessor :unit + + # @return [Float] Gets or sets the current usage value. + attr_accessor :current_value + + # @return [Integer] Gets or sets max limit. -1 for unlimited + attr_accessor :limit + + # @return [String] Gets or sets the throttle status. + attr_accessor :throttle_status + + + # + # Mapper for Usage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Usage', + type: { + name: 'Composite', + class_name: 'Usage', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'Composite', + class_name: 'UsageCounterName' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + current_value: { + required: false, + serialized_name: 'currentValue', + type: { + name: 'Double' + } + }, + limit: { + required: false, + serialized_name: 'limit', + type: { + name: 'Number' + } + }, + throttle_status: { + required: false, + serialized_name: 'throttleStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage_counter_name.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage_counter_name.rb new file mode 100644 index 0000000000..ecac8340d6 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage_counter_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::ARM::Automation + module Models + # + # Definition of usage counter name. + # + class UsageCounterName + + include MsRestAzure + + # @return [String] Gets or sets the usage counter name. + attr_accessor :value + + # @return [String] Gets or sets the localized usage counter name. + attr_accessor :localized_value + + + # + # Mapper for UsageCounterName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UsageCounterName', + type: { + name: 'Composite', + class_name: 'UsageCounterName', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + }, + localized_value: { + required: false, + serialized_name: 'localizedValue', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage_list_result.rb new file mode 100644 index 0000000000..c4a9ba7357 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/usage_list_result.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::ARM::Automation + module Models + # + # The response model for the get usage operation. + # + class UsageListResult + + include MsRestAzure + + # @return [Array] Gets or sets usage. + attr_accessor :value + + + # + # Mapper for UsageListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UsageListResult', + type: { + name: 'Composite', + class_name: 'UsageListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UsageElementType', + type: { + name: 'Composite', + class_name: 'Usage' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable.rb new file mode 100644 index 0000000000..d303c8f6f5 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable.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::ARM::Automation + module Models + # + # Definition of the varible. + # + class Variable + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [String] Gets or sets the name of the variable. + attr_accessor :name + + # @return [String] Gets or sets the value of the variable. + attr_accessor :value + + # @return [Boolean] Gets or sets the encrypted flag of the variable. + attr_accessor :is_encrypted + + # @return [DateTime] Gets or sets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for Variable class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Variable', + type: { + name: 'Composite', + class_name: 'Variable', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'properties.value', + type: { + name: 'String' + } + }, + is_encrypted: { + required: false, + serialized_name: 'properties.isEncrypted', + type: { + name: 'Boolean' + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_create_or_update_parameters.rb new file mode 100644 index 0000000000..841d6ff989 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_create_or_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the create or update variable operation. + # + class VariableCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the variable. + attr_accessor :name + + # @return [String] Gets or sets the value of the variable. + attr_accessor :value + + # @return [String] Gets or sets the description of the variable. + attr_accessor :description + + # @return [Boolean] Gets or sets the encrypted flag of the variable. + attr_accessor :is_encrypted + + + # + # Mapper for VariableCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VariableCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'VariableCreateOrUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'properties.value', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + is_encrypted: { + required: false, + serialized_name: 'properties.isEncrypted', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_list_result.rb new file mode 100644 index 0000000000..54e699dbd0 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_list_result.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::ARM::Automation + module Models + # + # The response model for the list variables operation. + # + class VariableListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of variables. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [VariableListResult] 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 VariableListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VariableListResult', + type: { + name: 'Composite', + class_name: 'VariableListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VariableElementType', + type: { + name: 'Composite', + class_name: 'Variable' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_update_parameters.rb new file mode 100644 index 0000000000..d5ab2864ca --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/variable_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the update variable operation. + # + class VariableUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the variable. + attr_accessor :name + + # @return [String] Gets or sets the value of the variable. + attr_accessor :value + + # @return [String] Gets or sets the description of the variable. + attr_accessor :description + + + # + # Mapper for VariableUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VariableUpdateParameters', + type: { + name: 'Composite', + class_name: 'VariableUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'properties.value', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook.rb new file mode 100644 index 0000000000..3302cbb92f --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook.rb @@ -0,0 +1,168 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # Definition of the webhook type. + # + class Webhook + + include MsRestAzure + + # @return [String] Gets or sets the id of the resource. + attr_accessor :id + + # @return [String] Gets or sets the name of the webhook. + attr_accessor :name + + # @return [Boolean] Gets or sets the value of the enabled flag of the + # webhook. Default value: false . + attr_accessor :is_enabled + + # @return [String] Gets or sets the webhook uri. + attr_accessor :uri + + # @return [DateTime] Gets or sets the expiry time. + attr_accessor :expiry_time + + # @return [DateTime] Gets or sets the last invoked time. + attr_accessor :last_invoked_time + + # @return [Hash{String => String}] Gets or sets the parameters of the job + # that is created when the webhook calls the runbook it is associated + # with. + attr_accessor :parameters + + # @return [RunbookAssociationProperty] Gets or sets the runbook the + # webhook is associated with. + attr_accessor :runbook + + # @return [String] Gets or sets the name of the hybrid worker group the + # webhook job will run on. + attr_accessor :run_on + + # @return [DateTime] Gets or sets the creation time. + attr_accessor :creation_time + + # @return [DateTime] Gets or sets the last modified time. + attr_accessor :last_modified_time + + # @return [String] Gets or sets the description. + attr_accessor :description + + + # + # Mapper for Webhook class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Webhook', + type: { + name: 'Composite', + class_name: 'Webhook', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + is_enabled: { + required: false, + serialized_name: 'properties.isEnabled', + default_value: false, + type: { + name: 'Boolean' + } + }, + uri: { + required: false, + serialized_name: 'properties.uri', + type: { + name: 'String' + } + }, + expiry_time: { + required: false, + serialized_name: 'properties.expiryTime', + type: { + name: 'DateTime' + } + }, + last_invoked_time: { + required: false, + serialized_name: 'properties.lastInvokedTime', + type: { + name: 'DateTime' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + runbook: { + required: false, + serialized_name: 'properties.runbook', + type: { + name: 'Composite', + class_name: 'RunbookAssociationProperty' + } + }, + run_on: { + required: false, + serialized_name: 'properties.runOn', + type: { + name: 'String' + } + }, + creation_time: { + required: false, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + last_modified_time: { + required: false, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_create_or_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_create_or_update_parameters.rb new file mode 100644 index 0000000000..51da102ac5 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_create_or_update_parameters.rb @@ -0,0 +1,115 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + module Models + # + # The parameters supplied to the create or update webhook operation. + # + class WebhookCreateOrUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the webhook. + attr_accessor :name + + # @return [Boolean] Gets or sets the value of the enabled flag of + # webhook. + attr_accessor :is_enabled + + # @return [String] Gets or sets the uri. + attr_accessor :uri + + # @return [DateTime] Gets or sets the expiry time. + attr_accessor :expiry_time + + # @return [Hash{String => String}] Gets or sets the parameters of the + # job. + attr_accessor :parameters + + # @return [RunbookAssociationProperty] Gets or sets the runbook. + attr_accessor :runbook + + # @return [String] Gets or sets the name of the hybrid worker group the + # webhook job will run on. + attr_accessor :run_on + + + # + # Mapper for WebhookCreateOrUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebhookCreateOrUpdateParameters', + type: { + name: 'Composite', + class_name: 'WebhookCreateOrUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + is_enabled: { + required: false, + serialized_name: 'properties.isEnabled', + type: { + name: 'Boolean' + } + }, + uri: { + required: false, + serialized_name: 'properties.uri', + type: { + name: 'String' + } + }, + expiry_time: { + required: false, + serialized_name: 'properties.expiryTime', + type: { + name: 'DateTime' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + runbook: { + required: false, + serialized_name: 'properties.runbook', + type: { + name: 'Composite', + class_name: 'RunbookAssociationProperty' + } + }, + run_on: { + required: false, + serialized_name: 'properties.runOn', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_list_result.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_list_result.rb new file mode 100644 index 0000000000..8dcf379d15 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_list_result.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::ARM::Automation + module Models + # + # The response model for the list webhook operation. + # + class WebhookListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of webhooks. + attr_accessor :value + + # @return [String] Gets or sets the next link. + 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 [WebhookListResult] 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 WebhookListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebhookListResult', + type: { + name: 'Composite', + class_name: 'WebhookListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WebhookElementType', + type: { + name: 'Composite', + class_name: 'Webhook' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_update_parameters.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_update_parameters.rb new file mode 100644 index 0000000000..c1f68dfddf --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/models/webhook_update_parameters.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::ARM::Automation + module Models + # + # The parameters supplied to the update webhook operation. + # + class WebhookUpdateParameters + + include MsRestAzure + + # @return [String] Gets or sets the name of the webhook. + attr_accessor :name + + # @return [Boolean] Gets or sets the value of the enabled flag of + # webhook. + attr_accessor :is_enabled + + # @return [String] Gets or sets the name of the hybrid worker group the + # webhook job will run on. + attr_accessor :run_on + + # @return [Hash{String => String}] Gets or sets the parameters of the + # job. + attr_accessor :parameters + + # @return [String] Gets or sets the description of the webhook. + attr_accessor :description + + + # + # Mapper for WebhookUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebhookUpdateParameters', + type: { + name: 'Composite', + class_name: 'WebhookUpdateParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + is_enabled: { + required: false, + serialized_name: 'properties.isEnabled', + type: { + name: 'Boolean' + } + }, + run_on: { + required: false, + serialized_name: 'properties.runOn', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/module_definition.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/module_definition.rb new file mode 100644 index 0000000000..04c21c8f57 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/module_definition.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 end +module Azure::ARM end +module Azure::ARM::Automation end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/module_model_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/module_model_operations.rb new file mode 100644 index 0000000000..29c4fd3861 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/module_model_operations.rb @@ -0,0 +1,633 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class ModuleModelOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the ModuleModelOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Delete the module by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The module name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, module_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, module_name, custom_headers).value! + nil + end + + # + # Delete the module by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The module name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, module_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, module_name, custom_headers).value! + end + + # + # Delete the module by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The module name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, module_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The module name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ModuleModel] operation results. + # + def get(resource_group_name, automation_account_name, module_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, module_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The module name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, module_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, module_name, custom_headers).value! + end + + # + # Retrieve the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The module name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, module_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_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::ARM::Automation::Models::ModuleModel.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or Update the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param parameters [ModuleCreateOrUpdateParameters] The create or update + # parameters for module. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ModuleModel] operation results. + # + def create_or_update(resource_group_name, automation_account_name, module_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or Update the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param parameters [ModuleCreateOrUpdateParameters] The create or update + # parameters for module. + # @param custom_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, automation_account_name, module_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers).value! + end + + # + # Create or Update the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param parameters [ModuleCreateOrUpdateParameters] The create or update + # parameters for module. + # @param [Hash{String => String}] 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, automation_account_name, module_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::ModuleCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_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::ARM::Automation::Models::ModuleModel.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ModuleModel.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param parameters [ModuleUpdateParameters] The update parameters for module. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ModuleModel] operation results. + # + def update(resource_group_name, automation_account_name, module_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param parameters [ModuleUpdateParameters] The update parameters for module. + # @param custom_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, automation_account_name, module_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, module_name, parameters, custom_headers).value! + end + + # + # Update the module identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param parameters [ModuleUpdateParameters] The update parameters for module. + # @param [Hash{String => String}] 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, automation_account_name, module_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::ModuleUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ModuleModel.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of modules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of modules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of modules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ModuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of modules. + # + # @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 [ModuleListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of modules. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of modules. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ModuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of modules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ModuleListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/node_reports.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/node_reports.rb new file mode 100644 index 0000000000..20a47ab083 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/node_reports.rb @@ -0,0 +1,438 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class NodeReports + include MsRestAzure + + # + # Creates and initializes a new instance of the NodeReports class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the Dsc node report list by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The parameters supplied to the list operation. + # @param filter [String] The filter to apply on the operation. + # @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_node(resource_group_name, automation_account_name, node_id, filter = nil, custom_headers = nil) + first_page = list_by_node_as_lazy(resource_group_name, automation_account_name, node_id, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve the Dsc node report list by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The parameters supplied to the list operation. + # @param filter [String] The filter to apply on the 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_node_with_http_info(resource_group_name, automation_account_name, node_id, filter = nil, custom_headers = nil) + list_by_node_async(resource_group_name, automation_account_name, node_id, filter, custom_headers).value! + end + + # + # Retrieve the Dsc node report list by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The parameters supplied to the list operation. + # @param filter [String] The filter to apply on the 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_node_async(resource_group_name, automation_account_name, node_id, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_id is nil' if node_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeId' => node_id,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::DscNodeReportListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the Dsc node report data by node id and report id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The Dsc node id. + # @param report_id [String] The report id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNodeReport] operation results. + # + def get(resource_group_name, automation_account_name, node_id, report_id, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the Dsc node report data by node id and report id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The Dsc node id. + # @param report_id [String] The report id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, node_id, report_id, custom_headers = nil) + get_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers).value! + end + + # + # Retrieve the Dsc node report data by node id and report id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The Dsc node id. + # @param report_id [String] The report id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_id is nil' if node_id.nil? + fail ArgumentError, 'report_id is nil' if report_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeId' => node_id,'reportId' => report_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::ARM::Automation::Models::DscNodeReport.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the Dsc node reports by node id and report id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The Dsc node id. + # @param report_id [String] The report id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NOT_IMPLEMENTED] operation results. + # + def get_content(resource_group_name, automation_account_name, node_id, report_id, custom_headers = nil) + response = get_content_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the Dsc node reports by node id and report id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The Dsc node id. + # @param report_id [String] The report id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_content_with_http_info(resource_group_name, automation_account_name, node_id, report_id, custom_headers = nil) + get_content_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers).value! + end + + # + # Retrieve the Dsc node reports by node id and report id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The Dsc node id. + # @param report_id [String] The report id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_content_async(resource_group_name, automation_account_name, node_id, report_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'node_id is nil' if node_id.nil? + fail ArgumentError, 'report_id is nil' if report_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}/content' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeId' => node_id,'reportId' => report_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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the Dsc node report list by node id. + # + # @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 [DscNodeReportListResult] operation results. + # + def list_by_node_next(next_page_link, custom_headers = nil) + response = list_by_node_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the Dsc node report list by node id. + # + # @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_node_next_with_http_info(next_page_link, custom_headers = nil) + list_by_node_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve the Dsc node report list by node id. + # + # @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_node_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::ARM::Automation::Models::DscNodeReportListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the Dsc node report list by node id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param node_id [String] The parameters supplied to the list operation. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DscNodeReportListResult] which provide lazy access to pages of the + # response. + # + def list_by_node_as_lazy(resource_group_name, automation_account_name, node_id, filter = nil, custom_headers = nil) + response = list_by_node_async(resource_group_name, automation_account_name, node_id, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_node_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/object_data_types.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/object_data_types.rb new file mode 100644 index 0000000000..aa021f6fac --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/object_data_types.rb @@ -0,0 +1,219 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class ObjectDataTypes + include MsRestAzure + + # + # Creates and initializes a new instance of the ObjectDataTypes class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve a list of fields of a given type identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param type_name [String] The name of type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TypeFieldListResult] operation results. + # + def list_fields_by_module_and_type(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil) + response = list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of fields of a given type identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param type_name [String] The name of type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_fields_by_module_and_type_with_http_info(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil) + list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers).value! + end + + # + # Retrieve a list of fields of a given type identified by module name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param module_name [String] The name of module. + # @param type_name [String] The name of type. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'module_name is nil' if module_name.nil? + fail ArgumentError, 'type_name is nil' if type_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/objectDataTypes/{typeName}/fields' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_name,'typeName' => type_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::ARM::Automation::Models::TypeFieldListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of fields of a given type across all accessible modules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param type_name [String] The name of type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TypeFieldListResult] operation results. + # + def list_fields_by_type(resource_group_name, automation_account_name, type_name, custom_headers = nil) + response = list_fields_by_type_async(resource_group_name, automation_account_name, type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of fields of a given type across all accessible modules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param type_name [String] The name of type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_fields_by_type_with_http_info(resource_group_name, automation_account_name, type_name, custom_headers = nil) + list_fields_by_type_async(resource_group_name, automation_account_name, type_name, custom_headers).value! + end + + # + # Retrieve a list of fields of a given type across all accessible modules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param type_name [String] The name of type. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_fields_by_type_async(resource_group_name, automation_account_name, type_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'type_name is nil' if type_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/objectDataTypes/{typeName}/fields' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'typeName' => type_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::ARM::Automation::Models::TypeFieldListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_automation/lib/generated/azure_mgmt_automation/operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/operations.rb new file mode 100644 index 0000000000..b44dbf9b0e --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/operations.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::ARM::Automation + # + # Automation Client + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Lists all of the available Automation REST API operations. + # + # @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(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all of the available Automation REST API operations. + # + # @param custom_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 Automation REST API operations. + # + # @param [Hash{String => String}] 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.Automation/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::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 + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/runbook_draft_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/runbook_draft_operations.rb new file mode 100644 index 0000000000..fbb526652f --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/runbook_draft_operations.rb @@ -0,0 +1,605 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class RunbookDraftOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the RunbookDraftOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the content of runbook draft identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NOT_IMPLEMENTED] operation results. + # + def get_content(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the content of runbook draft identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_content_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Retrieve the content of runbook draft identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 runbook draft with runbookStream as its content. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param runbook_content The runbook draft content. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def create_or_update(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param runbook_content The runbook draft content. + # @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, automation_account_name, runbook_name, runbook_content, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Retrieve the runbook draft identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RunbookDraft] operation results. + # + def get(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the runbook draft identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Retrieve the runbook draft identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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::ARM::Automation::Models::RunbookDraft.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Publish runbook draft. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the publish runbook + # operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Runbook] operation results. + # + def publish(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the publish runbook + # 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 publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + # Send request + promise = begin_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Automation::Models::Runbook.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 + + # + # Retrieve the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RunbookDraftUndoEditResult] operation results. + # + def undo_edit(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = undo_edit_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def undo_edit_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + undo_edit_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Retrieve the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def undo_edit_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::RunbookDraftUndoEditResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 runbook draft with runbookStream as its content. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param runbook_content The runbook draft content. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_create_or_update(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers).value! + nil + end + + # + # Updates the runbook draft with runbookStream as its content. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param runbook_content The runbook draft content. + # @param custom_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, automation_account_name, runbook_name, runbook_content, custom_headers = nil) + begin_create_or_update_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers).value! + end + + # + # Updates the runbook draft with runbookStream as its content. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param runbook_content The runbook draft content. + # @param [Hash{String => String}] 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, automation_account_name, runbook_name, runbook_content, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, 'runbook_content is nil' if runbook_content.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = { + required: true, + serialized_name: 'runbookContent', + type: { + name: 'Stream' + } + } + request_content = @client.serialize(request_mapper, runbook_content) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 == 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? + + result + end + + promise.execute + end + + # + # Publish runbook draft. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the publish runbook + # operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Runbook] operation results. + # + def begin_publish(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = begin_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Publish runbook draft. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the publish runbook + # 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_publish_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + begin_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Publish runbook draft. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the publish runbook + # 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_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/publish' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 == 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::ARM::Automation::Models::Runbook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_automation/lib/generated/azure_mgmt_automation/runbook_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/runbook_operations.rb new file mode 100644 index 0000000000..0dd19c2bed --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/runbook_operations.rb @@ -0,0 +1,719 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class RunbookOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the RunbookOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the content of runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NOT_IMPLEMENTED] operation results. + # + def get_content(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the content of runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_content_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Retrieve the content of runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Runbook] operation results. + # + def get(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Retrieve the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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::ARM::Automation::Models::Runbook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param parameters [RunbookCreateOrUpdateParameters] The create or update + # parameters for runbook. Provide either content link for a published runbook + # or draft, not both. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def create_or_update(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers).value! + nil + end + + # + # Create the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param parameters [RunbookCreateOrUpdateParameters] The create or update + # parameters for runbook. Provide either content link for a published runbook + # or draft, not both. + # @param custom_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, automation_account_name, runbook_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers).value! + end + + # + # Create the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param parameters [RunbookCreateOrUpdateParameters] The create or update + # parameters for runbook. Provide either content link for a published runbook + # or draft, not both. + # @param [Hash{String => String}] 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, automation_account_name, runbook_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::RunbookCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 == 400 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Update the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param parameters [RunbookUpdateParameters] The update parameters for + # runbook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Runbook] operation results. + # + def update(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param parameters [RunbookUpdateParameters] The update parameters for + # runbook. + # @param custom_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, automation_account_name, runbook_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers).value! + end + + # + # Update the runbook identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param parameters [RunbookUpdateParameters] The update parameters for + # runbook. + # @param [Hash{String => String}] 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, automation_account_name, runbook_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::RunbookUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Runbook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the runbook by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + nil + end + + # + # Delete the runbook by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Delete the runbook by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve a list of runbooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of runbooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of runbooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::RunbookListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of runbooks. + # + # @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 [RunbookListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of runbooks. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of runbooks. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::RunbookListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of runbooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RunbookListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/schedule_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/schedule_operations.rb new file mode 100644 index 0000000000..5c65bf7cfe --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/schedule_operations.rb @@ -0,0 +1,626 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class ScheduleOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the ScheduleOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Create a schedule. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param parameters [ScheduleCreateOrUpdateParameters] The parameters supplied + # to the create or update schedule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Schedule] operation results. + # + def create_or_update(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a schedule. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param parameters [ScheduleCreateOrUpdateParameters] The parameters supplied + # to the create or update schedule 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 create_or_update_with_http_info(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers).value! + end + + # + # Create a schedule. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param parameters [ScheduleCreateOrUpdateParameters] The parameters supplied + # to the create or update schedule 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 create_or_update_async(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'schedule_name is nil' if schedule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::ScheduleCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'scheduleName' => schedule_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 == 409 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Schedule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param parameters [ScheduleUpdateParameters] The parameters supplied to the + # update schedule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Schedule] operation results. + # + def update(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param parameters [ScheduleUpdateParameters] The parameters supplied to the + # update schedule 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 update_with_http_info(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers).value! + end + + # + # Update the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param parameters [ScheduleUpdateParameters] The parameters supplied to the + # update schedule 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 update_async(resource_group_name, automation_account_name, schedule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'schedule_name is nil' if schedule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::ScheduleUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'scheduleName' => schedule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Schedule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Schedule] operation results. + # + def get(resource_group_name, automation_account_name, schedule_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, schedule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, schedule_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, schedule_name, custom_headers).value! + end + + # + # Retrieve the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, schedule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'schedule_name is nil' if schedule_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'scheduleName' => schedule_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::ARM::Automation::Models::Schedule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, schedule_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, schedule_name, custom_headers).value! + nil + end + + # + # Delete the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, schedule_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, schedule_name, custom_headers).value! + end + + # + # Delete the schedule identified by schedule name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param schedule_name [String] The schedule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, schedule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'schedule_name is nil' if schedule_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'scheduleName' => schedule_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 == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve a list of schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ScheduleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of schedules. + # + # @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 [ScheduleListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of schedules. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of schedules. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::ScheduleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of schedules. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ScheduleListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/statistics_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/statistics_operations.rb new file mode 100644 index 0000000000..82a6aa15cf --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/statistics_operations.rb @@ -0,0 +1,119 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class StatisticsOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the StatisticsOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the statistics for the account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StatisticsListResult] operation results. + # + def list_by_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the statistics for the account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + end + + # + # Retrieve the statistics for the account. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/statistics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::StatisticsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_automation/lib/generated/azure_mgmt_automation/test_job_streams.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/test_job_streams.rb new file mode 100644 index 0000000000..acaa40c845 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/test_job_streams.rb @@ -0,0 +1,333 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class TestJobStreams + include MsRestAzure + + # + # Creates and initializes a new instance of the TestJobStreams class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve a test job streams identified by runbook name and stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param job_stream_id [String] The job stream id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStream] operation results. + # + def get(resource_group_name, automation_account_name, runbook_name, job_stream_id, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, runbook_name, job_stream_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a test job streams identified by runbook name and stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param job_stream_id [String] The job stream id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, runbook_name, job_stream_id, custom_headers = nil) + get_async(resource_group_name, automation_account_name, runbook_name, job_stream_id, custom_headers).value! + end + + # + # Retrieve a test job streams identified by runbook name and stream id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param job_stream_id [String] The job stream id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, runbook_name, job_stream_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, 'job_stream_id is nil' if job_stream_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams/{jobStreamId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name,'jobStreamId' => job_stream_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::ARM::Automation::Models::JobStream.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of test job streams identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param filter [String] The filter to apply on the operation. + # @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_test_job(resource_group_name, automation_account_name, runbook_name, filter = nil, custom_headers = nil) + first_page = list_by_test_job_as_lazy(resource_group_name, automation_account_name, runbook_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of test job streams identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param filter [String] The filter to apply on the 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_test_job_with_http_info(resource_group_name, automation_account_name, runbook_name, filter = nil, custom_headers = nil) + list_by_test_job_async(resource_group_name, automation_account_name, runbook_name, filter, custom_headers).value! + end + + # + # Retrieve a list of test job streams identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param filter [String] The filter to apply on the 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_test_job_async(resource_group_name, automation_account_name, runbook_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::JobStreamListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of test job streams identified by runbook name. + # + # @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 [JobStreamListResult] operation results. + # + def list_by_test_job_next(next_page_link, custom_headers = nil) + response = list_by_test_job_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of test job streams identified by runbook name. + # + # @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_test_job_next_with_http_info(next_page_link, custom_headers = nil) + list_by_test_job_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of test job streams identified by runbook name. + # + # @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_test_job_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::JobStreamListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of test job streams identified by runbook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobStreamListResult] which provide lazy access to pages of the + # response. + # + def list_by_test_job_as_lazy(resource_group_name, automation_account_name, runbook_name, filter = nil, custom_headers = nil) + response = list_by_test_job_async(resource_group_name, automation_account_name, runbook_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_test_job_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/test_jobs.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/test_jobs.rb new file mode 100644 index 0000000000..0ea3f4fc9a --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/test_jobs.rb @@ -0,0 +1,486 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class TestJobs + include MsRestAzure + + # + # Creates and initializes a new instance of the TestJobs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Create a test job of the runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the create test job + # operation. + # @param parameters [TestJobCreateParameters] The parameters supplied to the + # create test job operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TestJob] operation results. + # + def create(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers = nil) + response = create_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a test job of the runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the create test job + # operation. + # @param parameters [TestJobCreateParameters] The parameters supplied to the + # create test job 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 create_with_http_info(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers = nil) + create_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers).value! + end + + # + # Create a test job of the runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The parameters supplied to the create test job + # operation. + # @param parameters [TestJobCreateParameters] The parameters supplied to the + # create test job 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 create_async(resource_group_name, automation_account_name, runbook_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::TestJobCreateParameters.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.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::TestJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve the test job for the specified runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TestJob] operation results. + # + def get(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the test job for the specified runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Retrieve the test job for the specified runbook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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::ARM::Automation::Models::TestJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Resume the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def resume(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = resume_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + nil + end + + # + # Resume the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def resume_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + resume_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Resume the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def resume_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/resume' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 MsRest::HttpOperationError.new(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 + + # + # Stop the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def stop(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = stop_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + nil + end + + # + # Stop the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def stop_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + stop_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Stop the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def stop_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/stop' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 MsRest::HttpOperationError.new(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 + + # + # Suspend the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def suspend(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + response = suspend_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + nil + end + + # + # Suspend the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def suspend_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + suspend_async(resource_group_name, automation_account_name, runbook_name, custom_headers).value! + end + + # + # Suspend the test job. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param runbook_name [String] The runbook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def suspend_async(resource_group_name, automation_account_name, runbook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'runbook_name is nil' if runbook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/suspend' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_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 MsRest::HttpOperationError.new(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_automation/lib/generated/azure_mgmt_automation/usages.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/usages.rb new file mode 100644 index 0000000000..5702c9f0b0 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/usages.rb @@ -0,0 +1,116 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class Usages + include MsRestAzure + + # + # Creates and initializes a new instance of the Usages class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Retrieve the usage for the account id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UsageListResult] operation results. + # + def list_by_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the usage for the account id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve the usage for the account id. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/usages' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::UsageListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_automation/lib/generated/azure_mgmt_automation/variable_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/variable_operations.rb new file mode 100644 index 0000000000..e31ffa7282 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/variable_operations.rb @@ -0,0 +1,636 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class VariableOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the VariableOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Create a variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The variable name. + # @param parameters [VariableCreateOrUpdateParameters] The parameters supplied + # to the create or update variable operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Variable] operation results. + # + def create_or_update(resource_group_name, automation_account_name, variable_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The variable name. + # @param parameters [VariableCreateOrUpdateParameters] The parameters supplied + # to the create or update variable 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 create_or_update_with_http_info(resource_group_name, automation_account_name, variable_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers).value! + end + + # + # Create a variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The variable name. + # @param parameters [VariableCreateOrUpdateParameters] The parameters supplied + # to the create or update variable 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 create_or_update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'variable_name is nil' if variable_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::VariableCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/variables/{variableName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'variableName' => variable_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Variable.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Variable.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The variable name. + # @param parameters [VariableUpdateParameters] The parameters supplied to the + # update variable operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Variable] operation results. + # + def update(resource_group_name, automation_account_name, variable_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update a variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The variable name. + # @param parameters [VariableUpdateParameters] The parameters supplied to the + # update variable 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 update_with_http_info(resource_group_name, automation_account_name, variable_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers).value! + end + + # + # Update a variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The variable name. + # @param parameters [VariableUpdateParameters] The parameters supplied to the + # update variable 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 update_async(resource_group_name, automation_account_name, variable_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'variable_name is nil' if variable_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::VariableUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/variables/{variableName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'variableName' => variable_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Variable.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The name of variable. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, variable_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, variable_name, custom_headers).value! + nil + end + + # + # Delete the variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The name of variable. + # @param custom_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, automation_account_name, variable_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, variable_name, custom_headers).value! + end + + # + # Delete the variable. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The name of variable. + # @param [Hash{String => String}] 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, automation_account_name, variable_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'variable_name is nil' if variable_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'variableName' => variable_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the variable identified by variable name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The name of variable. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Variable] operation results. + # + def get(resource_group_name, automation_account_name, variable_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, variable_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the variable identified by variable name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The name of variable. + # @param custom_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, automation_account_name, variable_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, variable_name, custom_headers).value! + end + + # + # Retrieve the variable identified by variable name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param variable_name [String] The name of variable. + # @param [Hash{String => String}] 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, automation_account_name, variable_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'variable_name is nil' if variable_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'variableName' => variable_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::ARM::Automation::Models::Variable.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of variables. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @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_automation_account(resource_group_name, automation_account_name, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of variables. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Retrieve a list of variables. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::VariableListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of variables. + # + # @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 [VariableListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of variables. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of variables. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::VariableListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of variables. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VariableListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/version.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/version.rb new file mode 100644 index 0000000000..69274324bf --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/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::ARM::Automation + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/webhook_operations.rb b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/webhook_operations.rb new file mode 100644 index 0000000000..7bfe974303 --- /dev/null +++ b/management/azure_mgmt_automation/lib/generated/azure_mgmt_automation/webhook_operations.rb @@ -0,0 +1,737 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Automation + # + # Automation Client + # + class WebhookOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the WebhookOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [AutomationClient] reference to the AutomationClient + attr_reader :client + + # + # Generates a Uri for use in creating a webhook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [String] operation results. + # + def generate_uri(resource_group_name, automation_account_name, custom_headers = nil) + response = generate_uri_async(resource_group_name, automation_account_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Generates a Uri for use in creating a webhook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def generate_uri_with_http_info(resource_group_name, automation_account_name, custom_headers = nil) + generate_uri_async(resource_group_name, automation_account_name, custom_headers).value! + end + + # + # Generates a Uri for use in creating a webhook. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def generate_uri_async(resource_group_name, automation_account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the webhook by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, automation_account_name, webhook_name, custom_headers = nil) + response = delete_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value! + nil + end + + # + # Delete the webhook by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, automation_account_name, webhook_name, custom_headers = nil) + delete_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value! + end + + # + # Delete the webhook by name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, automation_account_name, webhook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 + + # + # Retrieve the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def get(resource_group_name, automation_account_name, webhook_name, custom_headers = nil) + response = get_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, automation_account_name, webhook_name, custom_headers = nil) + get_async(resource_group_name, automation_account_name, webhook_name, custom_headers).value! + end + + # + # Retrieve the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, automation_account_name, webhook_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_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::ARM::Automation::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param parameters [WebhookCreateOrUpdateParameters] The create or update + # parameters for webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def create_or_update(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param parameters [WebhookCreateOrUpdateParameters] The create or update + # parameters for webhook. + # @param custom_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, automation_account_name, webhook_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value! + end + + # + # Create the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param parameters [WebhookCreateOrUpdateParameters] The create or update + # parameters for webhook. + # @param [Hash{String => String}] 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, automation_account_name, webhook_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::WebhookCreateOrUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param parameters [WebhookUpdateParameters] The update parameters for + # webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def update(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param parameters [WebhookUpdateParameters] The update parameters for + # webhook. + # @param custom_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, automation_account_name, webhook_name, parameters, custom_headers = nil) + update_async(resource_group_name, automation_account_name, webhook_name, parameters, custom_headers).value! + end + + # + # Update the webhook identified by webhook name. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param webhook_name [String] The webhook name. + # @param parameters [WebhookUpdateParameters] The update parameters for + # webhook. + # @param [Hash{String => String}] 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, automation_account_name, webhook_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Automation::Models::WebhookUpdateParameters.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.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'webhookName' => webhook_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of webhooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @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_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieve a list of webhooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + end + + # + # Retrieve a list of webhooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the 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_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'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::ARM::Automation::Models::WebhookListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of webhooks. + # + # @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 [WebhookListResult] operation results. + # + def list_by_automation_account_next(next_page_link, custom_headers = nil) + response = list_by_automation_account_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieve a list of webhooks. + # + # @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_automation_account_next_with_http_info(next_page_link, custom_headers = nil) + list_by_automation_account_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieve a list of webhooks. + # + # @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_automation_account_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Automation::Models::WebhookListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieve a list of webhooks. + # + # @param resource_group_name [String] The resource group name. + # @param automation_account_name [String] The automation account name. + # @param filter [String] The filter to apply on the operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebhookListResult] which provide lazy access to pages of the + # response. + # + def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter = nil, custom_headers = nil) + response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_automation_account_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_automation/spec/spec_helper.rb b/management/azure_mgmt_automation/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_automation/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_batch/azure_mgmt_batch.gemspec b/management/azure_mgmt_batch/azure_mgmt_batch.gemspec index 0823ed234c..8b6dfa2055 100644 --- a/management/azure_mgmt_batch/azure_mgmt_batch.gemspec +++ b/management/azure_mgmt_batch/azure_mgmt_batch.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch.rb old mode 100755 new mode 100644 index 55541d31c0..3d3a87e4d4 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -28,28 +28,32 @@ module Azure::ARM::Batch autoload :BatchManagementClient, 'generated/azure_mgmt_batch/batch_management_client.rb' module Models - autoload :ApplicationCreateParameters, 'generated/azure_mgmt_batch/models/application_create_parameters.rb' autoload :ApplicationPackage, 'generated/azure_mgmt_batch/models/application_package.rb' - autoload :KeyVaultReference, 'generated/azure_mgmt_batch/models/key_vault_reference.rb' autoload :Application, 'generated/azure_mgmt_batch/models/application.rb' + autoload :KeyVaultReference, 'generated/azure_mgmt_batch/models/key_vault_reference.rb' + autoload :ListApplicationsResult, 'generated/azure_mgmt_batch/models/list_applications_result.rb' autoload :BatchAccountCreateParameters, 'generated/azure_mgmt_batch/models/batch_account_create_parameters.rb' - autoload :Operation, 'generated/azure_mgmt_batch/models/operation.rb' + autoload :CheckNameAvailabilityParameters, 'generated/azure_mgmt_batch/models/check_name_availability_parameters.rb' autoload :BatchAccountUpdateParameters, 'generated/azure_mgmt_batch/models/batch_account_update_parameters.rb' - autoload :ListApplicationsResult, 'generated/azure_mgmt_batch/models/list_applications_result.rb' - autoload :BatchAccountRegenerateKeyParameters, 'generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb' autoload :ApplicationUpdateParameters, 'generated/azure_mgmt_batch/models/application_update_parameters.rb' - autoload :ActivateApplicationPackageParameters, 'generated/azure_mgmt_batch/models/activate_application_package_parameters.rb' + autoload :BatchAccountRegenerateKeyParameters, 'generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb' autoload :BatchLocationQuota, 'generated/azure_mgmt_batch/models/batch_location_quota.rb' - autoload :OperationListResult, 'generated/azure_mgmt_batch/models/operation_list_result.rb' - autoload :BatchAccountKeys, 'generated/azure_mgmt_batch/models/batch_account_keys.rb' - autoload :BatchAccountListResult, 'generated/azure_mgmt_batch/models/batch_account_list_result.rb' + autoload :ActivateApplicationPackageParameters, 'generated/azure_mgmt_batch/models/activate_application_package_parameters.rb' + autoload :Resource, 'generated/azure_mgmt_batch/models/resource.rb' autoload :AutoStorageBaseProperties, 'generated/azure_mgmt_batch/models/auto_storage_base_properties.rb' + autoload :BatchAccountListResult, 'generated/azure_mgmt_batch/models/batch_account_list_result.rb' + autoload :ApplicationCreateParameters, 'generated/azure_mgmt_batch/models/application_create_parameters.rb' autoload :OperationDisplay, 'generated/azure_mgmt_batch/models/operation_display.rb' + autoload :BatchAccountKeys, 'generated/azure_mgmt_batch/models/batch_account_keys.rb' + autoload :Operation, 'generated/azure_mgmt_batch/models/operation.rb' + autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_batch/models/check_name_availability_result.rb' + autoload :OperationListResult, 'generated/azure_mgmt_batch/models/operation_list_result.rb' autoload :AutoStorageProperties, 'generated/azure_mgmt_batch/models/auto_storage_properties.rb' autoload :BatchAccount, 'generated/azure_mgmt_batch/models/batch_account.rb' autoload :PoolAllocationMode, 'generated/azure_mgmt_batch/models/pool_allocation_mode.rb' autoload :ProvisioningState, 'generated/azure_mgmt_batch/models/provisioning_state.rb' autoload :AccountKeyType, 'generated/azure_mgmt_batch/models/account_key_type.rb' autoload :PackageState, 'generated/azure_mgmt_batch/models/package_state.rb' + autoload :NameAvailabilityReason, 'generated/azure_mgmt_batch/models/name_availability_reason.rb' end end diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_operations.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_operations.rb old mode 100755 new mode 100644 index 787cdc1bf6..dd61d1cba3 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_operations.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_package_operations.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_package_operations.rb old mode 100755 new mode 100644 index edfbabd983..b724f6d0fd --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_package_operations.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/application_package_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_account_operations.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_account_operations.rb old mode 100755 new mode 100644 index cf42dbf902..5a5f277207 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_account_operations.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_account_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_management_client.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_management_client.rb old mode 100755 new mode 100644 index d731a3b457..c5dcced408 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_management_client.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/batch_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/location.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/location.rb old mode 100755 new mode 100644 index da1a1bb481..1c7f5e3771 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/location.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/location.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -114,5 +114,108 @@ def get_quotas_async(location_name, custom_headers = nil) promise.execute end + # + # Checks whether the Batch account name is available in the specified region. + # + # @param location_name [String] The desired region for the name check. + # @param parameters [CheckNameAvailabilityParameters] Properties needed to + # check the availability of a name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CheckNameAvailabilityResult] operation results. + # + def check_name_availability(location_name, parameters, custom_headers = nil) + response = check_name_availability_async(location_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks whether the Batch account name is available in the specified region. + # + # @param location_name [String] The desired region for the name check. + # @param parameters [CheckNameAvailabilityParameters] Properties needed to + # check the availability of a name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def check_name_availability_with_http_info(location_name, parameters, custom_headers = nil) + check_name_availability_async(location_name, parameters, custom_headers).value! + end + + # + # Checks whether the Batch account name is available in the specified region. + # + # @param location_name [String] The desired region for the name check. + # @param parameters [CheckNameAvailabilityParameters] Properties needed to + # check the availability of a name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def check_name_availability_async(location_name, parameters, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_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, '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::ARM::Batch::Models::CheckNameAvailabilityParameters.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.Batch/locations/{locationName}/checkNameAvailability' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id}, + query_params: {'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::ARM::Batch::Models::CheckNameAvailabilityResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_batch/lib/generated/azure_mgmt_batch/models/account_key_type.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/account_key_type.rb old mode 100755 new mode 100644 index b03f55f7eb..1bc9cf6c4c --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/account_key_type.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/account_key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb old mode 100755 new mode 100644 index 9dcff6959c..26d3038dd8 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ActivateApplicationPackageParameters include MsRestAzure - include MsRest::JSONable # @return [String] The format of the application package binary file. attr_accessor :format diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application.rb old mode 100755 new mode 100644 index 6a1c8e196e..48f5b61418 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Application include MsRestAzure - include MsRest::JSONable # @return [String] A string that uniquely identifies the application # within the account. attr_accessor :id diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_create_parameters.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_create_parameters.rb index 4519ffa530..14f7cd6274 100644 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_create_parameters.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationCreateParameters include MsRestAzure - include MsRest::JSONable # @return [Boolean] A value indicating whether packages within the # application may be overwritten using the same version string. attr_accessor :allow_updates diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_package.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_package.rb old mode 100755 new mode 100644 index efa991fa7a..0f32efe6af --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_package.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_package.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ApplicationPackage include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the application. attr_accessor :id diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_update_parameters.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_update_parameters.rb index 5a61fe5e88..05b11c8684 100644 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_update_parameters.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/application_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Boolean] A value indicating whether packages within the # application may be overwritten using the same version string. attr_accessor :allow_updates diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb old mode 100755 new mode 100644 index c0fe87126c..67d36032bb --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AutoStorageBaseProperties include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the storage account to be used for # auto-storage account. attr_accessor :storage_account_id diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_properties.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_properties.rb old mode 100755 new mode 100644 index 28d673eead..56d649bcaa --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_properties.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/auto_storage_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AutoStorageProperties < AutoStorageBaseProperties include MsRestAzure - include MsRest::JSONable # @return [DateTime] The UTC time at which storage keys were last # synchronized with the Batch account. attr_accessor :last_key_sync diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account.rb old mode 100755 new mode 100644 index 3a0bc5b5ba..34567759ca --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Contains information about an Azure Batch account. # - class BatchAccount < MsRestAzure::Resource + class BatchAccount < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The account endpoint used to interact with the Batch # service. attr_accessor :account_endpoint diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb old mode 100755 new mode 100644 index 5f8d04e827..9c5e524ec5 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BatchAccountCreateParameters include MsRestAzure - include MsRest::JSONable # @return [String] The region in which to create the account. attr_accessor :location diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_keys.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_keys.rb old mode 100755 new mode 100644 index 906abac530..c85d26c1e5 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_keys.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BatchAccountKeys include MsRestAzure - include MsRest::JSONable # @return [String] The Batch account name. attr_accessor :account_name diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_list_result.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_list_result.rb old mode 100755 new mode 100644 index 5641cd0d77..7a3ea51a2f --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_list_result.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb old mode 100755 new mode 100644 index b56c929b67..53b0c10b6b --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BatchAccountRegenerateKeyParameters include MsRestAzure - include MsRest::JSONable # @return [AccountKeyType] The type of account key to regenerate. # Possible values include: 'Primary', 'Secondary' attr_accessor :key_name diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb old mode 100755 new mode 100644 index aee2346b50..c11ebff1aa --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BatchAccountUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] The user-specified tags associated # with the account. attr_accessor :tags diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_location_quota.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_location_quota.rb old mode 100755 new mode 100644 index f7d223a018..f0d19b3679 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_location_quota.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/batch_location_quota.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BatchLocationQuota include MsRestAzure - include MsRest::JSONable # @return [Integer] The number of Batch accounts that may be created # under the subscription in the specified region. attr_accessor :account_quota diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb new file mode 100644 index 0000000000..a3ce90863f --- /dev/null +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/check_name_availability_parameters.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::ARM::Batch + module Models + # + # Parameters for a check name availability request. + # + class CheckNameAvailabilityParameters + + include MsRestAzure + + # @return [String] The name to check for availability + attr_accessor :name + + # @return [String] The resource type. Must be set to + # Microsoft.Batch/batchAccounts. Default value: + # 'Microsoft.Batch/batchAccounts' . + attr_accessor :type + + + # + # Mapper for CheckNameAvailabilityParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CheckNameAvailabilityParameters', + type: { + name: 'Composite', + class_name: 'CheckNameAvailabilityParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: true, + is_constant: true, + serialized_name: 'type', + default_value: 'Microsoft.Batch/batchAccounts', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/check_name_availability_result.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/check_name_availability_result.rb new file mode 100644 index 0000000000..5992906baa --- /dev/null +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/check_name_availability_result.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::ARM::Batch + module Models + # + # The CheckNameAvailability operation response. + # + class CheckNameAvailabilityResult + + include MsRestAzure + + # @return [Boolean] Gets a boolean value that indicates whether the name + # is available for you to use. If true, the name is available. If false, + # the name has already been taken or invalid and cannot be used. + attr_accessor :name_available + + # @return [NameAvailabilityReason] Gets the reason that a Batch account + # name could not be used. The Reason element is only returned if + # NameAvailable is false. Possible values include: 'Invalid', + # 'AlreadyExists' + attr_accessor :reason + + # @return [String] Gets an error message explaining the Reason value in + # more detail. + attr_accessor :message + + + # + # Mapper for CheckNameAvailabilityResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CheckNameAvailabilityResult', + type: { + name: 'Composite', + class_name: 'CheckNameAvailabilityResult', + model_properties: { + name_available: { + required: false, + read_only: true, + serialized_name: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + reason: { + required: false, + read_only: true, + serialized_name: 'reason', + type: { + name: 'Enum', + module: 'NameAvailabilityReason' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/key_vault_reference.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/key_vault_reference.rb old mode 100755 new mode 100644 index 45816a2f1d..9d217772f5 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/key_vault_reference.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/key_vault_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyVaultReference include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the Azure key vault associated with # the Batch account. attr_accessor :id diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/list_applications_result.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/list_applications_result.rb old mode 100755 new mode 100644 index a95ad41b3f..30007f679e --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/list_applications_result.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/list_applications_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/name_availability_reason.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/name_availability_reason.rb new file mode 100644 index 0000000000..9a2918090f --- /dev/null +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/name_availability_reason.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::ARM::Batch + module Models + # + # Defines values for NameAvailabilityReason + # + module NameAvailabilityReason + Invalid = "Invalid" + AlreadyExists = "AlreadyExists" + end + end +end diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation.rb index 8340cfa2b4..b7303146e7 100644 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] The operation name. This is of the format # {provider}/{resource}/{operation} attr_accessor :name diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_display.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_display.rb index d048a6da64..c4d58d325d 100644 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_display.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable # @return [String] Friendly name of the resource provider. attr_accessor :provider diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_list_result.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_list_result.rb index 32b6974496..295f761da1 100644 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_list_result.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/operation_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/package_state.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/package_state.rb old mode 100755 new mode 100644 index 65cbb07a61..d6003e1e4e --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/package_state.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/package_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/pool_allocation_mode.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/pool_allocation_mode.rb old mode 100755 new mode 100644 index 070ef8ee30..6568b17a16 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/pool_allocation_mode.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/pool_allocation_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/provisioning_state.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/provisioning_state.rb old mode 100755 new mode 100644 index 1f78d89d56..cdc56153ea --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/provisioning_state.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/resource.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/resource.rb new file mode 100644 index 0000000000..bf5410fe6d --- /dev/null +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/models/resource.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::ARM::Batch + module Models + # + # A definition of an Azure resource. + # + class Resource + + include MsRestAzure + + # @return [String] The ID of the resource. + attr_accessor :id + + # @return [String] The name of the resource. + attr_accessor :name + + # @return [String] The type of the resource. + attr_accessor :type + + # @return [String] The location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] The tags of the resource. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + read_only: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + read_only: true, + 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_batch/lib/generated/azure_mgmt_batch/module_definition.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/module_definition.rb old mode 100755 new mode 100644 index e363ed617f..4295cea84b --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/module_definition.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/operations.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/operations.rb index a68d5945e7..ee68a3dd8c 100644 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/operations.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/version.rb b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/version.rb old mode 100755 new mode 100644 index ed09d70e56..e2ed88dd35 --- a/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/version.rb +++ b/management/azure_mgmt_batch/lib/generated/azure_mgmt_batch/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Batch - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_billing/.rspec b/management/azure_mgmt_billing/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_billing/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_billing/LICENSE.txt b/management/azure_mgmt_billing/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_billing/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_billing/Rakefile b/management/azure_mgmt_billing/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_billing/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_billing/azure_mgmt_billing.gemspec b/management/azure_mgmt_billing/azure_mgmt_billing.gemspec new file mode 100644 index 0000000000..84fa2677ce --- /dev/null +++ b/management/azure_mgmt_billing/azure_mgmt_billing.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_billing/module_definition' +require 'generated/azure_mgmt_billing/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_billing' + spec.version = Azure::ARM::Billing::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Billing Services Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Billing.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_billing/lib/azure_mgmt_billing.rb b/management/azure_mgmt_billing/lib/azure_mgmt_billing.rb new file mode 100644 index 0000000000..2f041f7bcd --- /dev/null +++ b/management/azure_mgmt_billing/lib/azure_mgmt_billing.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_billing' + diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing.rb new file mode 100644 index 0000000000..40c185f8b0 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing.rb @@ -0,0 +1,41 @@ +# encoding: 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 'generated/azure_mgmt_billing/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::Billing + autoload :BillingPeriods, 'generated/azure_mgmt_billing/billing_periods.rb' + autoload :Invoices, 'generated/azure_mgmt_billing/invoices.rb' + autoload :Operations, 'generated/azure_mgmt_billing/operations.rb' + autoload :BillingManagementClient, 'generated/azure_mgmt_billing/billing_management_client.rb' + + module Models + autoload :Resource, 'generated/azure_mgmt_billing/models/resource.rb' + autoload :BillingPeriodsListResult, 'generated/azure_mgmt_billing/models/billing_periods_list_result.rb' + autoload :InvoicesListResult, 'generated/azure_mgmt_billing/models/invoices_list_result.rb' + autoload :ErrorDetails, 'generated/azure_mgmt_billing/models/error_details.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_billing/models/operation_display.rb' + autoload :DownloadUrl, 'generated/azure_mgmt_billing/models/download_url.rb' + autoload :Operation, 'generated/azure_mgmt_billing/models/operation.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_billing/models/error_response.rb' + autoload :OperationListResult, 'generated/azure_mgmt_billing/models/operation_list_result.rb' + autoload :BillingPeriod, 'generated/azure_mgmt_billing/models/billing_period.rb' + autoload :Invoice, 'generated/azure_mgmt_billing/models/invoice.rb' + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/billing_management_client.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/billing_management_client.rb new file mode 100644 index 0000000000..2e29ab7e58 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/billing_management_client.rb @@ -0,0 +1,138 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Billing + # + # A service client - single point of access to the REST API. + # + class BillingManagementClient < 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. + # The current version is 2017-04-24-preview. + attr_reader :api_version + + # @return [String] Azure Subscription ID. + 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 [BillingPeriods] billing_periods + attr_reader :billing_periods + + # @return [Invoices] invoices + attr_reader :invoices + + # @return [Operations] operations + attr_reader :operations + + # + # Creates initializes a new instance of the BillingManagementClient 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 + + @billing_periods = BillingPeriods.new(self) + @invoices = Invoices.new(self) + @operations = Operations.new(self) + @api_version = '2017-04-24-preview' + @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_billing' + if defined? Azure::ARM::Billing::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::Billing::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/billing_periods.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/billing_periods.rb new file mode 100644 index 0000000000..c36c0125c5 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/billing_periods.rb @@ -0,0 +1,347 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Billing + # + # Billing client provides access to billing resources for Azure Web-Direct + # subscriptions. Other subscription types which were not purchased directly + # through the Azure web portal are not supported through this preview API. + # + class BillingPeriods + include MsRestAzure + + # + # Creates and initializes a new instance of the BillingPeriods class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [BillingManagementClient] reference to the BillingManagementClient + attr_reader :client + + # + # Lists the available billing periods for a subscription in reverse + # chronological order. + # + # @param filter [String] May be used to filter billing periods by + # billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N billing periods. + # @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(filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + first_page = list_as_lazy(filter, skiptoken, top, custom_headers) + first_page.get_all_items + end + + # + # Lists the available billing periods for a subscription in reverse + # chronological order. + # + # @param filter [String] May be used to filter billing periods by + # billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N billing 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 list_with_http_info(filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + list_async(filter, skiptoken, top, custom_headers).value! + end + + # + # Lists the available billing periods for a subscription in reverse + # chronological order. + # + # @param filter [String] May be used to filter billing periods by + # billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N billing 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 list_async(filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods' + + 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,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top}, + 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::ARM::Billing::Models::BillingPeriodsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a named billing period. + # + # @param billing_period_name [String] The name of a BillingPeriod resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BillingPeriod] operation results. + # + def get(billing_period_name, custom_headers = nil) + response = get_async(billing_period_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a named billing period. + # + # @param billing_period_name [String] The name of a BillingPeriod resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(billing_period_name, custom_headers = nil) + get_async(billing_period_name, custom_headers).value! + end + + # + # Gets a named billing period. + # + # @param billing_period_name [String] The name of a BillingPeriod resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(billing_period_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil? + + + request_headers = {} + + # Set Headers + request_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.Billing/billingPeriods/{billingPeriodName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'billingPeriodName' => billing_period_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::ARM::Billing::Models::BillingPeriod.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 available billing periods for a subscription in reverse + # chronological order. + # + # @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 [BillingPeriodsListResult] 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 available billing periods for a subscription in reverse + # chronological order. + # + # @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 available billing periods for a subscription in reverse + # chronological order. + # + # @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::ARM::Billing::Models::BillingPeriodsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 available billing periods for a subscription in reverse + # chronological order. + # + # @param filter [String] May be used to filter billing periods by + # billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N billing periods. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BillingPeriodsListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + response = list_async(filter, skiptoken, top, 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_billing/lib/generated/azure_mgmt_billing/invoices.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/invoices.rb new file mode 100644 index 0000000000..ed56541d93 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/invoices.rb @@ -0,0 +1,466 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Billing + # + # Billing client provides access to billing resources for Azure Web-Direct + # subscriptions. Other subscription types which were not purchased directly + # through the Azure web portal are not supported through this preview API. + # + class Invoices + include MsRestAzure + + # + # Creates and initializes a new instance of the Invoices class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [BillingManagementClient] reference to the BillingManagementClient + attr_reader :client + + # + # Lists the available invoices for a subscription in reverse chronological + # order beginning with the most recent invoice. In preview, invoices are + # available via this API only for invoice periods which end December 1, 2016 or + # later. + # + # @param expand [String] May be used to expand the downloadUrl property within + # a list of invoices. This enables download links to be generated for multiple + # invoices at once. By default, downloadURLs are not included when listing + # invoices. + # @param filter [String] May be used to filter invoices by + # invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N invoices. + # @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(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + first_page = list_as_lazy(expand, filter, skiptoken, top, custom_headers) + first_page.get_all_items + end + + # + # Lists the available invoices for a subscription in reverse chronological + # order beginning with the most recent invoice. In preview, invoices are + # available via this API only for invoice periods which end December 1, 2016 or + # later. + # + # @param expand [String] May be used to expand the downloadUrl property within + # a list of invoices. This enables download links to be generated for multiple + # invoices at once. By default, downloadURLs are not included when listing + # invoices. + # @param filter [String] May be used to filter invoices by + # invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N invoices. + # @param custom_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(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + list_async(expand, filter, skiptoken, top, custom_headers).value! + end + + # + # Lists the available invoices for a subscription in reverse chronological + # order beginning with the most recent invoice. In preview, invoices are + # available via this API only for invoice periods which end December 1, 2016 or + # later. + # + # @param expand [String] May be used to expand the downloadUrl property within + # a list of invoices. This enables download links to be generated for multiple + # invoices at once. By default, downloadURLs are not included when listing + # invoices. + # @param filter [String] May be used to filter invoices by + # invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N invoices. + # @param [Hash{String => String}] 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(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices' + + 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,'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top}, + 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::ARM::Billing::Models::InvoicesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a named invoice resource. When getting a single invoice, the downloadUrl + # property is expanded automatically. + # + # @param invoice_name [String] The name of an invoice resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Invoice] operation results. + # + def get(invoice_name, custom_headers = nil) + response = get_async(invoice_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a named invoice resource. When getting a single invoice, the downloadUrl + # property is expanded automatically. + # + # @param invoice_name [String] The name of an invoice resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(invoice_name, custom_headers = nil) + get_async(invoice_name, custom_headers).value! + end + + # + # Gets a named invoice resource. When getting a single invoice, the downloadUrl + # property is expanded automatically. + # + # @param invoice_name [String] The name of an invoice resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(invoice_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'invoice_name is nil' if invoice_name.nil? + + + request_headers = {} + + # Set Headers + request_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.Billing/invoices/{invoiceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'invoiceName' => invoice_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::ARM::Billing::Models::Invoice.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 most recent invoice. When getting a single invoice, the downloadUrl + # property is expanded automatically. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Invoice] operation results. + # + def get_latest(custom_headers = nil) + response = get_latest_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the most recent invoice. When getting a single invoice, the downloadUrl + # property is expanded automatically. + # + # @param custom_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_latest_with_http_info(custom_headers = nil) + get_latest_async(custom_headers).value! + end + + # + # Gets the most recent invoice. When getting a single invoice, the downloadUrl + # property is expanded automatically. + # + # @param [Hash{String => String}] 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_latest_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Billing::Models::Invoice.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 available invoices for a subscription in reverse chronological + # order beginning with the most recent invoice. In preview, invoices are + # available via this API only for invoice periods which end December 1, 2016 or + # later. + # + # @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 [InvoicesListResult] 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 available invoices for a subscription in reverse chronological + # order beginning with the most recent invoice. In preview, invoices are + # available via this API only for invoice periods which end December 1, 2016 or + # later. + # + # @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 available invoices for a subscription in reverse chronological + # order beginning with the most recent invoice. In preview, invoices are + # available via this API only for invoice periods which end December 1, 2016 or + # later. + # + # @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::ARM::Billing::Models::InvoicesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 available invoices for a subscription in reverse chronological + # order beginning with the most recent invoice. In preview, invoices are + # available via this API only for invoice periods which end December 1, 2016 or + # later. + # + # @param expand [String] May be used to expand the downloadUrl property within + # a list of invoices. This enables download links to be generated for multiple + # invoices at once. By default, downloadURLs are not included when listing + # invoices. + # @param filter [String] May be used to filter invoices by + # invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and + # 'and'. It does not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N invoices. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InvoicesListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + response = list_async(expand, filter, skiptoken, top, 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_billing/lib/generated/azure_mgmt_billing/models/billing_period.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/billing_period.rb new file mode 100644 index 0000000000..7ea5f18651 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/billing_period.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::ARM::Billing + module Models + # + # A billing period resource. + # + class BillingPeriod < Resource + + include MsRestAzure + + # @return [Date] The start of the date range covered by the billing + # period. + attr_accessor :billing_period_start_date + + # @return [Date] The end of the date range covered by the billing period. + attr_accessor :billing_period_end_date + + # @return [Array] Array of invoice ids that associated with. + attr_accessor :invoice_ids + + + # + # Mapper for BillingPeriod class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BillingPeriod', + type: { + name: 'Composite', + class_name: 'BillingPeriod', + 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' + } + }, + billing_period_start_date: { + required: false, + read_only: true, + serialized_name: 'properties.billingPeriodStartDate', + type: { + name: 'Date' + } + }, + billing_period_end_date: { + required: false, + read_only: true, + serialized_name: 'properties.billingPeriodEndDate', + type: { + name: 'Date' + } + }, + invoice_ids: { + required: false, + read_only: true, + serialized_name: 'properties.invoiceIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/billing_periods_list_result.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/billing_periods_list_result.rb new file mode 100644 index 0000000000..98f25e6fa8 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/billing_periods_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::ARM::Billing + module Models + # + # Result of listing billing periods. It contains a list of available + # billing periods in reverse chronological order. + # + class BillingPeriodsListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of billing periods. + attr_accessor :value + + # @return [String] The link (url) to the next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [BillingPeriodsListResult] 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 BillingPeriodsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BillingPeriodsListResult', + type: { + name: 'Composite', + class_name: 'BillingPeriodsListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BillingPeriodElementType', + type: { + name: 'Composite', + class_name: 'BillingPeriod' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/download_url.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/download_url.rb new file mode 100644 index 0000000000..59794e8107 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/download_url.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::ARM::Billing + module Models + # + # A secure URL that can be used to download a PDF invoice until the URL + # expires. + # + class DownloadUrl + + include MsRestAzure + + # @return [DateTime] The time in UTC at which this download URL will + # expire. + attr_accessor :expiry_time + + # @return [String] The URL to the PDF file. + attr_accessor :url + + + # + # Mapper for DownloadUrl class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DownloadUrl', + type: { + name: 'Composite', + class_name: 'DownloadUrl', + model_properties: { + expiry_time: { + required: false, + read_only: true, + serialized_name: 'expiryTime', + type: { + name: 'DateTime' + } + }, + url: { + required: false, + read_only: true, + serialized_name: 'url', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/error_details.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/error_details.rb new file mode 100644 index 0000000000..2e04c83a9c --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/error_details.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::ARM::Billing + module Models + # + # The details of the error. + # + class ErrorDetails + + include MsRestAzure + + # @return [String] Error code. + attr_accessor :code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :message + + # @return [String] The target of the particular error. + attr_accessor :target + + + # + # Mapper for ErrorDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorDetails', + type: { + name: 'Composite', + class_name: 'ErrorDetails', + model_properties: { + code: { + required: false, + read_only: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + }, + target: { + required: false, + read_only: true, + serialized_name: 'target', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/error_response.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/error_response.rb new file mode 100644 index 0000000000..6c0d6daa88 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/error_response.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::ARM::Billing + module Models + # + # Error response indicates that the service is not able to process the + # incoming request. The reason is provided in the error message. + # + class ErrorResponse + + include MsRestAzure + + # @return [ErrorDetails] The details of the error. + attr_accessor :error + + + # + # 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: { + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'ErrorDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/invoice.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/invoice.rb new file mode 100644 index 0000000000..662c79269c --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/invoice.rb @@ -0,0 +1,111 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Billing + module Models + # + # An invoice resource can be used download a PDF version of an invoice. + # + class Invoice < Resource + + include MsRestAzure + + # @return [DownloadUrl] A secure link to download the PDF version of an + # invoice. The link will cease to work after its expiry time is reached. + attr_accessor :download_url + + # @return [Date] The start of the date range covered by the invoice. + attr_accessor :invoice_period_start_date + + # @return [Date] The end of the date range covered by the invoice. + attr_accessor :invoice_period_end_date + + # @return [Array] Array of billing perdiod ids that the invoice + # is attributed to. + attr_accessor :billing_period_ids + + + # + # Mapper for Invoice class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Invoice', + type: { + name: 'Composite', + class_name: 'Invoice', + 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' + } + }, + download_url: { + required: false, + serialized_name: 'properties.downloadUrl', + type: { + name: 'Composite', + class_name: 'DownloadUrl' + } + }, + invoice_period_start_date: { + required: false, + read_only: true, + serialized_name: 'properties.invoicePeriodStartDate', + type: { + name: 'Date' + } + }, + invoice_period_end_date: { + required: false, + read_only: true, + serialized_name: 'properties.invoicePeriodEndDate', + type: { + name: 'Date' + } + }, + billing_period_ids: { + required: false, + read_only: true, + serialized_name: 'properties.billingPeriodIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/invoices_list_result.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/invoices_list_result.rb new file mode 100644 index 0000000000..e25d9a7ab9 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/invoices_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::ARM::Billing + module Models + # + # Result of listing invoices. It contains a list of available invoices in + # reverse chronological order. + # + class InvoicesListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of invoices. + attr_accessor :value + + # @return [String] The link (url) to the next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [InvoicesListResult] 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 InvoicesListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InvoicesListResult', + type: { + name: 'Composite', + class_name: 'InvoicesListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InvoiceElementType', + type: { + name: 'Composite', + class_name: 'Invoice' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation.rb new file mode 100644 index 0000000000..5dd62228a7 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation.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::ARM::Billing + module Models + # + # A Billing REST API operation. + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation}. + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation_display.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation_display.rb new file mode 100644 index 0000000000..def3f294c1 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation_display.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::ARM::Billing + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.Billing. + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: Invoice, + # etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation_list_result.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation_list_result.rb new file mode 100644 index 0000000000..dd1cbc46a2 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/operation_list_result.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::ARM::Billing + module Models + # + # Result listing billing operations. It contains a list of operations and a + # URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of billing operations supported by the + # Microsoft.Billing 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/resource.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/models/resource.rb new file mode 100644 index 0000000000..6b57acc26c --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/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::ARM::Billing + module Models + # + # The Resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + + # + # Mapper for 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_billing/lib/generated/azure_mgmt_billing/module_definition.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/module_definition.rb new file mode 100644 index 0000000000..a64986c1d2 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/module_definition.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 end +module Azure::ARM end +module Azure::ARM::Billing end diff --git a/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/operations.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/operations.rb new file mode 100644 index 0000000000..c24164eeba --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/operations.rb @@ -0,0 +1,215 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Billing + # + # Billing client provides access to billing resources for Azure Web-Direct + # subscriptions. Other subscription types which were not purchased directly + # through the Azure web portal are not supported through this preview API. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [BillingManagementClient] reference to the BillingManagementClient + attr_reader :client + + # + # Lists all of the available billing REST API operations. + # + # @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 billing REST API operations. + # + # @param custom_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 billing REST API operations. + # + # @param [Hash{String => String}] 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.Billing/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Billing::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 billing REST 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 [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 billing REST 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_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 billing REST 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_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::ARM::Billing::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 billing REST API operations. + # + # @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_billing/lib/generated/azure_mgmt_billing/version.rb b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/version.rb new file mode 100644 index 0000000000..bf8e546801 --- /dev/null +++ b/management/azure_mgmt_billing/lib/generated/azure_mgmt_billing/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::ARM::Billing + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_billing/spec/spec_helper.rb b/management/azure_mgmt_billing/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_billing/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_cdn/azure_mgmt_cdn.gemspec b/management/azure_mgmt_cdn/azure_mgmt_cdn.gemspec index 8cf5a1e5f5..0c4b1fcf81 100644 --- a/management/azure_mgmt_cdn/azure_mgmt_cdn.gemspec +++ b/management/azure_mgmt_cdn/azure_mgmt_cdn.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn.rb index 1062d6c5f5..1d777b7695 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -24,36 +24,42 @@ module Azure::ARM::CDN autoload :Endpoints, 'generated/azure_mgmt_cdn/endpoints.rb' autoload :Origins, 'generated/azure_mgmt_cdn/origins.rb' autoload :CustomDomains, 'generated/azure_mgmt_cdn/custom_domains.rb' + autoload :ResourceUsageOperations, 'generated/azure_mgmt_cdn/resource_usage_operations.rb' + autoload :Operations, 'generated/azure_mgmt_cdn/operations.rb' autoload :EdgeNodes, 'generated/azure_mgmt_cdn/edge_nodes.rb' autoload :CdnManagementClient, 'generated/azure_mgmt_cdn/cdn_management_client.rb' module Models - autoload :CustomDomainParameters, 'generated/azure_mgmt_cdn/models/custom_domain_parameters.rb' autoload :CustomDomainListResult, 'generated/azure_mgmt_cdn/models/custom_domain_list_result.rb' - autoload :ProfileListResult, 'generated/azure_mgmt_cdn/models/profile_list_result.rb' autoload :Sku, 'generated/azure_mgmt_cdn/models/sku.rb' - autoload :SsoUri, 'generated/azure_mgmt_cdn/models/sso_uri.rb' - autoload :EdgenodeResult, 'generated/azure_mgmt_cdn/models/edgenode_result.rb' autoload :ValidateCustomDomainInput, 'generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb' - autoload :GeoFilter, 'generated/azure_mgmt_cdn/models/geo_filter.rb' + autoload :ProfileListResult, 'generated/azure_mgmt_cdn/models/profile_list_result.rb' autoload :ValidateCustomDomainOutput, 'generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb' - autoload :PurgeParameters, 'generated/azure_mgmt_cdn/models/purge_parameters.rb' + autoload :SsoUri, 'generated/azure_mgmt_cdn/models/sso_uri.rb' autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_cdn/models/check_name_availability_input.rb' - autoload :ErrorResponse, 'generated/azure_mgmt_cdn/models/error_response.rb' + autoload :DeepCreatedOrigin, 'generated/azure_mgmt_cdn/models/deep_created_origin.rb' autoload :CheckNameAvailabilityOutput, 'generated/azure_mgmt_cdn/models/check_name_availability_output.rb' - autoload :OriginListResult, 'generated/azure_mgmt_cdn/models/origin_list_result.rb' + autoload :EndpointListResult, 'generated/azure_mgmt_cdn/models/endpoint_list_result.rb' + autoload :ValidateProbeInput, 'generated/azure_mgmt_cdn/models/validate_probe_input.rb' + autoload :EndpointUpdateParameters, 'generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb' + autoload :ValidateProbeOutput, 'generated/azure_mgmt_cdn/models/validate_probe_output.rb' + autoload :LoadParameters, 'generated/azure_mgmt_cdn/models/load_parameters.rb' autoload :ResourceUsage, 'generated/azure_mgmt_cdn/models/resource_usage.rb' - autoload :DeepCreatedOrigin, 'generated/azure_mgmt_cdn/models/deep_created_origin.rb' + autoload :OriginUpdateParameters, 'generated/azure_mgmt_cdn/models/origin_update_parameters.rb' autoload :ResourceUsageListResult, 'generated/azure_mgmt_cdn/models/resource_usage_list_result.rb' - autoload :EndpointUpdateParameters, 'generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb' + autoload :OriginListResult, 'generated/azure_mgmt_cdn/models/origin_list_result.rb' + autoload :CustomDomainParameters, 'generated/azure_mgmt_cdn/models/custom_domain_parameters.rb' + autoload :ProfileUpdateParameters, 'generated/azure_mgmt_cdn/models/profile_update_parameters.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_cdn/models/error_response.rb' + autoload :Resource, 'generated/azure_mgmt_cdn/models/resource.rb' autoload :OperationDisplay, 'generated/azure_mgmt_cdn/models/operation_display.rb' - autoload :OriginUpdateParameters, 'generated/azure_mgmt_cdn/models/origin_update_parameters.rb' + autoload :PurgeParameters, 'generated/azure_mgmt_cdn/models/purge_parameters.rb' autoload :Operation, 'generated/azure_mgmt_cdn/models/operation.rb' - autoload :EndpointListResult, 'generated/azure_mgmt_cdn/models/endpoint_list_result.rb' - autoload :OperationListResult, 'generated/azure_mgmt_cdn/models/operation_list_result.rb' - autoload :ProfileUpdateParameters, 'generated/azure_mgmt_cdn/models/profile_update_parameters.rb' + autoload :SupportedOptimizationTypesListResult, 'generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb' + autoload :OperationsListResult, 'generated/azure_mgmt_cdn/models/operations_list_result.rb' + autoload :EdgenodeResult, 'generated/azure_mgmt_cdn/models/edgenode_result.rb' autoload :CidrIpAddress, 'generated/azure_mgmt_cdn/models/cidr_ip_address.rb' - autoload :LoadParameters, 'generated/azure_mgmt_cdn/models/load_parameters.rb' + autoload :GeoFilter, 'generated/azure_mgmt_cdn/models/geo_filter.rb' autoload :IpAddressGroup, 'generated/azure_mgmt_cdn/models/ip_address_group.rb' autoload :Profile, 'generated/azure_mgmt_cdn/models/profile.rb' autoload :Endpoint, 'generated/azure_mgmt_cdn/models/endpoint.rb' @@ -62,12 +68,14 @@ module Models autoload :EdgeNode, 'generated/azure_mgmt_cdn/models/edge_node.rb' autoload :SkuName, 'generated/azure_mgmt_cdn/models/sku_name.rb' autoload :ProfileResourceState, 'generated/azure_mgmt_cdn/models/profile_resource_state.rb' + autoload :OptimizationType, 'generated/azure_mgmt_cdn/models/optimization_type.rb' autoload :EndpointResourceState, 'generated/azure_mgmt_cdn/models/endpoint_resource_state.rb' autoload :QueryStringCachingBehavior, 'generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb' autoload :GeoFilterActions, 'generated/azure_mgmt_cdn/models/geo_filter_actions.rb' autoload :OriginResourceState, 'generated/azure_mgmt_cdn/models/origin_resource_state.rb' autoload :CustomDomainResourceState, 'generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb' autoload :CustomHttpsProvisioningState, 'generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb' + autoload :CustomHttpsProvisioningSubstate, 'generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb' autoload :ResourceType, 'generated/azure_mgmt_cdn/models/resource_type.rb' end end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/cdn_management_client.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/cdn_management_client.rb index 2ed4cf9203..c9ace691e3 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/cdn_management_client.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/cdn_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,7 +21,7 @@ class CdnManagementClient < MsRestAzure::AzureServiceClient attr_accessor :subscription_id # @return [String] Version of the API to be used with the client request. - # Current version is 2016-10-02. + # Current version is 2017-04-02. attr_reader :api_version # @return [String] Gets or sets the preferred language for the response. @@ -47,6 +47,12 @@ class CdnManagementClient < MsRestAzure::AzureServiceClient # @return [CustomDomains] custom_domains attr_reader :custom_domains + # @return [ResourceUsageOperations] resource_usage_operations + attr_reader :resource_usage_operations + + # @return [Operations] operations + attr_reader :operations + # @return [EdgeNodes] edge_nodes attr_reader :edge_nodes @@ -67,8 +73,10 @@ def initialize(credentials = nil, base_url = nil, options = nil) @endpoints = Endpoints.new(self) @origins = Origins.new(self) @custom_domains = CustomDomains.new(self) + @resource_usage_operations = ResourceUsageOperations.new(self) + @operations = Operations.new(self) @edge_nodes = EdgeNodes.new(self) - @api_version = '2016-10-02' + @api_version = '2017-04-02' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true @@ -231,42 +239,52 @@ def check_name_availability_async(check_name_availability_input, custom_headers end # - # Check the quota and actual usage of the CDN profiles under the given - # subscription. + # Check if the probe path is a valid path and the file can be accessed. Probe + # path is the path to a file hosted on the origin server to help accelerate the + # delivery of dynamic content via the CDN endpoint. This path is relative to + # the origin path specified in the endpoint configuration. # + # @param validate_probe_input [ValidateProbeInput] Input to check. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [ValidateProbeOutput] operation results. # - def list_resource_usage(custom_headers = nil) - first_page = list_resource_usage_as_lazy(custom_headers) - first_page.get_all_items + def validate_probe(validate_probe_input, custom_headers = nil) + response = validate_probe_async(validate_probe_input, custom_headers).value! + response.body unless response.nil? end # - # Check the quota and actual usage of the CDN profiles under the given - # subscription. + # Check if the probe path is a valid path and the file can be accessed. Probe + # path is the path to a file hosted on the origin server to help accelerate the + # delivery of dynamic content via the CDN endpoint. This path is relative to + # the origin path specified in the endpoint configuration. # + # @param validate_probe_input [ValidateProbeInput] Input to check. # @param custom_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_resource_usage_with_http_info(custom_headers = nil) - list_resource_usage_async(custom_headers).value! + def validate_probe_with_http_info(validate_probe_input, custom_headers = nil) + validate_probe_async(validate_probe_input, custom_headers).value! end # - # Check the quota and actual usage of the CDN profiles under the given - # subscription. + # Check if the probe path is a valid path and the file can be accessed. Probe + # path is the path to a file hosted on the origin server to help accelerate the + # delivery of dynamic content via the CDN endpoint. This path is relative to + # the origin path specified in the endpoint configuration. # + # @param validate_probe_input [ValidateProbeInput] Input to check. # @param [Hash{String => String}] 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_resource_usage_async(custom_headers = nil) + def validate_probe_async(validate_probe_input, custom_headers = nil) + fail ArgumentError, 'validate_probe_input is nil' if validate_probe_input.nil? fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? fail ArgumentError, 'api_version is nil' if api_version.nil? @@ -276,350 +294,23 @@ def list_resource_usage_async(custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = accept_language unless accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage' - - request_url = @base_url || self.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'subscriptionId' => subscription_id}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = self.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::ARM::CDN::Models::ResourceUsageListResult.mapper() - result.body = self.deserialize(result_mapper, parsed_response) - rescue 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 CDN REST API operations. - # - # @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_operations(custom_headers = nil) - first_page = list_operations_as_lazy(custom_headers) - first_page.get_all_items - end - - # - # Lists all of the available CDN REST API operations. - # - # @param custom_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_operations_with_http_info(custom_headers = nil) - list_operations_async(custom_headers).value! - end - - # - # Lists all of the available CDN REST API operations. - # - # @param [Hash{String => String}] 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_operations_async(custom_headers = nil) - fail ArgumentError, 'api_version is nil' if api_version.nil? + request_headers['Content-Type'] = 'application/json; charset=utf-8' - request_headers = {} + # Serialize Request + request_mapper = Azure::ARM::CDN::Models::ValidateProbeInput.mapper() + request_content = self.serialize(request_mapper, validate_probe_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = accept_language unless accept_language.nil? - path_template = 'providers/Microsoft.Cdn/operations' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe' request_url = @base_url || self.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => subscription_id}, query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = self.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::ARM::CDN::Models::OperationListResult.mapper() - result.body = self.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Check the quota and actual usage of the CDN profiles under the given - # 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 [ResourceUsageListResult] operation results. - # - def list_resource_usage_next(next_page_link, custom_headers = nil) - response = list_resource_usage_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Check the quota and actual usage of the CDN profiles under the given - # 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_resource_usage_next_with_http_info(next_page_link, custom_headers = nil) - list_resource_usage_next_async(next_page_link, custom_headers).value! - end - - # - # Check the quota and actual usage of the CDN profiles under the given - # 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_resource_usage_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'] = accept_language unless accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || self.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 = self.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::ARM::CDN::Models::ResourceUsageListResult.mapper() - result.body = self.deserialize(result_mapper, parsed_response) - rescue 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 CDN REST 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 [OperationListResult] operation results. - # - def list_operations_next(next_page_link, custom_headers = nil) - response = list_operations_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists all of the available CDN REST 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_operations_next_with_http_info(next_page_link, custom_headers = nil) - list_operations_next_async(next_page_link, custom_headers).value! - end - - # - # Lists all of the available CDN REST 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_operations_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'] = accept_language unless accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || self.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 = self.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::ARM::CDN::Models::OperationListResult.mapper() - result.body = self.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Check the quota and actual usage of the CDN profiles under the given - # subscription. - # - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ResourceUsageListResult] operation results. - # - def list_resource_usage_as_lazy(custom_headers = nil) - first_page = list_resource_usage_as_lazy_as_lazy(custom_headers) - first_page.get_all_items - end - - # - # Check the quota and actual usage of the CDN profiles under the given - # 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_resource_usage_as_lazy_with_http_info(custom_headers = nil) - list_resource_usage_as_lazy_async(custom_headers).value! - end - - # - # Check the quota and actual usage of the CDN profiles under the given - # 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_resource_usage_as_lazy_async(custom_headers = nil) - - - request_headers = {} - path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage' - - request_url = @base_url || self.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -639,82 +330,7 @@ def list_resource_usage_as_lazy_async(custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CDN::Models::ResourceUsageListResult.mapper() - result.body = self.deserialize(result_mapper, parsed_response) - rescue 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 CDN REST API operations. - # - # @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_operations_as_lazy(custom_headers = nil) - first_page = list_operations_as_lazy_as_lazy(custom_headers) - first_page.get_all_items - end - - # - # Lists all of the available CDN REST API operations. - # - # @param custom_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_operations_as_lazy_with_http_info(custom_headers = nil) - list_operations_as_lazy_async(custom_headers).value! - end - - # - # Lists all of the available CDN REST API operations. - # - # @param [Hash{String => String}] 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_operations_as_lazy_async(custom_headers = nil) - - - request_headers = {} - path_template = 'providers/Microsoft.Cdn/operations' - - request_url = @base_url || self.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = self.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::ARM::CDN::Models::OperationListResult.mapper() + result_mapper = Azure::ARM::CDN::Models::ValidateProbeOutput.mapper() result.body = self.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/custom_domains.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/custom_domains.rb index 7f7f5940e4..346671cbaf 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/custom_domains.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/custom_domains.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -438,7 +438,7 @@ def disable_custom_https_async(resource_group_name, profile_name, endpoint_name, http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 202 || status_code == 200 + unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end @@ -549,7 +549,7 @@ def enable_custom_https_async(resource_group_name, profile_name, endpoint_name, http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 202 || status_code == 200 + unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/edge_nodes.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/edge_nodes.rb index f59ba88954..805b507b86 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/edge_nodes.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/edge_nodes.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -24,7 +24,8 @@ def initialize(client) attr_reader :client # - # Lists all the edge nodes of a CDN service. + # Edgenodes are the global Point of Presence (POP) locations used to deliver + # CDN content to end users. # # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. @@ -37,7 +38,8 @@ def list(custom_headers = nil) end # - # Lists all the edge nodes of a CDN service. + # Edgenodes are the global Point of Presence (POP) locations used to deliver + # CDN content to end users. # # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. @@ -49,7 +51,8 @@ def list_with_http_info(custom_headers = nil) end # - # Lists all the edge nodes of a CDN service. + # Edgenodes are the global Point of Presence (POP) locations used to deliver + # CDN content to end users. # # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. @@ -105,7 +108,8 @@ def list_async(custom_headers = nil) end # - # Lists all the edge nodes of a CDN service. + # Edgenodes are the global Point of Presence (POP) locations used to deliver + # CDN content to end users. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -120,7 +124,8 @@ def list_next(next_page_link, custom_headers = nil) end # - # Lists all the edge nodes of a CDN service. + # Edgenodes are the global Point of Presence (POP) locations used to deliver + # CDN content to end users. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -134,7 +139,8 @@ def list_next_with_http_info(next_page_link, custom_headers = nil) end # - # Lists all the edge nodes of a CDN service. + # Edgenodes are the global Point of Presence (POP) locations used to deliver + # CDN content to end users. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -192,7 +198,8 @@ def list_next_async(next_page_link, custom_headers = nil) end # - # Lists all the edge nodes of a CDN service. + # Edgenodes are the global Point of Presence (POP) locations used to deliver + # CDN content to end users. # # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/endpoints.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/endpoints.rb index 963dc07425..f50a27b32f 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/endpoints.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/endpoints.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_input.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_input.rb index e5bb427406..57cdf35ba9 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityInput include MsRestAzure - include MsRest::JSONable # @return [String] The resource name to validate. attr_accessor :name diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_output.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_output.rb index e0e38c267e..e1338d6b36 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/check_name_availability_output.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityOutput include MsRestAzure - include MsRest::JSONable # @return [Boolean] Indicates whether the name is available. attr_accessor :name_available @@ -38,6 +37,7 @@ def self.mapper() model_properties: { name_available: { required: false, + read_only: true, serialized_name: 'nameAvailable', type: { name: 'Boolean' @@ -45,6 +45,7 @@ def self.mapper() }, reason: { required: false, + read_only: true, serialized_name: 'reason', type: { name: 'String' @@ -52,6 +53,7 @@ def self.mapper() }, message: { required: false, + read_only: true, serialized_name: 'message', type: { name: 'String' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/cidr_ip_address.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/cidr_ip_address.rb index 0c4c1be7c6..e0ad2eab4e 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/cidr_ip_address.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CidrIpAddress include MsRestAzure - include MsRest::JSONable # @return [String] Ip adress itself. attr_accessor :base_ip_address diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain.rb index 2029973cab..b31e5f4b5b 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain.rb @@ -1,18 +1,18 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN module Models # - # Customer provided domain for branding purposes, e.g. www.consoto.com. + # Friendly domain name mapping to the endpoint hostname that the customer + # provides for branding purposes, e.g. www.consoto.com. # - class CustomDomain < MsRestAzure::Resource + class CustomDomain < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The host name of the custom domain. Must be a domain # name. attr_accessor :host_name @@ -21,11 +21,22 @@ class CustomDomain < MsRestAzure::Resource # domain. Possible values include: 'Creating', 'Active', 'Deleting' attr_accessor :resource_state - # @return [CustomHttpsProvisioningState] Provisioning state of Custom + # @return [CustomHttpsProvisioningState] Provisioning status of Custom # Https of the custom domain. Possible values include: 'Enabling', # 'Enabled', 'Disabling', 'Disabled', 'Failed' attr_accessor :custom_https_provisioning_state + # @return [CustomHttpsProvisioningSubstate] Provisioning substate shows + # the progress of custom HTTPS enabling/disabling process step by step. + # Possible values include: 'SubmittingDomainControlValidationRequest', + # 'PendingDomainControlValidationREquestApproval', + # 'DomainControlValidationRequestApproved', + # 'DomainControlValidationRequestRejected', + # 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', + # 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', + # 'CertificateDeleted' + attr_accessor :custom_https_provisioning_substate + # @return [String] Special validation or data may be required when # delivering CDN to some regions due to local compliance reasons. E.g. # ICP license number of a custom domain is required to deliver content in @@ -116,6 +127,14 @@ def self.mapper() name: 'String' } }, + custom_https_provisioning_substate: { + required: false, + read_only: true, + serialized_name: 'properties.customHttpsProvisioningSubstate', + type: { + name: 'String' + } + }, validation_data: { required: false, serialized_name: 'properties.validationData', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb index 5f4ec48cba..6418362c3a 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -68,6 +68,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb index 43bc7bd0e5..c180245165 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CustomDomainParameters include MsRestAzure - include MsRest::JSONable # @return [String] The host name of the custom domain. Must be a domain # name. attr_accessor :host_name diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb index ef02148892..6b89a4524f 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb index b446315f32..f548fd44bf 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb new file mode 100644 index 0000000000..75460ce562 --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb @@ -0,0 +1,24 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CDN + module Models + # + # Defines values for CustomHttpsProvisioningSubstate + # + module CustomHttpsProvisioningSubstate + SubmittingDomainControlValidationRequest = "SubmittingDomainControlValidationRequest" + PendingDomainControlValidationREquestApproval = "PendingDomainControlValidationREquestApproval" + DomainControlValidationRequestApproved = "DomainControlValidationRequestApproved" + DomainControlValidationRequestRejected = "DomainControlValidationRequestRejected" + DomainControlValidationRequestTimedOut = "DomainControlValidationRequestTimedOut" + IssuingCertificate = "IssuingCertificate" + DeployingCertificate = "DeployingCertificate" + CertificateDeployed = "CertificateDeployed" + DeletingCertificate = "DeletingCertificate" + CertificateDeleted = "CertificateDeleted" + end + end +end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb index 83bdd0682a..972e32e564 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb @@ -1,22 +1,22 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN module Models # - # Origin to be added when creating a CDN endpoint. + # The main origin of CDN content which is added when creating a CDN + # endpoint. # class DeepCreatedOrigin include MsRestAzure - include MsRest::JSONable # @return [String] Origin name attr_accessor :name - # @return [String] The address of the origin. It can be a domain names, + # @return [String] The address of the origin. It can be a domain name, # IPv4 address, or IPv6 address. attr_accessor :host_name diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edge_node.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edge_node.rb index 9a9ee272f5..380f6ec143 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edge_node.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edge_node.rb @@ -1,18 +1,18 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN module Models # - # Edge node of CDN service. + # Edgenode is a global Point of Presence (POP) location used to deliver CDN + # content to end users. # - class EdgeNode < MsRestAzure::Resource + class EdgeNode < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] List of ip address groups. attr_accessor :ip_address_groups diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edgenode_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edgenode_result.rb index ee61ce1494..c6fda87b40 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edgenode_result.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/edgenode_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -67,6 +67,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint.rb index a06c7bda0f..890e3c0c75 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -11,16 +11,16 @@ module Models # behavior. The CDN endpoint uses the URL format # .azureedge.net. # - class Endpoint < MsRestAzure::Resource + class Endpoint < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The host header CDN sends along with content requests # to origin. The default value is the host name of the origin. attr_accessor :origin_host_header - # @return [String] The path used when CDN sends request to origin. + # @return [String] A directory path on the origin that CDN can use to + # retreive content from, e.g. contoso.cloudapp.net/originpath. attr_accessor :origin_path # @return [Array] List of content types on which compression @@ -44,17 +44,28 @@ class Endpoint < MsRestAzure::Resource # must be allowed. attr_accessor :is_https_allowed - # @return [QueryStringCachingBehavior] Defines the query string caching - # behavior. Possible values include: 'IgnoreQueryString', - # 'BypassCaching', 'UseQueryString', 'NotSet' + # @return [QueryStringCachingBehavior] Defines how CDN caches requests + # that include query strings. You can ignore any query strings when + # caching, bypass caching to prevent requests that contain query strings + # from being cached, or cache every request with a unique URL. Possible + # values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', + # 'NotSet' attr_accessor :query_string_caching_behavior - # @return [String] Customer can specify what scenario they want this CDN - # endpoint to optimize, e.g. Download, Media services. With this - # information we can apply scenario driven optimization. + # @return [OptimizationType] Specifies what scenario the customer wants + # this CDN endpoint to optimize for, e.g. Download, Media services. With + # this information, CDN can apply scenario driven optimization. Possible + # values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', + # 'VideoOnDemandMediaStreaming', 'LargeFileDownload', + # 'DynamicSiteAcceleration' attr_accessor :optimization_type - # @return [Array] List of rules defining user geo access + # @return [String] Path to a file hosted on the origin which helps + # accelerate delivery of the dynamic content and calculate the most + # optimal routes for the CDN. This is relative to the origin path. + attr_accessor :probe_path + + # @return [Array] List of rules defining the user's geo access # within a CDN endpoint. Each geo filter defines an acess rule to a # specified path or content, e.g. block APAC for path /pictures/ attr_accessor :geo_filters @@ -197,6 +208,13 @@ def self.mapper() name: 'String' } }, + probe_path: { + required: false, + serialized_name: 'properties.probePath', + type: { + name: 'String' + } + }, geo_filters: { required: false, serialized_name: 'properties.geoFilters', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb index f7b3d1d13d..229c6e3d72 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -18,7 +18,7 @@ class EndpointListResult attr_accessor :value # @return [String] URL to get the next set of endpoint objects if there - # are any. + # is any. attr_accessor :next_link # return [Proc] with next page method call. @@ -67,6 +67,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb index dffcdde715..07941251a2 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb index 13eabf1b69..cde55c6980 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN module Models # - # Properties required to create a new endpoint. + # Properties required to create or update an endpoint. # class EndpointUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Endpoint tags. attr_accessor :tags @@ -20,7 +19,8 @@ class EndpointUpdateParameters # to origin. The default value is the host name of the origin. attr_accessor :origin_host_header - # @return [String] The path used when CDN sends request to origin. + # @return [String] A directory path on the origin that CDN can use to + # retreive content from, e.g. contoso.cloudapp.net/originpath. attr_accessor :origin_path # @return [Array] List of content types on which compression @@ -44,17 +44,28 @@ class EndpointUpdateParameters # must be allowed. attr_accessor :is_https_allowed - # @return [QueryStringCachingBehavior] Defines the query string caching - # behavior. Possible values include: 'IgnoreQueryString', - # 'BypassCaching', 'UseQueryString', 'NotSet' + # @return [QueryStringCachingBehavior] Defines how CDN caches requests + # that include query strings. You can ignore any query strings when + # caching, bypass caching to prevent requests that contain query strings + # from being cached, or cache every request with a unique URL. Possible + # values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', + # 'NotSet' attr_accessor :query_string_caching_behavior - # @return [String] Customer can specify what scenario they want this CDN - # endpoint to optimize, e.g. Download, Media services. With this - # information we can apply scenario driven optimization. + # @return [OptimizationType] Specifies what scenario the customer wants + # this CDN endpoint to optimize for, e.g. Download, Media services. With + # this information, CDN can apply scenario driven optimization. Possible + # values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', + # 'VideoOnDemandMediaStreaming', 'LargeFileDownload', + # 'DynamicSiteAcceleration' attr_accessor :optimization_type - # @return [Array] List of rules defining user geo access + # @return [String] Path to a file hosted on the origin which helps + # accelerate delivery of the dynamic content and calculate the most + # optimal routes for the CDN. This is relative to the origin path. + attr_accessor :probe_path + + # @return [Array] List of rules defining the user's geo access # within a CDN endpoint. Each geo filter defines an acess rule to a # specified path or content, e.g. block APAC for path /pictures/ attr_accessor :geo_filters @@ -150,6 +161,13 @@ def self.mapper() name: 'String' } }, + probe_path: { + required: false, + serialized_name: 'properties.probePath', + type: { + name: 'String' + } + }, geo_filters: { required: false, serialized_name: 'properties.geoFilters', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/error_response.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/error_response.rb index b72b20837b..49338ce1ad 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/error_response.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/error_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ErrorResponse include MsRestAzure - include MsRest::JSONable # @return [String] Error code. attr_accessor :code @@ -35,6 +34,7 @@ def self.mapper() model_properties: { code: { required: false, + read_only: true, serialized_name: 'code', type: { name: 'String' @@ -42,6 +42,7 @@ def self.mapper() }, message: { required: false, + read_only: true, serialized_name: 'message', type: { name: 'String' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter.rb index 710aa19392..f2d46b9232 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN module Models # - # Rules defining user geo access within a CDN endpoint. + # Rules defining user's geo access within a CDN endpoint. # class GeoFilter include MsRestAzure - include MsRest::JSONable # @return [String] Relative path applicable to geo filter. (e.g. # '/mypictures', '/mypicture/kitty.jpg', and etc.) attr_accessor :relative_path diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter_actions.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter_actions.rb index 326c5c80ea..9dee7274d9 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/geo_filter_actions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/ip_address_group.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/ip_address_group.rb index b325f94e89..e390e7d91e 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/ip_address_group.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/ip_address_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IpAddressGroup include MsRestAzure - include MsRest::JSONable # @return [String] The delivery region of the ip address group attr_accessor :delivery_region diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/load_parameters.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/load_parameters.rb index 12efcbc4b7..eb6718e07b 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/load_parameters.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/load_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LoadParameters include MsRestAzure - include MsRest::JSONable # @return [Array] The path to the content to be loaded. Path # should be a relative file URL of the origin. attr_accessor :content_paths diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation.rb index f5be7b2fa0..67397dc284 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] Operation name: {provider}/{resource}/{operation} attr_accessor :name @@ -34,6 +33,7 @@ def self.mapper() model_properties: { name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation_display.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation_display.rb index 9089b6d9bf..be7420329b 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation_display.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable # @return [String] Service provider: Microsoft.Cdn attr_accessor :provider @@ -38,6 +37,7 @@ def self.mapper() model_properties: { provider: { required: false, + read_only: true, serialized_name: 'provider', type: { name: 'String' @@ -45,6 +45,7 @@ def self.mapper() }, resource: { required: false, + read_only: true, serialized_name: 'resource', type: { name: 'String' @@ -52,6 +53,7 @@ def self.mapper() }, operation: { required: false, + read_only: true, serialized_name: 'operation', type: { name: 'String' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operations_list_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operations_list_result.rb new file mode 100644 index 0000000000..dcdd4989df --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operations_list_result.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::ARM::CDN + module Models + # + # Result of the request to list CDN operations. It contains a list of + # operations and a URL link to get the next set of results. + # + class OperationsListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of CDN operations supported by the CDN + # 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 [OperationsListResult] 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 OperationsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationsListResult', + type: { + name: 'Composite', + class_name: 'OperationsListResult', + model_properties: { + value: { + required: false, + read_only: true, + 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_cdn/lib/generated/azure_mgmt_cdn/models/optimization_type.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/optimization_type.rb new file mode 100644 index 0000000000..02cdee93c1 --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/optimization_type.rb @@ -0,0 +1,19 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CDN + module Models + # + # Defines values for OptimizationType + # + module OptimizationType + GeneralWebDelivery = "GeneralWebDelivery" + GeneralMediaStreaming = "GeneralMediaStreaming" + VideoOnDemandMediaStreaming = "VideoOnDemandMediaStreaming" + LargeFileDownload = "LargeFileDownload" + DynamicSiteAcceleration = "DynamicSiteAcceleration" + end + end +end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin.rb index 819438ecdc..c5c90e3cb7 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -11,11 +11,10 @@ module Models # cached, they attempt to fetch it from one or more of the configured # origins. # - class Origin < MsRestAzure::Resource + class Origin < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The address of the origin. Domain names, IPv4 # addresses, and IPv6 addresses are supported. attr_accessor :host_name diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb index f3b22419d4..c50619bd01 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -67,6 +67,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_resource_state.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_resource_state.rb index f21aeea2ea..98fabc50c5 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_resource_state.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_resource_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_update_parameters.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_update_parameters.rb index 84887daac8..c95bef7fc7 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/origin_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OriginUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [String] The address of the origin. Domain names, IPv4 # addresses, and IPv6 addresses are supported. attr_accessor :host_name diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile.rb index ae704afb52..ee4d176f84 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile.rb @@ -1,21 +1,18 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN module Models # - # CDN profile represents the top level resource and the entry point into - # the CDN API. This allows users to set up a logical grouping of endpoints - # in addition to creating shared configuration settings and selecting - # pricing tiers and providers. + # CDN profile is a logical grouping of endpoints that share the same + # settings, such as CDN provider and pricing tier. # - class Profile < MsRestAzure::Resource + class Profile < Resource include MsRestAzure - include MsRest::JSONable # @return [Sku] The pricing tier (defines a CDN provider, feature list # and rate) of the CDN profile. attr_accessor :sku diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb index 5f094bd0cb..d2657e908e 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -67,6 +67,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_resource_state.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_resource_state.rb index eb319f24a5..087e060fa6 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_resource_state.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_resource_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb index d3c5173a68..bcaab68a28 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ProfileUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Profile tags attr_accessor :tags diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb index c705a4ad29..4b85ef1824 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PurgeParameters include MsRestAzure - include MsRest::JSONable # @return [Array] The path to the content to be purged. Can # describe a file path or a wild card directory. attr_accessor :content_paths diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb index 0e0fd7ec19..b32444020b 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource.rb new file mode 100644 index 0000000000..0987c7b980 --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource.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::ARM::CDN + 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. + attr_accessor :type + + # @return [String] Resource location. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_type.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_type.rb index ed067c6507..3326a16cea 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_type.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage.rb index 76846c46b7..f0b43d1725 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,17 +12,16 @@ class ResourceUsage include MsRestAzure - include MsRest::JSONable - # @return [String] Resource type of the usages. + # @return [String] Resource type for which the usage is provided. attr_accessor :resource_type # @return [String] Unit of the usage. e.g. Count. attr_accessor :unit - # @return [Integer] Actual value of the resource type. + # @return [Integer] Actual value of usage on the specified resource type. attr_accessor :current_value - # @return [Integer] Quota of the resource type. + # @return [Integer] Quota of the specified resource type. attr_accessor :limit @@ -40,6 +39,7 @@ def self.mapper() model_properties: { resource_type: { required: false, + read_only: true, serialized_name: 'resourceType', type: { name: 'String' @@ -47,6 +47,7 @@ def self.mapper() }, unit: { required: false, + read_only: true, serialized_name: 'unit', type: { name: 'String' @@ -54,6 +55,7 @@ def self.mapper() }, current_value: { required: false, + read_only: true, serialized_name: 'currentValue', type: { name: 'Number' @@ -61,6 +63,7 @@ def self.mapper() }, limit: { required: false, + read_only: true, serialized_name: 'limit', type: { name: 'Number' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb index f03e85dbcb..355f09690a 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -66,6 +66,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku.rb index d10b29b198..a00e37f43f 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] Name of the pricing tier. Possible values include: # 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', # 'Standard_Akamai', 'Standard_ChinaCdn' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku_name.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku_name.rb index 21330392e3..a52d1c17ec 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku_name.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sso_uri.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sso_uri.rb index 9d42f0df52..96e8516533 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sso_uri.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/sso_uri.rb @@ -1,18 +1,18 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN module Models # - # SSO URI required to login to the supplemental portal. + # The URI required to login to the supplemental portal from the Azure + # portal. # class SsoUri include MsRestAzure - include MsRest::JSONable # @return [String] The URI used to login to the supplemental portal. attr_accessor :sso_uri_value @@ -31,6 +31,7 @@ def self.mapper() model_properties: { sso_uri_value: { required: false, + read_only: true, serialized_name: 'ssoUriValue', type: { name: 'String' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb new file mode 100644 index 0000000000..ac8f3337d7 --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CDN + module Models + # + # The result of the GetSupportedOptimizationTypes API + # + class SupportedOptimizationTypesListResult + + include MsRestAzure + + # @return [Array] Supported optimization types for a + # profile. + attr_accessor :supported_optimization_types + + + # + # Mapper for SupportedOptimizationTypesListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SupportedOptimizationTypesListResult', + type: { + name: 'Composite', + class_name: 'SupportedOptimizationTypesListResult', + model_properties: { + supported_optimization_types: { + required: false, + read_only: true, + serialized_name: 'supportedOptimizationTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OptimizationTypeElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb index d5c92b796e..a13e4a019f 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ValidateCustomDomainInput include MsRestAzure - include MsRest::JSONable # @return [String] The host name of the custom domain. Must be a domain # name. attr_accessor :host_name diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb index a648064ce9..58bddf10ff 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,9 +12,7 @@ class ValidateCustomDomainOutput include MsRestAzure - include MsRest::JSONable - # @return [Boolean] Indicates whether the custom domain is validated or - # not. + # @return [Boolean] Indicates whether the custom domain is valid or not. attr_accessor :custom_domain_validated # @return [String] The reason why the custom domain is not valid. @@ -39,6 +37,7 @@ def self.mapper() model_properties: { custom_domain_validated: { required: false, + read_only: true, serialized_name: 'customDomainValidated', type: { name: 'Boolean' @@ -46,6 +45,7 @@ def self.mapper() }, reason: { required: false, + read_only: true, serialized_name: 'reason', type: { name: 'String' @@ -53,6 +53,7 @@ def self.mapper() }, message: { required: false, + read_only: true, serialized_name: 'message', type: { name: 'String' diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_probe_input.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_probe_input.rb new file mode 100644 index 0000000000..c3ca324235 --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_probe_input.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::ARM::CDN + module Models + # + # Input of the validate probe API. + # + class ValidateProbeInput + + include MsRestAzure + + # @return [String] The probe URL to validate. + attr_accessor :probe_url + + + # + # Mapper for ValidateProbeInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ValidateProbeInput', + type: { + name: 'Composite', + class_name: 'ValidateProbeInput', + model_properties: { + probe_url: { + required: true, + serialized_name: 'probeURL', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_probe_output.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_probe_output.rb new file mode 100644 index 0000000000..3f21522b9d --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/validate_probe_output.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::ARM::CDN + module Models + # + # Output of the validate probe API. + # + class ValidateProbeOutput + + include MsRestAzure + + # @return [Boolean] Indicates whether the probe URL is accepted or not. + attr_accessor :is_valid + + # @return [String] Specifies the error code when the probe url is not + # accepted. + attr_accessor :error_code + + # @return [String] The detailed error message describing why the probe + # URL is not accepted. + attr_accessor :message + + + # + # Mapper for ValidateProbeOutput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ValidateProbeOutput', + type: { + name: 'Composite', + class_name: 'ValidateProbeOutput', + model_properties: { + is_valid: { + required: false, + read_only: true, + serialized_name: 'isValid', + type: { + name: 'Boolean' + } + }, + error_code: { + required: false, + read_only: true, + serialized_name: 'errorCode', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/module_definition.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/module_definition.rb index de0c4662e1..50a49191b4 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/module_definition.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/operations.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/operations.rb new file mode 100644 index 0000000000..4af8933b0b --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/operations.rb @@ -0,0 +1,215 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CDN + # + # Use these APIs to manage Azure CDN resources through the Azure Resource + # Manager. You must make sure that requests made to these resources are + # secure. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CdnManagementClient] reference to the CdnManagementClient + attr_reader :client + + # + # Lists all of the available CDN REST API operations. + # + # @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 CDN REST API operations. + # + # @param custom_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 CDN REST API operations. + # + # @param [Hash{String => String}] 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.Cdn/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CDN::Models::OperationsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 CDN REST 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 [OperationsListResult] 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 CDN REST 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_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 CDN REST 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_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::ARM::CDN::Models::OperationsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 CDN REST API operations. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationsListResult] 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_cdn/lib/generated/azure_mgmt_cdn/origins.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/origins.rb index 27800e6a85..31c037f346 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/origins.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/origins.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/profiles.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/profiles.rb index 1104701281..efb7071cfb 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/profiles.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/profiles.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -549,6 +549,106 @@ def generate_sso_uri_async(resource_group_name, profile_name, custom_headers = n promise.execute end + # + # Gets the supported optimization types for the current profile. A user can + # create an endpoint with an optimization type from the listed values. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param profile_name [String] Name of the CDN profile which is unique within + # the resource group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SupportedOptimizationTypesListResult] operation results. + # + def list_supported_optimization_types(resource_group_name, profile_name, custom_headers = nil) + response = list_supported_optimization_types_async(resource_group_name, profile_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the supported optimization types for the current profile. A user can + # create an endpoint with an optimization type from the listed values. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param profile_name [String] Name of the CDN profile which is unique within + # 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_supported_optimization_types_with_http_info(resource_group_name, profile_name, custom_headers = nil) + list_supported_optimization_types_async(resource_group_name, profile_name, custom_headers).value! + end + + # + # Gets the supported optimization types for the current profile. A user can + # create an endpoint with an optimization type from the listed values. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param profile_name [String] Name of the CDN profile which is unique within + # 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_supported_optimization_types_async(resource_group_name, profile_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'profile_name is nil' if profile_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CDN::Models::SupportedOptimizationTypesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the quota and actual usage of endpoints under the given CDN profile. # diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/resource_usage_operations.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/resource_usage_operations.rb new file mode 100644 index 0000000000..830664f0a2 --- /dev/null +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/resource_usage_operations.rb @@ -0,0 +1,224 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CDN + # + # Use these APIs to manage Azure CDN resources through the Azure Resource + # Manager. You must make sure that requests made to these resources are + # secure. + # + class ResourceUsageOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the ResourceUsageOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CdnManagementClient] reference to the CdnManagementClient + attr_reader :client + + # + # Check the quota and actual usage of the CDN profiles under the given + # 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 + + # + # Check the quota and actual usage of the CDN profiles under the given + # 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 + + # + # Check the quota and actual usage of the CDN profiles under the given + # subscription. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage' + + 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(: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::ARM::CDN::Models::ResourceUsageListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Check the quota and actual usage of the CDN profiles under the given + # 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 [ResourceUsageListResult] 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 + + # + # Check the quota and actual usage of the CDN profiles under the given + # 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 + + # + # Check the quota and actual usage of the CDN profiles under the given + # 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(: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::ARM::CDN::Models::ResourceUsageListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Check the quota and actual usage of the CDN profiles under the given + # subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceUsageListResult] 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_cdn/lib/generated/azure_mgmt_cdn/version.rb b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/version.rb index 049e66ad7b..9130ad09ff 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/version.rb +++ b/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CDN - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_cognitive_services/azure_mgmt_cognitive_services.gemspec b/management/azure_mgmt_cognitive_services/azure_mgmt_cognitive_services.gemspec index 051ca7adfa..44eadd5d54 100644 --- a/management/azure_mgmt_cognitive_services/azure_mgmt_cognitive_services.gemspec +++ b/management/azure_mgmt_cognitive_services/azure_mgmt_cognitive_services.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services.rb index 198a59833d..dd9e5309ac 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -20,7 +20,6 @@ require 'ms_rest_azure' module Azure::ARM::CognitiveServices - autoload :CognitiveServicesAccounts, 'generated/azure_mgmt_cognitive_services/cognitive_services_accounts.rb' autoload :Accounts, 'generated/azure_mgmt_cognitive_services/accounts.rb' autoload :Operations, 'generated/azure_mgmt_cognitive_services/operations.rb' autoload :CheckSkuAvailability, 'generated/azure_mgmt_cognitive_services/check_sku_availability.rb' diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/accounts.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/accounts.rb index 9ca7eed56c..533b68857e 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/accounts.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/accounts.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,6 +21,435 @@ def initialize(client) # @return [CognitiveServicesManagementClient] reference to the CognitiveServicesManagementClient attr_reader :client + # + # Create Cognitive Services Account. Accounts is a resource group wide resource + # type. It holds the keys for developer to access intelligent APIs. It's also + # the resource type for billing. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param parameters [CognitiveServicesAccountCreateParameters] The parameters + # to provide for the created account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CognitiveServicesAccount] operation results. + # + def create(resource_group_name, account_name, parameters, custom_headers = nil) + response = create_async(resource_group_name, account_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create Cognitive Services Account. Accounts is a resource group wide resource + # type. It holds the keys for developer to access intelligent APIs. It's also + # the resource type for billing. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param parameters [CognitiveServicesAccountCreateParameters] The parameters + # to provide for the created account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil) + create_async(resource_group_name, account_name, parameters, custom_headers).value! + end + + # + # Create Cognitive Services Account. Accounts is a resource group wide resource + # type. It holds the keys for developer to access intelligent APIs. It's also + # the resource type for billing. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param parameters [CognitiveServicesAccountCreateParameters] The parameters + # to provide for the created account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_async(resource_group_name, account_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountCreateParameters.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.CognitiveServices/accounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + 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::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates a Cognitive Services account + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param sku [Sku] Gets or sets the SKU of the resource. + # @param tags [Hash{String => String}] Gets or sets a list of key value pairs + # that describe the resource. These tags can be used in viewing and grouping + # this resource (across resource groups). A maximum of 15 tags can be provided + # for a resource. Each tag must have a key no greater than 128 characters and + # value no greater than 256 characters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CognitiveServicesAccount] operation results. + # + def update(resource_group_name, account_name, sku = nil, tags = nil, custom_headers = nil) + response = update_async(resource_group_name, account_name, sku, tags, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a Cognitive Services account + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param sku [Sku] Gets or sets the SKU of the resource. + # @param tags [Hash{String => String}] Gets or sets a list of key value pairs + # that describe the resource. These tags can be used in viewing and grouping + # this resource (across resource groups). A maximum of 15 tags can be provided + # for a resource. Each tag must have a key no greater than 128 characters and + # value no greater than 256 characters. + # @param custom_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, account_name, sku = nil, tags = nil, custom_headers = nil) + update_async(resource_group_name, account_name, sku, tags, custom_headers).value! + end + + # + # Updates a Cognitive Services account + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param sku [Sku] Gets or sets the SKU of the resource. + # @param tags [Hash{String => String}] Gets or sets a list of key value pairs + # that describe the resource. These tags can be used in viewing and grouping + # this resource (across resource groups). A maximum of 15 tags can be provided + # for a resource. Each tag must have a key no greater than 128 characters and + # value no greater than 256 characters. + # @param [Hash{String => String}] 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, account_name, sku = nil, tags = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + parameters = CognitiveServicesAccountUpdateParameters.new + unless sku.nil? && tags.nil? + parameters.sku = sku + parameters.tags = tags + end + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountUpdateParameters.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.CognitiveServices/accounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a Cognitive Services account from the resource group. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, account_name, custom_headers = nil) + response = delete_async(resource_group_name, account_name, custom_headers).value! + nil + end + + # + # Deletes a Cognitive Services account from the resource group. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, account_name, custom_headers = nil) + delete_async(resource_group_name, account_name, custom_headers).value! + end + + # + # Deletes a Cognitive Services account from the resource group. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + 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.CognitiveServices/accounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 + + # + # Returns a Cognitive Services account specified by the parameters. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CognitiveServicesAccount] operation results. + # + def get_properties(resource_group_name, account_name, custom_headers = nil) + response = get_properties_async(resource_group_name, account_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns a Cognitive Services account specified by the parameters. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_properties_with_http_info(resource_group_name, account_name, custom_headers = nil) + get_properties_async(resource_group_name, account_name, custom_headers).value! + end + + # + # Returns a Cognitive Services account specified by the parameters. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_properties_async(resource_group_name, account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all the resources of a particular type belonging to a resource group # @@ -194,6 +623,311 @@ def list_async(custom_headers = nil) promise.execute end + # + # Lists the account keys for the specified Cognitive Services account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CognitiveServicesAccountKeys] operation results. + # + def list_keys(resource_group_name, account_name, custom_headers = nil) + response = list_keys_async(resource_group_name, account_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the account keys for the specified Cognitive Services account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_keys_with_http_info(resource_group_name, account_name, custom_headers = nil) + list_keys_async(resource_group_name, account_name, custom_headers).value! + end + + # + # Lists the account keys for the specified Cognitive Services account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_keys_async(resource_group_name, account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::CognitiveServices::Models::CognitiveServicesAccountKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates the specified account key for the specified Cognitive Services + # account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param key_name [KeyName] key name to generate (Key1|Key2). Possible values + # include: 'Key1', 'Key2' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CognitiveServicesAccountKeys] operation results. + # + def regenerate_key(resource_group_name, account_name, key_name, custom_headers = nil) + response = regenerate_key_async(resource_group_name, account_name, key_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the specified account key for the specified Cognitive Services + # account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param key_name [KeyName] key name to generate (Key1|Key2). Possible values + # include: 'Key1', 'Key2' + # @param custom_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_key_with_http_info(resource_group_name, account_name, key_name, custom_headers = nil) + regenerate_key_async(resource_group_name, account_name, key_name, custom_headers).value! + end + + # + # Regenerates the specified account key for the specified Cognitive Services + # account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param key_name [KeyName] key name to generate (Key1|Key2). Possible values + # include: 'Key1', 'Key2' + # @param [Hash{String => String}] 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_key_async(resource_group_name, account_name, key_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'key_name is nil' if key_name.nil? + + parameters = RegenerateKeyParameters.new + unless key_name.nil? + parameters.key_name = key_name + end + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CognitiveServices::Models::RegenerateKeyParameters.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.CognitiveServices/accounts/{accountName}/regenerateKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + 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::ARM::CognitiveServices::Models::CognitiveServicesAccountKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 available SKUs for the requested Cognitive Services account + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CognitiveServicesAccountEnumerateSkusResult] operation results. + # + def list_skus(resource_group_name, account_name, custom_headers = nil) + response = list_skus_async(resource_group_name, account_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List available SKUs for the requested Cognitive Services account + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_skus_with_http_info(resource_group_name, account_name, custom_headers = nil) + list_skus_async(resource_group_name, account_name, custom_headers).value! + end + + # + # List available SKUs for the requested Cognitive Services account + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param account_name [String] The name of Cognitive Services account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_skus_async(resource_group_name, account_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountEnumerateSkusResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all the resources of a particular type belonging to a resource group # diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/check_sku_availability.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/check_sku_availability.rb index fba6284589..55dcdc83fe 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/check_sku_availability.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/check_sku_availability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -24,6 +24,7 @@ def initialize(client) # # Check available SKUs. # + # @param location [String] Resource location. # @param skus [Array] The SKU of the resource. # @param kind [Kind] The Kind of the resource. Possible values include: # 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', @@ -36,14 +37,15 @@ def initialize(client) # # @return [CheckSkuAvailabilityResultList] operation results. # - def list(skus, kind, type, custom_headers = nil) - response = list_async(skus, kind, type, custom_headers).value! + def list(location, skus, kind, type, custom_headers = nil) + response = list_async(location, skus, kind, type, custom_headers).value! response.body unless response.nil? end # # Check available SKUs. # + # @param location [String] Resource location. # @param skus [Array] The SKU of the resource. # @param kind [Kind] The Kind of the resource. Possible values include: # 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', @@ -56,13 +58,14 @@ def list(skus, kind, type, custom_headers = nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(skus, kind, type, custom_headers = nil) - list_async(skus, kind, type, custom_headers).value! + def list_with_http_info(location, skus, kind, type, custom_headers = nil) + list_async(location, skus, kind, type, custom_headers).value! end # # Check available SKUs. # + # @param location [String] Resource location. # @param skus [Array] The SKU of the resource. # @param kind [Kind] The Kind of the resource. Possible values include: # 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', @@ -75,10 +78,10 @@ def list_with_http_info(skus, kind, type, custom_headers = nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(skus, kind, type, custom_headers = nil) + def list_async(location, skus, kind, type, custom_headers = nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.location is nil' if @client.location.nil? + fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'skus is nil' if skus.nil? fail ArgumentError, 'kind is nil' if kind.nil? fail ArgumentError, 'type is nil' if type.nil? @@ -109,7 +112,7 @@ def list_async(skus, kind, type, custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'subscriptionId' => @client.subscription_id,'location' => @client.location}, + path_params: {'subscriptionId' => @client.subscription_id,'location' => location}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb index bbc0f3bbfa..3f90dcd56f 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -24,9 +24,6 @@ class CognitiveServicesManagementClient < MsRestAzure::AzureServiceClient # Current version is 2017-04-18 attr_reader :api_version - # @return [String] Resource location. - attr_accessor :location - # @return [String] Gets or sets the preferred language for the response. attr_accessor :accept_language @@ -38,9 +35,6 @@ class CognitiveServicesManagementClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id - # @return [CognitiveServicesAccounts] cognitive_services_accounts - attr_reader :cognitive_services_accounts - # @return [Accounts] accounts attr_reader :accounts @@ -63,7 +57,6 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials - @cognitive_services_accounts = CognitiveServicesAccounts.new(self) @accounts = Accounts.new(self) @operations = Operations.new(self) @check_sku_availability = CheckSkuAvailability.new(self) diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_parameter.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_parameter.rb index e7ab5570e7..7913f998ff 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_parameter.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckSkuAvailabilityParameter include MsRestAzure - include MsRest::JSONable # @return [Array] The SKU of the resource. attr_accessor :skus diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result.rb index edf060aed2..f9c821926f 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckSkuAvailabilityResult include MsRestAzure - include MsRest::JSONable # @return [Kind] The Kind of the resource. Possible values include: # 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', # 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result_list.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result_list.rb index 99bcedee21..6bdf48f25c 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result_list.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckSkuAvailabilityResultList include MsRestAzure - include MsRest::JSONable # @return [Array] Check SKU availability # result list. attr_accessor :value diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb index 9f0e6e2c49..f93d20d569 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CognitiveServicesAccount include MsRestAzure - include MsRest::JSONable # @return [String] Entity Tag attr_accessor :etag @@ -75,6 +74,7 @@ def self.mapper() }, id: { required: false, + read_only: true, serialized_name: 'id', type: { name: 'String' @@ -96,6 +96,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -148,6 +149,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_create_parameters.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_create_parameters.rb index 96b239dd96..e96922cf4e 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_create_parameters.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CognitiveServicesAccountCreateParameters include MsRestAzure - include MsRest::JSONable # @return [Sku] Required. Gets or sets the SKU of the resource. attr_accessor :sku diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_enumerate_skus_result.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_enumerate_skus_result.rb index 1c7c183cd8..17bd27ec44 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_enumerate_skus_result.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_enumerate_skus_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CognitiveServicesAccountEnumerateSkusResult include MsRestAzure - include MsRest::JSONable # @return [Array] Gets the list of # Cognitive Services accounts and their properties. attr_accessor :value diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb index 4e415cadfd..d5538c492f 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CognitiveServicesAccountKeys include MsRestAzure - include MsRest::JSONable # @return [String] Gets the value of key 1. attr_accessor :key1 diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_list_result.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_list_result.rb index fab87609c0..cf7661e1a8 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_list_result.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_update_parameters.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_update_parameters.rb index 2a5ced2b1c..4550c997d1 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_update_parameters.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CognitiveServicesAccountUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Sku] Gets or sets the SKU of the resource. attr_accessor :sku diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_resource_and_sku.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_resource_and_sku.rb index 5791e7a70d..92cf9eca84 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_resource_and_sku.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/cognitive_services_resource_and_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CognitiveServicesResourceAndSku include MsRestAzure - include MsRest::JSONable # @return [String] Resource Namespace and Type attr_accessor :resource_type diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error.rb index e5973c0131..c894890547 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Error include MsRestAzure - include MsRest::JSONable # @return [ErrorBody] The error body. attr_accessor :error diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error_body.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error_body.rb index 63875c14c5..56e3810978 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error_body.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/error_body.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ErrorBody include MsRestAzure - include MsRest::JSONable # @return [String] error code attr_accessor :code diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/key_name.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/key_name.rb index febb50475e..65d0bc6de8 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/key_name.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/key_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/kind.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/kind.rb index 2dc448134e..cb74b8d957 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/kind.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/kind.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_display_info.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_display_info.rb index af5213ae0b..db69d078e6 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_display_info.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_display_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationDisplayInfo include MsRestAzure - include MsRest::JSONable # @return [String] The description of the operation. attr_accessor :description diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity.rb index fb7729ca0b..78795ba5ec 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationEntity include MsRestAzure - include MsRest::JSONable # @return [String] Operation name: {provider}/{resource}/{operation}. attr_accessor :name diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity_list_result.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity_list_result.rb index d4a221a579..e794850a0c 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity_list_result.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/operation_entity_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/provisioning_state.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/provisioning_state.rb index 157a0b0429..df69615cac 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/provisioning_state.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/regenerate_key_parameters.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/regenerate_key_parameters.rb index 609ccd1fb2..c96dbd62e1 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/regenerate_key_parameters.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/regenerate_key_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RegenerateKeyParameters include MsRestAzure - include MsRest::JSONable # @return [KeyName] key name to generate (Key1|Key2). Possible values # include: 'Key1', 'Key2' attr_accessor :key_name diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku.rb index 49ef80d700..a0c9805371 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] Gets or sets the sku name. Required for account # creation, optional for update. Possible values include: 'F0', 'P0', # 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_name.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_name.rb index 9dbaf32822..d96a16a0b9 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_name.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_tier.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_tier.rb index 2e4d457d1b..12981f0e63 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_tier.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/models/sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/module_definition.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/module_definition.rb index b08a821a5e..be933ea042 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/module_definition.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/operations.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/operations.rb index b92fa6a0ca..f9b54b6bb3 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/operations.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/version.rb b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/version.rb index be92fb6c0e..747c5280e3 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/version.rb +++ b/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::CognitiveServices - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_commerce/azure_mgmt_commerce.gemspec b/management/azure_mgmt_commerce/azure_mgmt_commerce.gemspec index 7286c51122..7608916120 100644 --- a/management/azure_mgmt_commerce/azure_mgmt_commerce.gemspec +++ b/management/azure_mgmt_commerce/azure_mgmt_commerce.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce.rb index 15bd8cced2..cdee30a761 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/aggregation_granularity.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/aggregation_granularity.rb index a266ec14f1..d52e3de3d2 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/aggregation_granularity.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/aggregation_granularity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/error_response.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/error_response.rb index 9e2ab4dff9..df202ccae7 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/error_response.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/error_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ErrorResponse include MsRestAzure - include MsRest::JSONable # @return [String] Error code attr_accessor :code diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/info_field.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/info_field.rb index fee30e5f98..ffa13e7c12 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/info_field.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/info_field.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class InfoField include MsRestAzure - include MsRest::JSONable # @return [String] Identifies the name of the instance provisioned by the # user. attr_accessor :project diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/meter_info.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/meter_info.rb index aff98e0db6..58b21b64bb 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/meter_info.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/meter_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MeterInfo include MsRestAzure - include MsRest::JSONable # @return The unique identifier of the resource. attr_accessor :meter_id diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_commitment.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_commitment.rb index 32dc44d9c4..9b58e8c325 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_commitment.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_commitment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MonetaryCommitment < OfferTermInfo include MsRestAzure - include MsRest::JSONable def initialize @Name = "Monetary Commitment" diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_credit.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_credit.rb index 3915f360d7..de4ea3cafc 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_credit.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/monetary_credit.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MonetaryCredit < OfferTermInfo include MsRestAzure - include MsRest::JSONable def initialize @Name = "Monetary Credit" diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/offer_term_info.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/offer_term_info.rb index 36a6838be0..a65f6bdfec 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/offer_term_info.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/offer_term_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OfferTermInfo include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Monetary Credit"] = "MonetaryCredit" @@discriminatorMap["Monetary Commitment"] = "MonetaryCommitment" diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/rate_card_query_parameters.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/rate_card_query_parameters.rb index 9e01d9aa51..517a9c40b1 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/rate_card_query_parameters.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/rate_card_query_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RateCardQueryParameters include MsRestAzure - include MsRest::JSONable # @return [String] The Offer ID parameter consists of the 'MS-AZR-' # prefix, plus the Offer ID number (e.g., MS-AZR-0026P). See # https://azure.microsoft.com/en-us/support/legal/offer-details/ for more diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/recurring_charge.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/recurring_charge.rb index b535c74c42..d2639f4286 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/recurring_charge.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/recurring_charge.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecurringCharge < OfferTermInfo include MsRestAzure - include MsRest::JSONable def initialize @Name = "Recurring Charge" diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/resource_rate_card_info.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/resource_rate_card_info.rb index 10bc219f14..04b6e63602 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/resource_rate_card_info.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/resource_rate_card_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceRateCardInfo include MsRestAzure - include MsRest::JSONable # @return [String] The currency in which the rates are provided. attr_accessor :currency diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation.rb index 5eebfcc8f1..9340029c7f 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UsageAggregation include MsRestAzure - include MsRest::JSONable # @return [String] Unique Id for the usage aggregate. attr_accessor :id diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation_list_result.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation_list_result.rb index 21f9ba4892..f2872203e1 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation_list_result.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/models/usage_aggregation_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/module_definition.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/module_definition.rb index b168fbbfe6..64de75a5dd 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/module_definition.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/rate_card.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/rate_card.rb index 369b18a9fa..be51e9ded7 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/rate_card.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/rate_card.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_aggregates.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_aggregates.rb index 7fbf762f93..d4039be775 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_aggregates.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_aggregates.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_management_client.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_management_client.rb index 3791b1498f..35ae0f8c37 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_management_client.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/usage_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/version.rb b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/version.rb index 311bf8131a..5b8326e3cb 100644 --- a/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/version.rb +++ b/management/azure_mgmt_commerce/lib/generated/azure_mgmt_commerce/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Commerce - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_compute/azure_mgmt_compute.gemspec b/management/azure_mgmt_compute/azure_mgmt_compute.gemspec index 566a6abd20..41a175bccc 100644 --- a/management/azure_mgmt_compute/azure_mgmt_compute.gemspec +++ b/management/azure_mgmt_compute/azure_mgmt_compute.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute.rb old mode 100755 new mode 100644 index fecbea5da1..51fc1093ed --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -31,6 +31,7 @@ module Azure::ARM::Compute autoload :VirtualMachines, 'generated/azure_mgmt_compute/virtual_machines.rb' autoload :VirtualMachineScaleSets, 'generated/azure_mgmt_compute/virtual_machine_scale_sets.rb' autoload :VirtualMachineScaleSetExtensions, 'generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb' + autoload :VirtualMachineScaleSetRollingUpgrades, 'generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb' autoload :VirtualMachineScaleSetVMs, 'generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb' autoload :Disks, 'generated/azure_mgmt_compute/disks.rb' autoload :Snapshots, 'generated/azure_mgmt_compute/snapshots.rb' @@ -39,123 +40,135 @@ module Azure::ARM::Compute autoload :ComputeManagementClient, 'generated/azure_mgmt_compute/compute_management_client.rb' module Models - autoload :VirtualMachineScaleSetDataDisk, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb' + autoload :VirtualMachineScaleSetPublicIPAddressConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb' autoload :InstanceViewStatus, 'generated/azure_mgmt_compute/models/instance_view_status.rb' - autoload :VirtualMachineScaleSetStorageProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb' + autoload :VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb' autoload :Sku, 'generated/azure_mgmt_compute/models/sku.rb' - autoload :ApiEntityReference, 'generated/azure_mgmt_compute/models/api_entity_reference.rb' + autoload :VirtualMachineScaleSetUpdateOSDisk, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb' autoload :AvailabilitySetListResult, 'generated/azure_mgmt_compute/models/availability_set_list_result.rb' - autoload :VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb' + autoload :VirtualMachineScaleSetDataDisk, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb' autoload :VirtualMachineSizeListResult, 'generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb' - autoload :VirtualMachineScaleSetPublicIPAddressConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb' - autoload :ResourceSkuRestrictions, 'generated/azure_mgmt_compute/models/resource_sku_restrictions.rb' - autoload :VirtualMachineExtensionInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb' - autoload :ResourceSku, 'generated/azure_mgmt_compute/models/resource_sku.rb' - autoload :PurchasePlan, 'generated/azure_mgmt_compute/models/purchase_plan.rb' - autoload :ResourceSkusResult, 'generated/azure_mgmt_compute/models/resource_skus_result.rb' - autoload :DataDiskImage, 'generated/azure_mgmt_compute/models/data_disk_image.rb' - autoload :VirtualMachineScaleSetOSProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb' - autoload :UsageName, 'generated/azure_mgmt_compute/models/usage_name.rb' + autoload :VirtualMachineScaleSetStorageProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb' autoload :VirtualMachineScaleSetManagedDiskParameters, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb' - autoload :ListUsagesResult, 'generated/azure_mgmt_compute/models/list_usages_result.rb' + autoload :VirtualMachineExtensionInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb' autoload :VirtualMachineScaleSetOSDisk, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb' - autoload :ContainerServiceDiagnosticsProfile, 'generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb' - autoload :HardwareProfile, 'generated/azure_mgmt_compute/models/hardware_profile.rb' - autoload :ContainerServiceVMDiagnostics, 'generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb' - autoload :KeyVaultSecretReference, 'generated/azure_mgmt_compute/models/key_vault_secret_reference.rb' - autoload :SnapshotList, 'generated/azure_mgmt_compute/models/snapshot_list.rb' - autoload :DiskEncryptionSettings, 'generated/azure_mgmt_compute/models/disk_encryption_settings.rb' + autoload :PurchasePlan, 'generated/azure_mgmt_compute/models/purchase_plan.rb' autoload :VirtualMachineSize, 'generated/azure_mgmt_compute/models/virtual_machine_size.rb' - autoload :ContainerServiceLinuxProfile, 'generated/azure_mgmt_compute/models/container_service_linux_profile.rb' + autoload :DataDiskImage, 'generated/azure_mgmt_compute/models/data_disk_image.rb' + autoload :RunCommandDocumentBase, 'generated/azure_mgmt_compute/models/run_command_document_base.rb' + autoload :GrantAccessData, 'generated/azure_mgmt_compute/models/grant_access_data.rb' + autoload :Usage, 'generated/azure_mgmt_compute/models/usage.rb' + autoload :AccessUri, 'generated/azure_mgmt_compute/models/access_uri.rb' + autoload :VirtualMachineCaptureParameters, 'generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb' + autoload :VirtualMachineScaleSetUpdateStorageProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb' + autoload :Plan, 'generated/azure_mgmt_compute/models/plan.rb' + autoload :ApiEntityReference, 'generated/azure_mgmt_compute/models/api_entity_reference.rb' + autoload :RunCommandInput, 'generated/azure_mgmt_compute/models/run_command_input.rb' + autoload :VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb' + autoload :KeyVaultKeyReference, 'generated/azure_mgmt_compute/models/key_vault_key_reference.rb' + autoload :SubResource, 'generated/azure_mgmt_compute/models/sub_resource.rb' + autoload :VirtualHardDisk, 'generated/azure_mgmt_compute/models/virtual_hard_disk.rb' autoload :RunCommandInputParameter, 'generated/azure_mgmt_compute/models/run_command_input_parameter.rb' + autoload :DiskList, 'generated/azure_mgmt_compute/models/disk_list.rb' autoload :DataDisk, 'generated/azure_mgmt_compute/models/data_disk.rb' - autoload :ContainerServiceAgentPoolProfile, 'generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb' autoload :AdditionalUnattendContent, 'generated/azure_mgmt_compute/models/additional_unattend_content.rb' - autoload :ContainerServiceMasterProfile, 'generated/azure_mgmt_compute/models/container_service_master_profile.rb' + autoload :ContainerServiceListResult, 'generated/azure_mgmt_compute/models/container_service_list_result.rb' autoload :WinRMConfiguration, 'generated/azure_mgmt_compute/models/win_rmconfiguration.rb' autoload :VirtualMachineScaleSetNetworkConfigurationDnsSettings, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb' autoload :SshPublicKey, 'generated/azure_mgmt_compute/models/ssh_public_key.rb' - autoload :ContainerServiceOrchestratorProfile, 'generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb' + autoload :ContainerServiceDiagnosticsProfile, 'generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb' autoload :LinuxConfiguration, 'generated/azure_mgmt_compute/models/linux_configuration.rb' - autoload :VirtualMachineScaleSetNetworkProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb' + autoload :ContainerServiceVMDiagnostics, 'generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb' autoload :VaultSecretGroup, 'generated/azure_mgmt_compute/models/vault_secret_group.rb' - autoload :ContainerServiceServicePrincipalProfile, 'generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb' - autoload :ContainerServiceSshConfiguration, 'generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb' - autoload :VirtualMachineScaleSetExtensionListResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb' + autoload :VirtualMachineScaleSetNetworkProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb' + autoload :SnapshotList, 'generated/azure_mgmt_compute/models/snapshot_list.rb' + autoload :VirtualMachineScaleSetUpdateNetworkProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb' autoload :BootDiagnostics, 'generated/azure_mgmt_compute/models/boot_diagnostics.rb' - autoload :VirtualMachineScaleSetExtensionProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb' + autoload :ContainerServiceLinuxProfile, 'generated/azure_mgmt_compute/models/container_service_linux_profile.rb' autoload :VirtualMachineExtensionHandlerInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb' - autoload :VirtualMachineScaleSetVMProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb' + autoload :VirtualMachineScaleSetExtensionListResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb' autoload :DiskInstanceView, 'generated/azure_mgmt_compute/models/disk_instance_view.rb' - autoload :ContainerServiceCustomProfile, 'generated/azure_mgmt_compute/models/container_service_custom_profile.rb' + autoload :VirtualMachineScaleSetExtensionProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb' autoload :VirtualMachineIdentity, 'generated/azure_mgmt_compute/models/virtual_machine_identity.rb' - autoload :VirtualMachineScaleSetVMInstanceIDs, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb' + autoload :VirtualMachineScaleSetVMProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb' autoload :VirtualMachineInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb' - autoload :VirtualMachineScaleSetVMInstanceRequiredIDs, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb' + autoload :VirtualMachineScaleSetUpdateVMProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb' autoload :VirtualMachineListResult, 'generated/azure_mgmt_compute/models/virtual_machine_list_result.rb' + autoload :ContainerServiceSshConfiguration, 'generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb' + autoload :UpgradePolicy, 'generated/azure_mgmt_compute/models/upgrade_policy.rb' + autoload :ContainerServiceSshPublicKey, 'generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb' + autoload :ImageDataDisk, 'generated/azure_mgmt_compute/models/image_data_disk.rb' + autoload :VirtualMachineScaleSetVMInstanceIDs, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb' + autoload :ContainerServiceServicePrincipalProfile, 'generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb' + autoload :VirtualMachineScaleSetVMInstanceRequiredIDs, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb' + autoload :VirtualMachineScaleSetIdentity, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb' autoload :VirtualMachineStatusCodeCount, 'generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb' - autoload :RecoveryPolicy, 'generated/azure_mgmt_compute/models/recovery_policy.rb' + autoload :ResourceSkuCosts, 'generated/azure_mgmt_compute/models/resource_sku_costs.rb' autoload :VirtualMachineScaleSetInstanceViewStatusesSummary, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb' - autoload :ImageDataDisk, 'generated/azure_mgmt_compute/models/image_data_disk.rb' + autoload :ResourceSkuRestrictions, 'generated/azure_mgmt_compute/models/resource_sku_restrictions.rb' autoload :VirtualMachineScaleSetVMExtensionsSummary, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb' - autoload :ContainerServiceWindowsProfile, 'generated/azure_mgmt_compute/models/container_service_windows_profile.rb' + autoload :ResourceSkusResult, 'generated/azure_mgmt_compute/models/resource_skus_result.rb' autoload :VirtualMachineScaleSetInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb' - autoload :VirtualMachineScaleSetIdentity, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb' + autoload :VirtualMachineScaleSetUpdateOSProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb' autoload :VirtualMachineScaleSetListResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb' - autoload :ResourceSkuCosts, 'generated/azure_mgmt_compute/models/resource_sku_costs.rb' + autoload :OSDiskImage, 'generated/azure_mgmt_compute/models/osdisk_image.rb' autoload :VirtualMachineScaleSetListWithLinkResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb' + autoload :ListUsagesResult, 'generated/azure_mgmt_compute/models/list_usages_result.rb' autoload :VirtualMachineScaleSetSkuCapacity, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb' - autoload :ContainerServiceListResult, 'generated/azure_mgmt_compute/models/container_service_list_result.rb' + autoload :HardwareProfile, 'generated/azure_mgmt_compute/models/hardware_profile.rb' autoload :VirtualMachineScaleSetSku, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb' - autoload :VirtualMachineCaptureParameters, 'generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb' + autoload :DiskEncryptionSettings, 'generated/azure_mgmt_compute/models/disk_encryption_settings.rb' autoload :VirtualMachineScaleSetListSkusResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb' - autoload :KeyVaultKeyReference, 'generated/azure_mgmt_compute/models/key_vault_key_reference.rb' - autoload :RunCommandListResult, 'generated/azure_mgmt_compute/models/run_command_list_result.rb' - autoload :OSDisk, 'generated/azure_mgmt_compute/models/osdisk.rb' + autoload :StorageProfile, 'generated/azure_mgmt_compute/models/storage_profile.rb' + autoload :ContainerServiceWindowsProfile, 'generated/azure_mgmt_compute/models/container_service_windows_profile.rb' + autoload :WindowsConfiguration, 'generated/azure_mgmt_compute/models/windows_configuration.rb' + autoload :VirtualMachineHealthStatus, 'generated/azure_mgmt_compute/models/virtual_machine_health_status.rb' + autoload :VaultCertificate, 'generated/azure_mgmt_compute/models/vault_certificate.rb' autoload :VirtualMachineScaleSetVMInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb' - autoload :WinRMListener, 'generated/azure_mgmt_compute/models/win_rmlistener.rb' + autoload :NetworkProfile, 'generated/azure_mgmt_compute/models/network_profile.rb' autoload :VirtualMachineScaleSetVMListResult, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb' - autoload :SshConfiguration, 'generated/azure_mgmt_compute/models/ssh_configuration.rb' + autoload :VirtualMachineAgentInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb' + autoload :RollingUpgradeRunningStatus, 'generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb' + autoload :MaintenanceRedeployStatus, 'generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb' + autoload :RollingUpgradeProgressInfo, 'generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb' + autoload :RollingUpgradePolicy, 'generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb' autoload :ApiErrorBase, 'generated/azure_mgmt_compute/models/api_error_base.rb' - autoload :OSProfile, 'generated/azure_mgmt_compute/models/osprofile.rb' + autoload :ImageStorageProfile, 'generated/azure_mgmt_compute/models/image_storage_profile.rb' autoload :InnerError, 'generated/azure_mgmt_compute/models/inner_error.rb' - autoload :DiagnosticsProfile, 'generated/azure_mgmt_compute/models/diagnostics_profile.rb' + autoload :ResourceSkuCapacity, 'generated/azure_mgmt_compute/models/resource_sku_capacity.rb' autoload :ApiError, 'generated/azure_mgmt_compute/models/api_error.rb' - autoload :BootDiagnosticsInstanceView, 'generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb' + autoload :ResourceSku, 'generated/azure_mgmt_compute/models/resource_sku.rb' + autoload :ContainerServiceAgentPoolProfile, 'generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb' + autoload :RunCommandListResult, 'generated/azure_mgmt_compute/models/run_command_list_result.rb' autoload :ComputeLongRunningOperationProperties, 'generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb' - autoload :ContainerServiceSshPublicKey, 'generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb' - autoload :ImageOSDisk, 'generated/azure_mgmt_compute/models/image_osdisk.rb' + autoload :RunCommandParameterDefinition, 'generated/azure_mgmt_compute/models/run_command_parameter_definition.rb' + autoload :Resource, 'generated/azure_mgmt_compute/models/resource.rb' + autoload :OSDisk, 'generated/azure_mgmt_compute/models/osdisk.rb' + autoload :UpdateResource, 'generated/azure_mgmt_compute/models/update_resource.rb' + autoload :SshConfiguration, 'generated/azure_mgmt_compute/models/ssh_configuration.rb' autoload :SubResourceReadOnly, 'generated/azure_mgmt_compute/models/sub_resource_read_only.rb' - autoload :ImageListResult, 'generated/azure_mgmt_compute/models/image_list_result.rb' + autoload :DiagnosticsProfile, 'generated/azure_mgmt_compute/models/diagnostics_profile.rb' autoload :OperationStatusResponse, 'generated/azure_mgmt_compute/models/operation_status_response.rb' - autoload :ResourceSkuCapabilities, 'generated/azure_mgmt_compute/models/resource_sku_capabilities.rb' + autoload :ContainerServiceCustomProfile, 'generated/azure_mgmt_compute/models/container_service_custom_profile.rb' autoload :DiskSku, 'generated/azure_mgmt_compute/models/disk_sku.rb' - autoload :Usage, 'generated/azure_mgmt_compute/models/usage.rb' + autoload :ImageListResult, 'generated/azure_mgmt_compute/models/image_list_result.rb' autoload :ResourceUpdate, 'generated/azure_mgmt_compute/models/resource_update.rb' - autoload :VirtualHardDisk, 'generated/azure_mgmt_compute/models/virtual_hard_disk.rb' + autoload :VirtualMachineScaleSetOSProfile, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb' autoload :ImageDiskReference, 'generated/azure_mgmt_compute/models/image_disk_reference.rb' - autoload :WindowsConfiguration, 'generated/azure_mgmt_compute/models/windows_configuration.rb' + autoload :KeyVaultSecretReference, 'generated/azure_mgmt_compute/models/key_vault_secret_reference.rb' autoload :CreationData, 'generated/azure_mgmt_compute/models/creation_data.rb' - autoload :NetworkProfile, 'generated/azure_mgmt_compute/models/network_profile.rb' + autoload :OSProfile, 'generated/azure_mgmt_compute/models/osprofile.rb' autoload :SourceVault, 'generated/azure_mgmt_compute/models/source_vault.rb' - autoload :MaintenanceRedeployStatus, 'generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb' + autoload :ImageOSDisk, 'generated/azure_mgmt_compute/models/image_osdisk.rb' autoload :KeyVaultAndSecretReference, 'generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb' - autoload :ImageStorageProfile, 'generated/azure_mgmt_compute/models/image_storage_profile.rb' + autoload :UsageName, 'generated/azure_mgmt_compute/models/usage_name.rb' autoload :KeyVaultAndKeyReference, 'generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb' - autoload :OSDiskImage, 'generated/azure_mgmt_compute/models/osdisk_image.rb' + autoload :BootDiagnosticsInstanceView, 'generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb' autoload :EncryptionSettings, 'generated/azure_mgmt_compute/models/encryption_settings.rb' - autoload :StorageProfile, 'generated/azure_mgmt_compute/models/storage_profile.rb' - autoload :RunCommandDocumentBase, 'generated/azure_mgmt_compute/models/run_command_document_base.rb' - autoload :VirtualMachineAgentInstanceView, 'generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb' - autoload :RunCommandParameterDefinition, 'generated/azure_mgmt_compute/models/run_command_parameter_definition.rb' - autoload :ResourceSkuCapacity, 'generated/azure_mgmt_compute/models/resource_sku_capacity.rb' - autoload :DiskList, 'generated/azure_mgmt_compute/models/disk_list.rb' - autoload :VaultCertificate, 'generated/azure_mgmt_compute/models/vault_certificate.rb' - autoload :GrantAccessData, 'generated/azure_mgmt_compute/models/grant_access_data.rb' - autoload :Plan, 'generated/azure_mgmt_compute/models/plan.rb' - autoload :AccessUri, 'generated/azure_mgmt_compute/models/access_uri.rb' - autoload :UpgradePolicy, 'generated/azure_mgmt_compute/models/upgrade_policy.rb' - autoload :RunCommandInput, 'generated/azure_mgmt_compute/models/run_command_input.rb' + autoload :WinRMListener, 'generated/azure_mgmt_compute/models/win_rmlistener.rb' + autoload :ContainerServiceMasterProfile, 'generated/azure_mgmt_compute/models/container_service_master_profile.rb' + autoload :ResourceSkuCapabilities, 'generated/azure_mgmt_compute/models/resource_sku_capabilities.rb' + autoload :ContainerServiceOrchestratorProfile, 'generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb' autoload :AvailabilitySet, 'generated/azure_mgmt_compute/models/availability_set.rb' autoload :VirtualMachineExtensionImage, 'generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb' autoload :VirtualMachineImageResource, 'generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb' @@ -168,10 +181,14 @@ module Models autoload :VirtualMachine, 'generated/azure_mgmt_compute/models/virtual_machine.rb' autoload :Image, 'generated/azure_mgmt_compute/models/image.rb' autoload :VirtualMachineScaleSetIPConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb' + autoload :VirtualMachineScaleSetUpdateIPConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb' autoload :VirtualMachineScaleSetNetworkConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb' + autoload :VirtualMachineScaleSetUpdateNetworkConfiguration, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb' autoload :VirtualMachineScaleSetExtension, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb' autoload :VirtualMachineScaleSet, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb' + autoload :VirtualMachineScaleSetUpdate, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb' autoload :VirtualMachineScaleSetVM, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb' + autoload :RollingUpgradeStatusInfo, 'generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb' autoload :Disk, 'generated/azure_mgmt_compute/models/disk.rb' autoload :DiskUpdate, 'generated/azure_mgmt_compute/models/disk_update.rb' autoload :Snapshot, 'generated/azure_mgmt_compute/models/snapshot.rb' @@ -192,13 +209,14 @@ module Models autoload :ResourceIdentityType, 'generated/azure_mgmt_compute/models/resource_identity_type.rb' autoload :MaintenanceOperationResultCodeTypes, 'generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb' autoload :UpgradeMode, 'generated/azure_mgmt_compute/models/upgrade_mode.rb' - autoload :RecoveryMode, 'generated/azure_mgmt_compute/models/recovery_mode.rb' autoload :OperatingSystemStateTypes, 'generated/azure_mgmt_compute/models/operating_system_state_types.rb' autoload :ResourceSkuCapacityScaleType, 'generated/azure_mgmt_compute/models/resource_sku_capacity_scale_type.rb' autoload :ResourceSkuRestrictionsType, 'generated/azure_mgmt_compute/models/resource_sku_restrictions_type.rb' autoload :ResourceSkuRestrictionsReasonCode, 'generated/azure_mgmt_compute/models/resource_sku_restrictions_reason_code.rb' autoload :IPVersion, 'generated/azure_mgmt_compute/models/ipversion.rb' autoload :VirtualMachineScaleSetSkuScaleType, 'generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb' + autoload :RollingUpgradeStatusCode, 'generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb' + autoload :RollingUpgradeActionType, 'generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb' autoload :DiskCreateOption, 'generated/azure_mgmt_compute/models/disk_create_option.rb' autoload :AccessLevel, 'generated/azure_mgmt_compute/models/access_level.rb' autoload :ContainerServiceOrchestratorTypes, 'generated/azure_mgmt_compute/models/container_service_orchestrator_types.rb' diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/availability_sets.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/availability_sets.rb old mode 100755 new mode 100644 index 6374234d0d..3eb591a0e4 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/availability_sets.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/availability_sets.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/compute_management_client.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/compute_management_client.rb old mode 100755 new mode 100644 index e138e2dfb4..a79b683619 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/compute_management_client.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/compute_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -67,6 +67,10 @@ class ComputeManagementClient < MsRestAzure::AzureServiceClient # virtual_machine_scale_set_extensions attr_reader :virtual_machine_scale_set_extensions + # @return [VirtualMachineScaleSetRollingUpgrades] + # virtual_machine_scale_set_rolling_upgrades + attr_reader :virtual_machine_scale_set_rolling_upgrades + # @return [VirtualMachineScaleSetVMs] virtual_machine_scale_set_vms attr_reader :virtual_machine_scale_set_vms @@ -106,6 +110,7 @@ def initialize(credentials = nil, base_url = nil, options = nil) @virtual_machines = VirtualMachines.new(self) @virtual_machine_scale_sets = VirtualMachineScaleSets.new(self) @virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensions.new(self) + @virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgrades.new(self) @virtual_machine_scale_set_vms = VirtualMachineScaleSetVMs.new(self) @disks = Disks.new(self) @snapshots = Snapshots.new(self) diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/container_services.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/container_services.rb old mode 100755 new mode 100644 index f074c5489c..7fa1703372 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/container_services.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/container_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/disks.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/disks.rb old mode 100755 new mode 100644 index 31c98ba052..01a2a6293d --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/disks.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/disks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/images.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/images.rb old mode 100755 new mode 100644 index f787490a7d..7927a99e06 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/images.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/images.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_level.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_level.rb old mode 100755 new mode 100644 index d368883085..974125fd17 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_level.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_level.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_uri.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_uri.rb old mode 100755 new mode 100644 index 0cae5554ea..fdc706bcc9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_uri.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/access_uri.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AccessUri include MsRestAzure - include MsRest::JSONable # @return [String] A SAS uri for accessing a disk. attr_accessor :access_sas diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb old mode 100755 new mode 100644 index e152f34929..5ac43a2530 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb @@ -1,23 +1,22 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Additional XML formatted information that can be included in the - # Unattend.xml file, which is used by Windows Setup. Contents are defined - # by setting name, component name, and the pass in which the content is a - # applied. + # Specifies additional XML formatted information that can be included in + # the Unattend.xml file, which is used by Windows Setup. Contents are + # defined by setting name, component name, and the pass in which the + # content is applied. # class AdditionalUnattendContent include MsRestAzure - include MsRest::JSONable # @return [PassNames] The pass name. Currently, the only allowable value - # is oobeSystem. Possible values include: 'oobeSystem' + # is oobeSystem. Possible values include: 'OobeSystem' attr_accessor :pass_name # @return [ComponentNames] The component name. Currently, the only @@ -25,14 +24,15 @@ class AdditionalUnattendContent # include: 'Microsoft-Windows-Shell-Setup' attr_accessor :component_name - # @return [SettingNames] Setting name (e.g. FirstLogonCommands, AutoLogon - # ). Possible values include: 'AutoLogon', 'FirstLogonCommands' + # @return [SettingNames] Specifies the name of the setting to which the + # content applies. Possible values are: FirstLogonCommands and AutoLogon. + # Possible values include: 'AutoLogon', 'FirstLogonCommands' attr_accessor :setting_name - # @return [String] XML formatted content that is added to the - # unattend.xml file in the specified pass and component. The XML must be - # less than 4 KB and must include the root element for the setting or - # feature that is being inserted. + # @return [String] Specifies the XML formatted content that is added to + # the unattend.xml file for the specified path and component. The XML + # must be less than 4KB and must include the root element for the setting + # or feature that is being inserted. attr_accessor :content diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb old mode 100755 new mode 100644 index 8fbd745ccf..377c0c8125 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApiEntityReference include MsRestAzure - include MsRest::JSONable # @return [String] The ARM resource id in the form of # /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... attr_accessor :id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error.rb old mode 100755 new mode 100644 index 4b4ae92beb..e1d3bad012 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApiError include MsRestAzure - include MsRest::JSONable # @return [Array] The Api error details attr_accessor :details diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error_base.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error_base.rb old mode 100755 new mode 100644 index e09ed1e5f9..b60c00458f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error_base.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/api_error_base.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApiErrorBase include MsRestAzure - include MsRest::JSONable # @return [String] The error code. attr_accessor :code diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set.rb old mode 100755 new mode 100644 index 47f41327c2..69c50a3950 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set.rb @@ -1,18 +1,27 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Create or update availability set parameters. + # Specifies information about the availability set that the virtual machine + # should be assigned to. Virtual machines specified in the same + # availability set are allocated to different nodes to maximize + # availability. For more information about availability sets, see [Manage + # the availability of virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + #

For more information on Azure planned maintainance, see [Planned + # maintenance for virtual machines in + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

Currently, a VM can only be added to availability set at + # creation time. An existing VM cannot be added to an availability set. # - class AvailabilitySet < MsRestAzure::Resource + class AvailabilitySet < Resource include MsRestAzure - include MsRest::JSONable # @return [Integer] Update Domain count. attr_accessor :platform_update_domain_count diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set_list_result.rb old mode 100755 new mode 100644 index 7c70d0878e..c5aea27299 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/availability_set_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AvailabilitySetListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of availability sets attr_accessor :value diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics.rb old mode 100755 new mode 100644 index 35f3b62859..9346049cc7 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics.rb @@ -1,23 +1,26 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes Boot Diagnostics. + # Boot Diagnostics is a debugging feature which allows you to view Console + # Output and Screenshot to diagnose VM status.

For Linux Virtual + # Machines, you can easily view the output of your console log.

+ # For both Windows and Linux virtual machines, Azure also enables you to + # see a screenshot of the VM from the hypervisor. # class BootDiagnostics include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether boot diagnostics should be enabled on the # Virtual Machine. attr_accessor :enabled - # @return [String] URI of the storage account to use for placing the + # @return [String] Uri of the storage account to use for placing the # console output and screenshot. attr_accessor :storage_uri diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb old mode 100755 new mode 100644 index 2728f326e5..2a4b74528f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BootDiagnosticsInstanceView include MsRestAzure - include MsRest::JSONable # @return [String] The console screenshot blob URI. attr_accessor :console_screenshot_blob_uri diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/caching_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/caching_types.rb old mode 100755 new mode 100644 index c068f89988..4c7a582b68 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/caching_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/caching_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/component_names.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/component_names.rb old mode 100755 new mode 100644 index 505ff13bad..039458fba7 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/component_names.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/component_names.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb old mode 100755 new mode 100644 index 78619ddf8f..85b50ced68 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputeLongRunningOperationProperties include MsRestAzure - include MsRest::JSONable # @return Operation output data (raw JSON) attr_accessor :output diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service.rb old mode 100755 new mode 100644 index 6a98bda6a5..c0525004fa --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Container service. # - class ContainerService < MsRestAzure::Resource + class ContainerService < Resource include MsRestAzure - include MsRest::JSONable # @return [String] the current deployment or provisioning state, which # only appears in the response. attr_accessor :provisioning_state diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb old mode 100755 new mode 100644 index eaf7ecd4c1..65ecc505ed --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceAgentPoolProfile include MsRestAzure - include MsRest::JSONable # @return [String] Unique name of the agent pool profile in the context # of the subscription and resource group. attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_custom_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_custom_profile.rb old mode 100755 new mode 100644 index 3ea6bb5e0b..8a335c8a03 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_custom_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_custom_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceCustomProfile include MsRestAzure - include MsRest::JSONable # @return [String] The name of the custom orchestrator to use. attr_accessor :orchestrator diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb old mode 100755 new mode 100644 index bf1fdeee90..b3049ffb38 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ContainerServiceDiagnosticsProfile include MsRestAzure - include MsRest::JSONable # @return [ContainerServiceVMDiagnostics] Profile for the container # service VM diagnostic agent. attr_accessor :vm_diagnostics diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb old mode 100755 new mode 100644 index 383e144df2..3102b850e1 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceLinuxProfile include MsRestAzure - include MsRest::JSONable # @return [String] The administrator username to use for Linux VMs. attr_accessor :admin_username diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb old mode 100755 new mode 100644 index be3172154e..71008ee57a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb old mode 100755 new mode 100644 index 6e85e20335..8f4e0f1b45 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceMasterProfile include MsRestAzure - include MsRest::JSONable # @return [Integer] Number of masters (VMs) in the container service # cluster. Allowed values are 1, 3, and 5. The default value is 1. # Default value: 1 . diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb old mode 100755 new mode 100644 index e56925f02d..a115afee81 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceOrchestratorProfile include MsRestAzure - include MsRest::JSONable # @return [ContainerServiceOrchestratorTypes] The orchestrator to use to # manage container service cluster resources. Valid values are Swarm, # DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_types.rb old mode 100755 new mode 100644 index 04ac682fda..c13231dffe --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb old mode 100755 new mode 100644 index acd5e771e9..4f1461030b --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ContainerServiceServicePrincipalProfile include MsRestAzure - include MsRest::JSONable # @return [String] The ID for the service principal. attr_accessor :client_id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb old mode 100755 new mode 100644 index fad776faf1..7f4a549b59 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceSshConfiguration include MsRestAzure - include MsRest::JSONable # @return [Array] the list of SSH public # keys used to authenticate with Linux-based VMs. attr_accessor :public_keys diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb old mode 100755 new mode 100644 index 4855d4cc79..e46e4460e9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceSshPublicKey include MsRestAzure - include MsRest::JSONable # @return [String] Certificate public key used to authenticate with VMs # through SSH. The certificate must be in PEM format with or without # headers. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb old mode 100755 new mode 100644 index 4ab61db1cc..63cc4cddda --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceVMDiagnostics include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether the VM diagnostic agent is provisioned on the # VM. attr_accessor :enabled diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmsize_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmsize_types.rb old mode 100755 new mode 100644 index c50e401923..264f0bd56a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmsize_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_vmsize_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb old mode 100755 new mode 100644 index 594c8ec4c5..b154a19b3e --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContainerServiceWindowsProfile include MsRestAzure - include MsRest::JSONable # @return [String] The administrator username to use for Windows VMs. attr_accessor :admin_username diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/creation_data.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/creation_data.rb old mode 100755 new mode 100644 index cf35a65dab..0f128d6581 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/creation_data.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/creation_data.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CreationData include MsRestAzure - include MsRest::JSONable # @return [DiskCreateOption] This enumerates the possible sources of a # disk's creation. Possible values include: 'Empty', 'Attach', # 'FromImage', 'Import', 'Copy' diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk.rb old mode 100755 new mode 100644 index b4f8d5a87f..f6ad2246e4 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,8 +12,9 @@ class DataDisk include MsRestAzure - include MsRest::JSONable - # @return [Integer] The logical unit number. + # @return [Integer] Specifies the logical unit number of the data disk. + # This value is used to identify data disks within the VM and therefore + # must be unique for each data disk attached to a VM. attr_accessor :lun # @return [String] The disk name. @@ -22,22 +23,34 @@ class DataDisk # @return [VirtualHardDisk] The virtual hard disk. attr_accessor :vhd - # @return [VirtualHardDisk] The source user image virtual hard disk. This - # virtual hard disk will be copied before using it to attach to the - # virtual machine. If SourceImage is provided, the destination virtual - # hard disk must not exist. + # @return [VirtualHardDisk] The source user image virtual hard disk. The + # virtual hard disk will be copied before being attached to the virtual + # machine. If SourceImage is provided, the destination virtual hard drive + # must not exist. attr_accessor :image - # @return [CachingTypes] The caching type. Possible values include: - # 'None', 'ReadOnly', 'ReadWrite' + # @return [CachingTypes] Specifies the caching requirements.

+ # Possible values are:

**None**

**ReadOnly**

+ # **ReadWrite**

Default: **None for Standard storage. ReadOnly + # for Premium storage**. Possible values include: 'None', 'ReadOnly', + # 'ReadWrite' attr_accessor :caching - # @return [DiskCreateOptionTypes] The create option. Possible values - # include: 'fromImage', 'empty', 'attach' + # @return [DiskCreateOptionTypes] Specifies how the virtual machine + # should be created.

Possible values are:

**Attach** + # \u2013 This value is used when you are using a specialized disk to + # create the virtual machine.

**FromImage** \u2013 This value is + # used when you are using an image to create the virtual machine. If you + # are using a platform image, you also use the imageReference element + # described above. If you are using a marketplace image, you also use + # the plan element previously described. Possible values include: + # 'FromImage', 'Empty', 'Attach' attr_accessor :create_option - # @return [Integer] The initial disk size in GB for blank data disks, and - # the new desired size for resizing existing OS and data disks. + # @return [Integer] Specifies the size of an empty data disk in + # gigabytes. This element can be used to overwrite the name of the disk + # in a virtual machine image.

This value cannot be larger than + # 1023 GB attr_accessor :disk_size_gb # @return [ManagedDiskParameters] The managed disk parameters. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk_image.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk_image.rb old mode 100755 new mode 100644 index 185b468fd2..68fa96448c --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk_image.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/data_disk_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,10 +12,9 @@ class DataDiskImage include MsRestAzure - include MsRest::JSONable - # @return [Integer] The LUN number for a data disk. This value is used to - # identify data disk image inside the VMImage and therefore it must be - # unique for each data disk. + # @return [Integer] Specifies the logical unit number of the data disk. + # This value is used to identify data disks within the VM and therefore + # must be unique for each data disk attached to a VM. attr_accessor :lun diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/diagnostics_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/diagnostics_profile.rb old mode 100755 new mode 100644 index 2341caf085..7e20e62647 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/diagnostics_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/diagnostics_profile.rb @@ -1,21 +1,24 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes a diagnostics profile. + # Specifies the boot diagnostic settings state.

Minimum + # api-version: 2015-06-15. # class DiagnosticsProfile include MsRestAzure - include MsRest::JSONable # @return [BootDiagnostics] Boot Diagnostics is a debugging feature which - # allows the user to view console output and/or a screenshot of the - # virtual machine from the hypervisor. + # allows you to view Console Output and Screenshot to diagnose VM status. + #

For Linux Virtual Machines, you can easily view the output of + # your console log.

For both Windows and Linux virtual machines, + # Azure also enables you to see a screenshot of the VM from the + # hypervisor. attr_accessor :boot_diagnostics diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk.rb old mode 100755 new mode 100644 index 92c3f965fc..c96fcf9676 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Disk resource. # - class Disk < MsRestAzure::Resource + class Disk < Resource include MsRestAzure - include MsRest::JSONable # @return [String] A relative URI containing the ID of the VM that has # the disk attached. attr_accessor :managed_by @@ -20,6 +19,9 @@ class Disk < MsRestAzure::Resource # @return [DiskSku] attr_accessor :sku + # @return [Array] The Logical zone list for Disk. + attr_accessor :zones + # @return [DateTime] The time when the disk was created. attr_accessor :time_created @@ -118,6 +120,20 @@ def self.mapper() class_name: 'DiskSku' } }, + zones: { + required: false, + serialized_name: 'zones', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, time_created: { required: false, read_only: true, diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option.rb old mode 100755 new mode 100644 index 0568172569..fe3ed119ba --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option_types.rb old mode 100755 new mode 100644 index 3fbb30c94e..6b145b2ad5 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_create_option_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,9 +9,9 @@ module Models # Defines values for DiskCreateOptionTypes # module DiskCreateOptionTypes - FromImage = "fromImage" - Empty = "empty" - Attach = "attach" + FromImage = "FromImage" + Empty = "Empty" + Attach = "Attach" end end end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_encryption_settings.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_encryption_settings.rb old mode 100755 new mode 100644 index ffb5952bc6..dbf0c9d1f1 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_encryption_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,13 +12,12 @@ class DiskEncryptionSettings include MsRestAzure - include MsRest::JSONable - # @return [KeyVaultSecretReference] The disk encryption key which is a - # Key Vault Secret. + # @return [KeyVaultSecretReference] Specifies the location of the disk + # encryption key, which is a Key Vault Secret. attr_accessor :disk_encryption_key - # @return [KeyVaultKeyReference] The key encryption key which is Key - # Vault Key. + # @return [KeyVaultKeyReference] Specifies the location of the key + # encryption key in Key Vault. attr_accessor :key_encryption_key # @return [Boolean] Specifies whether disk encryption should be enabled diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_instance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_instance_view.rb old mode 100755 new mode 100644 index 2da1bb20d7..607de6048f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_instance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_instance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,12 +12,11 @@ class DiskInstanceView include MsRestAzure - include MsRest::JSONable # @return [String] The disk name. attr_accessor :name - # @return [Array] The encryption settings of the - # disk. + # @return [Array] Specifies the encryption + # settings for the OS Disk.

Minimum api-version: 2015-06-15 attr_accessor :encryption_settings # @return [Array] The resource status information. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_list.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_list.rb old mode 100755 new mode 100644 index 074b208b17..f291db72e2 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_list.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_sku.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_sku.rb old mode 100755 new mode 100644 index deda76c3bd..4cd10c4ee5 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_sku.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DiskSku include MsRestAzure - include MsRest::JSONable # @return [StorageAccountTypes] The sku name. Possible values include: # 'Standard_LRS', 'Premium_LRS' attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_update.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_update.rb old mode 100755 new mode 100644 index 3a8b3bdacf..31da7c9a08 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_update.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/disk_update.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Disk update resource. # - class DiskUpdate < MsRestAzure::ResourceUpdate + class DiskUpdate < ResourceUpdate include MsRestAzure - include MsRest::JSONable # @return [OperatingSystemTypes] the Operating System type. Possible # values include: 'Windows', 'Linux' attr_accessor :os_type diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/encryption_settings.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/encryption_settings.rb old mode 100755 new mode 100644 index e41426e960..6961158fed --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/encryption_settings.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/encryption_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EncryptionSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] Set this flag to true and provide DiskEncryptionKey # and optional KeyEncryptionKey to enable encryption. Set this flag to # false and remove DiskEncryptionKey and KeyEncryptionKey to disable diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/grant_access_data.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/grant_access_data.rb old mode 100755 new mode 100644 index fc7dc63792..3ad39209ac --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/grant_access_data.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/grant_access_data.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GrantAccessData include MsRestAzure - include MsRest::JSONable # @return [AccessLevel] Possible values include: 'None', 'Read' attr_accessor :access diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/hardware_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/hardware_profile.rb old mode 100755 new mode 100644 index 0746b5d715..070814f2fc --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/hardware_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/hardware_profile.rb @@ -1,33 +1,42 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes a hardware profile. + # Specifies the hardware settings for the virtual machine. # class HardwareProfile include MsRestAzure - include MsRest::JSONable - # @return [VirtualMachineSizeTypes] The virtual machine size name. - # Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', - # 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', - # 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', - # 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', - # 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', - # 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', - # 'Standard_A8m_v2', 'Standard_D1', 'Standard_D2', 'Standard_D3', - # 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', - # 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', - # 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', - # 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', - # 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - # 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', - # 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + # @return [VirtualMachineSizeTypes] Specifies the size of the virtual + # machine. For more information about virtual machine sizes, see [Sizes + # for virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + #

The available VM sizes depend on region and availability set. + # For a list of available sizes use these APIs:

[List all + # available virtual machine sizes in an availability + # set](virtualmachines-list-sizes-availability-set.md)

[List all + # available virtual machine sizes in a + # region](virtualmachines-list-sizes-region.md)

[List all + # available virtual machine sizes for + # resizing](virtualmachines-list-sizes-for-resizing.md). Possible values + # include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', + # 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + # 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', + # 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', + # 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', + # 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_D1', + # 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + # 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + # 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + # 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + # 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + # 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + # 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', # 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', # 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', # 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_F1', 'Standard_F2', diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image.rb old mode 100755 new mode 100644 index c87e023bb6..03b9d09605 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image.rb @@ -1,23 +1,25 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes an Image. + # The source user image virtual hard disk. The virtual hard disk will be + # copied before being attached to the virtual machine. If SourceImage is + # provided, the destination virtual hard drive must not exist. # - class Image < MsRestAzure::Resource + class Image < Resource include MsRestAzure - include MsRest::JSONable # @return [SubResource] The source virtual machine from which Image is # created. attr_accessor :source_virtual_machine - # @return [ImageStorageProfile] The storage profile. + # @return [ImageStorageProfile] Specifies the storage settings for the + # virtual machine disks. attr_accessor :storage_profile # @return [String] The provisioning state. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_data_disk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_data_disk.rb old mode 100755 new mode 100644 index a4118877df..12888b0346 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_data_disk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_data_disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,8 +12,9 @@ class ImageDataDisk include MsRestAzure - include MsRest::JSONable - # @return [Integer] The logical unit number. + # @return [Integer] Specifies the logical unit number of the data disk. + # This value is used to identify data disks within the VM and therefore + # must be unique for each data disk attached to a VM. attr_accessor :lun # @return [SubResource] The snapshot. @@ -25,16 +26,21 @@ class ImageDataDisk # @return [String] The Virtual Hard Disk. attr_accessor :blob_uri - # @return [CachingTypes] The caching type. Possible values include: - # 'None', 'ReadOnly', 'ReadWrite' + # @return [CachingTypes] Specifies the caching requirements.

+ # Possible values are:

**None**

**ReadOnly**

+ # **ReadWrite**

Default: **None for Standard storage. ReadOnly + # for Premium storage**. Possible values include: 'None', 'ReadOnly', + # 'ReadWrite' attr_accessor :caching - # @return [Integer] The initial disk size in GB for blank data disks, and - # the new desired size for existing OS and Data disks. + # @return [Integer] Specifies the size of empty data disks in gigabytes. + # This element can be used to overwrite the name of the disk in a virtual + # machine image.

This value cannot be larger than 1023 GB attr_accessor :disk_size_gb - # @return [StorageAccountTypes] The Storage Account type. Possible values - # include: 'Standard_LRS', 'Premium_LRS' + # @return [StorageAccountTypes] Specifies the storage account type for + # the managed disk. Possible values are: Standard_LRS or Premium_LRS. + # Possible values include: 'Standard_LRS', 'Premium_LRS' attr_accessor :storage_account_type diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_disk_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_disk_reference.rb old mode 100755 new mode 100644 index a9b440b2c6..9862b4cc71 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_disk_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_disk_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ImageDiskReference include MsRestAzure - include MsRest::JSONable # @return [String] A relative uri containing either a Platform Imgage # Repository or user image reference. attr_accessor :id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_list_result.rb old mode 100755 new mode 100644 index b028fcb69c..e0194807b3 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_osdisk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_osdisk.rb old mode 100755 new mode 100644 index bad1ffc629..918e15355f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_osdisk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_osdisk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,9 +12,10 @@ class ImageOSDisk include MsRestAzure - include MsRest::JSONable - # @return [OperatingSystemTypes] The Operating System type. Possible - # values include: 'Windows', 'Linux' + # @return [OperatingSystemTypes] This property allows you to specify the + # type of the OS that is included in the disk if creating a VM from a + # custom image.

Possible values are:

**Windows** + #

**Linux**. Possible values include: 'Windows', 'Linux' attr_accessor :os_type # @return [OperatingSystemStateTypes] The OS State. Possible values @@ -30,16 +31,21 @@ class ImageOSDisk # @return [String] The Virtual Hard Disk. attr_accessor :blob_uri - # @return [CachingTypes] The caching type. Possible values include: - # 'None', 'ReadOnly', 'ReadWrite' + # @return [CachingTypes] Specifies the caching requirements.

+ # Possible values are:

**None**

**ReadOnly**

+ # **ReadWrite**

Default: **None for Standard storage. ReadOnly + # for Premium storage**. Possible values include: 'None', 'ReadOnly', + # 'ReadWrite' attr_accessor :caching - # @return [Integer] The initial managed disk size in GB for blank data - # disks, and the new desired size for existing OS and Data disks. + # @return [Integer] Specifies the size of empty data disks in gigabytes. + # This element can be used to overwrite the name of the disk in a virtual + # machine image.

This value cannot be larger than 1023 GB attr_accessor :disk_size_gb - # @return [StorageAccountTypes] The Storage Account type. Possible values - # include: 'Standard_LRS', 'Premium_LRS' + # @return [StorageAccountTypes] Specifies the storage account type for + # the managed disk. Possible values are: Standard_LRS or Premium_LRS. + # Possible values include: 'Standard_LRS', 'Premium_LRS' attr_accessor :storage_account_type diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_reference.rb old mode 100755 new mode 100644 index 8f5cf1dfac..e926345fa8 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_reference.rb @@ -1,30 +1,38 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # The image reference. + # Specifies information about the image to use. You can specify information + # about platform images, marketplace images, or virtual machine images. + # This element is required when you want to use a platform image, + # marketplace image, or virtual machine image, but is not used in other + # creation operations. # - class ImageReference < MsRestAzure::SubResource + class ImageReference < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The image publisher. attr_accessor :publisher - # @return [String] The image offer. + # @return [String] Specifies the offer of the platform image or + # marketplace image used to create the virtual machine. attr_accessor :offer # @return [String] The image SKU. attr_accessor :sku - # @return [String] The image version. The allowed formats are - # Major.Minor.Build or 'latest'. Major, Minor and Build are decimal - # numbers. Specify 'latest' to use the latest version of the image. + # @return [String] Specifies the version of the platform image or + # marketplace image used to create the virtual machine. The allowed + # formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are + # decimal numbers. Specify 'latest' to use the latest version of an image + # available at deploy time. Even if you use 'latest', the VM image will + # not automatically update after deploy time even if a new version + # becomes available. attr_accessor :version diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_storage_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_storage_profile.rb old mode 100755 new mode 100644 index 0a87c18f78..a556ffd897 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_storage_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/image_storage_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,16 @@ class ImageStorageProfile include MsRestAzure - include MsRest::JSONable - # @return [ImageOSDisk] The OS disk. + # @return [ImageOSDisk] Specifies information about the operating system + # disk used by the virtual machine.

For more information about + # disks, see [About disks and VHDs for Azure virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). attr_accessor :os_disk - # @return [Array] The data disks. + # @return [Array] Specifies the parameters that are used + # to add a data disk to a virtual machine.

For more information + # about disks, see [About disks and VHDs for Azure virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). attr_accessor :data_disks diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/inner_error.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/inner_error.rb old mode 100755 new mode 100644 index 882526a557..bacc4b7956 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/inner_error.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/inner_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class InnerError include MsRestAzure - include MsRest::JSONable # @return [String] The exception type. attr_accessor :exceptiontype diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_status.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_status.rb old mode 100755 new mode 100644 index fffc6a06e7..cd71d772a9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_status.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class InstanceViewStatus include MsRestAzure - include MsRest::JSONable # @return [String] The status code. attr_accessor :code diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_types.rb old mode 100755 new mode 100644 index 5cda646377..5d72f67680 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/instance_view_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ipversion.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ipversion.rb old mode 100755 new mode 100644 index 41c1b574ee..28ab54ca5c --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ipversion.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ipversion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb old mode 100755 new mode 100644 index da32c72fe6..26da739250 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class KeyVaultAndKeyReference include MsRestAzure - include MsRest::JSONable # @return [SourceVault] Resource id of the KeyVault containing the key or # secret attr_accessor :source_vault diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb old mode 100755 new mode 100644 index 9fe81b22d7..4dc2fea87f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyVaultAndSecretReference include MsRestAzure - include MsRest::JSONable # @return [SourceVault] Resource id of the KeyVault containing the key or # secret attr_accessor :source_vault diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_key_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_key_reference.rb old mode 100755 new mode 100644 index 73bddad75e..fc60777b25 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_key_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,8 +12,7 @@ class KeyVaultKeyReference include MsRestAzure - include MsRest::JSONable - # @return [String] The URL referencing a key in a Key Vault. + # @return [String] The URL referencing a key encryption key in Key Vault. attr_accessor :key_url # @return [SubResource] The relative URL of the Key Vault containing the diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb old mode 100755 new mode 100644 index 1027ca1755..4dd6b5aeb3 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyVaultSecretReference include MsRestAzure - include MsRest::JSONable # @return [String] The URL referencing a secret in a Key Vault. attr_accessor :secret_url diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/linux_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/linux_configuration.rb old mode 100755 new mode 100644 index 1367af2fd0..ee14776c20 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/linux_configuration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/linux_configuration.rb @@ -1,23 +1,29 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes Windows configuration of the OS Profile. + # Specifies the Linux operating system settings on the virtual machine. + #

For a list of supported Linux distributions, see [Linux on + # Azure-Endorsed + # Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + #

For running non-endorsed distributions, see [Information for + # Non-Endorsed + # Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). # class LinuxConfiguration include MsRestAzure - include MsRest::JSONable # @return [Boolean] Specifies whether password authentication should be # disabled. attr_accessor :disable_password_authentication - # @return [SshConfiguration] The SSH configuration for linux VMs. + # @return [SshConfiguration] Specifies the ssh key configuration for a + # Linux OS. attr_accessor :ssh diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/list_usages_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/list_usages_result.rb old mode 100755 new mode 100644 index b606498c46..8ce3485efa --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/list_usages_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/list_usages_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb old mode 100755 new mode 100644 index ba4e511a05..0604a2ef17 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb old mode 100755 new mode 100644 index 7ef9a805ab..a669288fd0 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MaintenanceRedeployStatus include MsRestAzure - include MsRest::JSONable # @return [Boolean] True, if customer is allowed to perform Maintenance. attr_accessor :is_customer_initiated_maintenance_allowed diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/managed_disk_parameters.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/managed_disk_parameters.rb old mode 100755 new mode 100644 index 39a8e7fa97..5b7c85df63 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/managed_disk_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,13 +8,13 @@ module Models # # The parameters of a managed disk. # - class ManagedDiskParameters < MsRestAzure::SubResource + class ManagedDiskParameters < SubResource include MsRestAzure - include MsRest::JSONable - # @return [StorageAccountTypes] The Storage Account type. Possible values - # include: 'Standard_LRS', 'Premium_LRS' + # @return [StorageAccountTypes] Specifies the storage account type for + # the managed disk. Possible values are: Standard_LRS or Premium_LRS. + # Possible values include: 'Standard_LRS', 'Premium_LRS' attr_accessor :storage_account_type diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_interface_reference.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_interface_reference.rb old mode 100755 new mode 100644 index 4892112452..c92dcb1ecd --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_interface_reference.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_interface_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes a network interface reference. # - class NetworkInterfaceReference < MsRestAzure::SubResource + class NetworkInterfaceReference < SubResource include MsRestAzure - include MsRest::JSONable # @return [Boolean] Specifies the primary network interface in case the # virtual machine has more than 1 network interface. attr_accessor :primary diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_profile.rb old mode 100755 new mode 100644 index 8fb7c181cd..530c1ead12 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/network_profile.rb @@ -1,20 +1,19 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes a network profile. + # Specifies the network interfaces of the virtual machine. # class NetworkProfile include MsRestAzure - include MsRest::JSONable # @return [Array] Specifies the list of - # resource IDs for the network interfaces associated with the virtual + # resource Ids for the network interfaces associated with the virtual # machine. attr_accessor :network_interfaces diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_state_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_state_types.rb old mode 100755 new mode 100644 index 88b6fa6c70..c25a716c74 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_state_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_state_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_types.rb old mode 100755 new mode 100644 index 3b8401d90d..23b798ac26 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operating_system_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operation_status_response.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operation_status_response.rb old mode 100755 new mode 100644 index f7601859fa..1d9bea0afd --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operation_status_response.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/operation_status_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationStatusResponse include MsRestAzure - include MsRest::JSONable # @return [String] Operation ID attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk.rb old mode 100755 new mode 100644 index 64e9371be3..125f27ba23 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk.rb @@ -1,23 +1,29 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes an Operating System disk. + # Specifies information about the operating system disk used by the virtual + # machine.

For more information about disks, see [About disks and + # VHDs for Azure virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). # class OSDisk include MsRestAzure - include MsRest::JSONable - # @return [OperatingSystemTypes] The Operating System type. Possible - # values include: 'Windows', 'Linux' + # @return [OperatingSystemTypes] This property allows you to specify the + # type of the OS that is included in the disk if creating a VM from + # user-image or a specialized VHD.

Possible values are:

+ # **Windows**

**Linux**. Possible values include: 'Windows', + # 'Linux' attr_accessor :os_type - # @return [DiskEncryptionSettings] The disk encryption settings. + # @return [DiskEncryptionSettings] Specifies the encryption settings for + # the OS Disk.

Minimum api-version: 2015-06-15 attr_accessor :encryption_settings # @return [String] The disk name. @@ -27,21 +33,33 @@ class OSDisk attr_accessor :vhd # @return [VirtualHardDisk] The source user image virtual hard disk. The - # virtual hard disk will be copied before using it to attach to the - # virtual machine. If SourceImage is provided, the destination virtual - # hard disk must not exist. + # virtual hard disk will be copied before being attached to the virtual + # machine. If SourceImage is provided, the destination virtual hard drive + # must not exist. attr_accessor :image - # @return [CachingTypes] The caching type. Possible values include: - # 'None', 'ReadOnly', 'ReadWrite' + # @return [CachingTypes] Specifies the caching requirements.

+ # Possible values are:

**None**

**ReadOnly**

+ # **ReadWrite**

Default: **None for Standard storage. ReadOnly + # for Premium storage**. Possible values include: 'None', 'ReadOnly', + # 'ReadWrite' attr_accessor :caching - # @return [DiskCreateOptionTypes] The create option. Possible values - # include: 'fromImage', 'empty', 'attach' + # @return [DiskCreateOptionTypes] Specifies how the virtual machine + # should be created.

Possible values are:

**Attach** + # \u2013 This value is used when you are using a specialized disk to + # create the virtual machine.

**FromImage** \u2013 This value is + # used when you are using an image to create the virtual machine. If you + # are using a platform image, you also use the imageReference element + # described above. If you are using a marketplace image, you also use + # the plan element previously described. Possible values include: + # 'FromImage', 'Empty', 'Attach' attr_accessor :create_option - # @return [Integer] The initial disk size, in GB, for blank data disks, - # and the new desired size for resizing existing OS and data disks. + # @return [Integer] Specifies the size of an empty data disk in + # gigabytes. This element can be used to overwrite the name of the disk + # in a virtual machine image.

This value cannot be larger than + # 1023 GB attr_accessor :disk_size_gb # @return [ManagedDiskParameters] The managed disk parameters. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk_image.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk_image.rb old mode 100755 new mode 100644 index 5184b1a72a..b1621433e7 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk_image.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osdisk_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OSDiskImage include MsRestAzure - include MsRest::JSONable # @return [OperatingSystemTypes] The operating system of the osDiskImage. # Possible values include: 'Windows', 'Linux' attr_accessor :operating_system diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osprofile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osprofile.rb old mode 100755 new mode 100644 index 4f5c2b474f..9136475b01 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osprofile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/osprofile.rb @@ -1,42 +1,82 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes an OS profile. + # Specifies the operating system settings for the virtual machine. # class OSProfile include MsRestAzure - include MsRest::JSONable # @return [String] Specifies the host OS name of the virtual machine. + #

**Max-length (Windows):** 15 characters

**Max-length + # (Linux):** 64 characters.

For naming conventions and + # restrictions see [Azure infrastructure services implementation + # guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). attr_accessor :computer_name # @return [String] Specifies the name of the administrator account. + #

**Windows-only restriction:** Cannot end in "."

+ # **Disallowed values:** "administrator", "admin", "user", "user1", + # "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + # "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", + # "guest", "john", "owner", "root", "server", "sql", "support", + # "support_388945a0", "sys", "test2", "test3", "user4", "user5".

+ # **Minimum-length (Linux):** 1 character

**Max-length + # (Linux):** 64 characters

**Max-length (Windows):** 20 + # characters

  • For root access to the Linux VM, see [Using + # root privileges on Linux virtual machines in + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + # For a list of built-in system users on Linux that should not be used in + # this field, see [Selecting User Names for Linux on + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) attr_accessor :admin_username # @return [String] Specifies the password of the administrator account. + #

    **Minimum-length (Windows):** 8 characters

    + # **Minimum-length (Linux):** 6 characters

    **Max-length + # (Windows):** 123 characters

    **Max-length (Linux):** 72 + # characters

    **Complexity requirements:** 3 out of 4 conditions + # below need to be fulfilled
    Has lower characters
    Has upper + # characters
    Has a digit
    Has a special character (Regex match + # [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", + # "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", + # "Password1", "Password22", "iloveyou!"

    For resetting the + # password, see [How to reset the Remote Desktop service or its login + # password in a Windows + # VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

    For resetting root password, see [Manage users, SSH, and check + # or repair disks on Azure Linux VMs using the VMAccess + # Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) attr_accessor :admin_password # @return [String] Specifies a base-64 encoded string of custom data. The # base-64 encoded string is decoded to a binary array that is saved as a # file on the Virtual Machine. The maximum length of the binary array is - # 65535 bytes + # 65535 bytes.

    For using cloud-init for your VM, see [Using + # cloud-init to customize a Linux VM during + # creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) attr_accessor :custom_data - # @return [WindowsConfiguration] The Windows configuration of the OS - # profile. + # @return [WindowsConfiguration] Specifies Windows operating system + # settings on the virtual machine. attr_accessor :windows_configuration - # @return [LinuxConfiguration] The Linux configuration of the OS profile. + # @return [LinuxConfiguration] Specifies the Linux operating system + # settings on the virtual machine.

    For a list of supported Linux + # distributions, see [Linux on Azure-Endorsed + # Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + #

    For running non-endorsed distributions, see [Information for + # Non-Endorsed + # Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). attr_accessor :linux_configuration - # @return [Array] The list of certificates for addition - # to the VM. + # @return [Array] Specifies set of certificates that + # should be installed onto the virtual machine. attr_accessor :secrets diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/pass_names.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/pass_names.rb old mode 100755 new mode 100644 index a864f03f77..fb2de196e1 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/pass_names.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/pass_names.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,7 +9,7 @@ module Models # Defines values for PassNames # module PassNames - OobeSystem = "oobeSystem" + OobeSystem = "OobeSystem" end end end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/plan.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/plan.rb old mode 100755 new mode 100644 index 4b6a843f19..5ec082e0f9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/plan.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/plan.rb @@ -1,25 +1,31 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Plan for the resource. + # Specifies information about the marketplace image used to create the + # virtual machine. This element is only used for marketplace images. Before + # you can use a marketplace image from an API, you must enable the image + # for programmatic use. In the Azure portal, find the marketplace image + # that you want to use and then click **Want to deploy programmatically, + # Get Started ->**. Enter any required information and then click **Save**. # class Plan include MsRestAzure - include MsRest::JSONable # @return [String] The plan ID. attr_accessor :name # @return [String] The publisher ID. attr_accessor :publisher - # @return [String] The offer ID. + # @return [String] Specifies the product of the image from the + # marketplace. This is the same value as Offer under the imageReference + # element. attr_accessor :product # @return [String] The promotion code. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/protocol_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/protocol_types.rb old mode 100755 new mode 100644 index d7c1ff7079..67ca7b3e50 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/protocol_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/protocol_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/purchase_plan.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/purchase_plan.rb old mode 100755 new mode 100644 index 6f01511ecb..a3285e063d --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/purchase_plan.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/purchase_plan.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,14 +13,15 @@ class PurchasePlan include MsRestAzure - include MsRest::JSONable # @return [String] The publisher ID. attr_accessor :publisher # @return [String] The plan ID. attr_accessor :name - # @return [String] The product ID. + # @return [String] Specifies the product of the image from the + # marketplace. This is the same value as Offer under the imageReference + # element. attr_accessor :product diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/recovery_mode.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/recovery_mode.rb deleted file mode 100755 index bf2ecc0e5c..0000000000 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/recovery_mode.rb +++ /dev/null @@ -1,17 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::Compute - module Models - # - # Defines values for RecoveryMode - # - module RecoveryMode - None = "None" - OverProvision = "OverProvision" - Reprovision = "Reprovision" - end - end -end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/recovery_policy.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/recovery_policy.rb deleted file mode 100755 index 95ea33ef35..0000000000 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/recovery_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::Compute - module Models - # - # Describes the recovery policy. - # - class RecoveryPolicy - - include MsRestAzure - - include MsRest::JSONable - # @return [RecoveryMode] The recovery mode. Possible values include: - # 'None', 'OverProvision', 'Reprovision' - attr_accessor :mode - - - # - # Mapper for RecoveryPolicy class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'RecoveryPolicy', - type: { - name: 'Composite', - class_name: 'RecoveryPolicy', - model_properties: { - mode: { - required: false, - serialized_name: 'mode', - type: { - name: 'Enum', - module: 'RecoveryMode' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource.rb new file mode 100644 index 0000000000..6937452b18 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource.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::ARM::Compute + module Models + # + # The Resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_identity_type.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_identity_type.rb old mode 100755 new mode 100644 index 9ed81e6910..5a158297c0 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_identity_type.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_identity_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku.rb old mode 100755 new mode 100644 index 1d9bd28efa..bd747f47ea --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,14 +12,15 @@ class ResourceSku include MsRestAzure - include MsRest::JSONable # @return [String] The type of resource the SKU applies to. attr_accessor :resource_type # @return [String] The name of SKU. attr_accessor :name - # @return [String] The tier of this particular SKU. + # @return [String] Specifies the tier of virtual machines in a scale + # set.

    Possible Values:

    **Standard**

    + # **Basic** attr_accessor :tier # @return [String] The Size of the SKU. @@ -31,7 +32,8 @@ class ResourceSku # @return [String] The Kind of resources that are supported in this SKU. attr_accessor :kind - # @return [ResourceSkuCapacity] Available scaling information. + # @return [ResourceSkuCapacity] Specifies the number of virtual machines + # in the scale set. attr_accessor :capacity # @return [Array] The set of locations that the SKU is available. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capabilities.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capabilities.rb old mode 100755 new mode 100644 index fa48209761..64b4910f8c --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capabilities.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capabilities.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceSkuCapabilities include MsRestAzure - include MsRest::JSONable # @return [String] An invariant to describe the feature. attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity.rb old mode 100755 new mode 100644 index cc2b7a7d1f..ecf3c3b958 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceSkuCapacity include MsRestAzure - include MsRest::JSONable # @return [Integer] The minimum capacity. attr_accessor :minimum diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity_scale_type.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity_scale_type.rb old mode 100755 new mode 100644 index ae4da79ec6..c2338fd78b --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity_scale_type.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_capacity_scale_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_costs.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_costs.rb old mode 100755 new mode 100644 index 04aff3f0c8..f39c3202a4 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_costs.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_costs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceSkuCosts include MsRestAzure - include MsRest::JSONable # @return [String] Used for querying price from commerce. attr_accessor :meter_id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions.rb old mode 100755 new mode 100644 index 0551294f86..68b8ec23b0 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,9 +12,8 @@ class ResourceSkuRestrictions include MsRestAzure - include MsRest::JSONable # @return [ResourceSkuRestrictionsType] The type of restrictions. - # Possible values include: 'location' + # Possible values include: 'Location' attr_accessor :type # @return [Array] The value of restrictions. If the restriction diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_reason_code.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_reason_code.rb old mode 100755 new mode 100644 index f6f192954d..e84b4e57ba --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_reason_code.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_reason_code.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_type.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_type.rb old mode 100755 new mode 100644 index 8a57c4c580..f5c1106359 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_type.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_sku_restrictions_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,7 +9,7 @@ module Models # Defines values for ResourceSkuRestrictionsType # module ResourceSkuRestrictionsType - Location = "location" + Location = "Location" end end end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_skus_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_skus_result.rb old mode 100755 new mode 100644 index 0c1fb63262..e2f1c6ed3e --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_skus_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_skus_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_update.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_update.rb old mode 100755 new mode 100644 index 578c7beb62..59d33f7834 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_update.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/resource_update.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceUpdate include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb new file mode 100644 index 0000000000..cc34d72cc1 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_action_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::ARM::Compute + module Models + # + # Defines values for RollingUpgradeActionType + # + module RollingUpgradeActionType + Start = "Start" + Cancel = "Cancel" + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb new file mode 100644 index 0000000000..d33a6d2e1a --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_policy.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::ARM::Compute + module Models + # + # The configuration parameters used while performing a rolling upgrade. + # + class RollingUpgradePolicy + + include MsRestAzure + + # @return [Integer] The maximum percent of total virtual machine + # instances that will be upgraded simultaneously by the rolling upgrade + # in one batch. As this is a maximum, unhealthy instances in previous or + # future batches can cause the percentage of instances in a batch to + # decrease to ensure higher reliability. The default value for this + # parameter is 20%. + attr_accessor :max_batch_instance_percent + + # @return [Integer] The maximum percentage of the total virtual machine + # instances in the scale set that can be simultaneously unhealthy, either + # as a result of being upgraded, or by being found in an unhealthy state + # by the virtual machine health checks before the rolling upgrade aborts. + # This constraint will be checked prior to starting any batch. The + # default value for this parameter is 20%. + attr_accessor :max_unhealthy_instance_percent + + # @return [Integer] The maximum percentage of upgraded virtual machine + # instances that can be found to be in an unhealthy state. This check + # will happen after each batch is upgraded. If this percentage is ever + # exceeded, the rolling update aborts. The default value for this + # parameter is 20%. + attr_accessor :max_unhealthy_upgraded_instance_percent + + # @return [String] The wait time between completing the update for all + # virtual machines in one batch and starting the next batch. The time + # duration should be specified in ISO 8601 format. The default value is 0 + # seconds (PT0S). + attr_accessor :pause_time_between_batches + + + # + # Mapper for RollingUpgradePolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RollingUpgradePolicy', + type: { + name: 'Composite', + class_name: 'RollingUpgradePolicy', + model_properties: { + max_batch_instance_percent: { + required: false, + serialized_name: 'maxBatchInstancePercent', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 5 + }, + type: { + name: 'Number' + } + }, + max_unhealthy_instance_percent: { + required: false, + serialized_name: 'maxUnhealthyInstancePercent', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 5 + }, + type: { + name: 'Number' + } + }, + max_unhealthy_upgraded_instance_percent: { + required: false, + serialized_name: 'maxUnhealthyUpgradedInstancePercent', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + pause_time_between_batches: { + required: false, + serialized_name: 'pauseTimeBetweenBatches', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb new file mode 100644 index 0000000000..2f4a952c6c --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.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::ARM::Compute + module Models + # + # Information about the number of virtual machine instances in each upgrade + # state. + # + class RollingUpgradeProgressInfo + + include MsRestAzure + + # @return [Integer] The number of instances that have been successfully + # upgraded. + attr_accessor :successful_instance_count + + # @return [Integer] The number of instances that have failed to be + # upgraded successfully. + attr_accessor :failed_instance_count + + # @return [Integer] The number of instances that are currently being + # upgraded. + attr_accessor :in_progress_instance_count + + # @return [Integer] The number of instances that have not yet begun to be + # upgraded. + attr_accessor :pending_instance_count + + + # + # Mapper for RollingUpgradeProgressInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RollingUpgradeProgressInfo', + type: { + name: 'Composite', + class_name: 'RollingUpgradeProgressInfo', + model_properties: { + successful_instance_count: { + required: false, + read_only: true, + serialized_name: 'successfulInstanceCount', + type: { + name: 'Number' + } + }, + failed_instance_count: { + required: false, + read_only: true, + serialized_name: 'failedInstanceCount', + type: { + name: 'Number' + } + }, + in_progress_instance_count: { + required: false, + read_only: true, + serialized_name: 'inProgressInstanceCount', + type: { + name: 'Number' + } + }, + pending_instance_count: { + required: false, + read_only: true, + serialized_name: 'pendingInstanceCount', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb new file mode 100644 index 0000000000..72335eb1af --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.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::ARM::Compute + module Models + # + # Information about the current running state of the overall upgrade. + # + class RollingUpgradeRunningStatus + + include MsRestAzure + + # @return [RollingUpgradeStatusCode] Code indicating the current status + # of the upgrade. Possible values include: 'RollingForward', 'Cancelled', + # 'Completed', 'Faulted' + attr_accessor :code + + # @return [DateTime] Start time of the upgrade. + attr_accessor :start_time + + # @return [RollingUpgradeActionType] The last action performed on the + # rolling upgrade. Possible values include: 'Start', 'Cancel' + attr_accessor :last_action + + # @return [DateTime] Last action time of the upgrade. + attr_accessor :last_action_time + + + # + # Mapper for RollingUpgradeRunningStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RollingUpgradeRunningStatus', + type: { + name: 'Composite', + class_name: 'RollingUpgradeRunningStatus', + model_properties: { + code: { + required: false, + read_only: true, + serialized_name: 'code', + type: { + name: 'Enum', + module: 'RollingUpgradeStatusCode' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + last_action: { + required: false, + read_only: true, + serialized_name: 'lastAction', + type: { + name: 'Enum', + module: 'RollingUpgradeActionType' + } + }, + last_action_time: { + required: false, + read_only: true, + serialized_name: 'lastActionTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb new file mode 100644 index 0000000000..cc8471f9b6 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.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::ARM::Compute + module Models + # + # Defines values for RollingUpgradeStatusCode + # + module RollingUpgradeStatusCode + RollingForward = "RollingForward" + Cancelled = "Cancelled" + Completed = "Completed" + Faulted = "Faulted" + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb new file mode 100644 index 0000000000..045ebd0c13 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb @@ -0,0 +1,130 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Compute + module Models + # + # The status of the latest virtual machine scale set rolling upgrade. + # + class RollingUpgradeStatusInfo < Resource + + include MsRestAzure + + # @return [RollingUpgradePolicy] The rolling upgrade policies applied for + # this upgrade. + attr_accessor :policy + + # @return [RollingUpgradeRunningStatus] Information about the current + # running state of the overall upgrade. + attr_accessor :running_status + + # @return [RollingUpgradeProgressInfo] Information about the number of + # virtual machine instances in each upgrade state. + attr_accessor :progress + + # @return [ApiError] Error details for this upgrade, if there are any. + attr_accessor :error + + + # + # Mapper for RollingUpgradeStatusInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RollingUpgradeStatusInfo', + type: { + name: 'Composite', + class_name: 'RollingUpgradeStatusInfo', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + policy: { + required: false, + read_only: true, + serialized_name: 'properties.policy', + type: { + name: 'Composite', + class_name: 'RollingUpgradePolicy' + } + }, + running_status: { + required: false, + read_only: true, + serialized_name: 'properties.runningStatus', + type: { + name: 'Composite', + class_name: 'RollingUpgradeRunningStatus' + } + }, + progress: { + required: false, + read_only: true, + serialized_name: 'properties.progress', + type: { + name: 'Composite', + class_name: 'RollingUpgradeProgressInfo' + } + }, + error: { + required: false, + read_only: true, + serialized_name: 'properties.error', + type: { + name: 'Composite', + class_name: 'ApiError' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document.rb old mode 100755 new mode 100644 index 8fa422f683..d4902cd99a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RunCommandDocument < RunCommandDocumentBase include MsRestAzure - include MsRest::JSONable # @return [Array] The script to be executed. attr_accessor :script diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document_base.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document_base.rb old mode 100755 new mode 100644 index 90b13498c3..4a7cbe0988 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document_base.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_document_base.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RunCommandDocumentBase include MsRestAzure - include MsRest::JSONable # @return [String] The VM run command schema. attr_accessor :schema diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input.rb old mode 100755 new mode 100644 index c5e1f1d189..940482e8dd --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RunCommandInput include MsRestAzure - include MsRest::JSONable # @return [String] The run command id. attr_accessor :command_id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input_parameter.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input_parameter.rb old mode 100755 new mode 100644 index 7b57467bc4..4bdea411b8 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input_parameter.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_input_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RunCommandInputParameter include MsRestAzure - include MsRest::JSONable # @return [String] The run command parameter name. attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_list_result.rb old mode 100755 new mode 100644 index 2a756cc69e..75c2bf629c --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb old mode 100755 new mode 100644 index 3132b48297..d319ba9e2c --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RunCommandParameterDefinition include MsRestAzure - include MsRest::JSONable # @return [String] The run command parameter name. attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_result.rb old mode 100755 new mode 100644 index 400930a40a..245fb2d7c5 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/run_command_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RunCommandResult < OperationStatusResponse include MsRestAzure - include MsRest::JSONable # @return Operation output data (raw JSON) attr_accessor :output diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/setting_names.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/setting_names.rb old mode 100755 new mode 100644 index fefecdbff2..e24d9f5def --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/setting_names.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/setting_names.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sku.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sku.rb old mode 100755 new mode 100644 index 508d2a67df..8beaca661b --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sku.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,14 +12,16 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [String] The sku name. attr_accessor :name - # @return [String] The sku tier. + # @return [String] Specifies the tier of virtual machines in a scale + # set.

    Possible Values:

    **Standard**

    + # **Basic** attr_accessor :tier - # @return [Integer] The sku capacity. + # @return [Integer] Specifies the number of virtual machines in the scale + # set. attr_accessor :capacity diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot.rb old mode 100755 new mode 100644 index 484d9d275f..5a1444f9e7 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,13 +8,11 @@ module Models # # Snapshot resource. # - class Snapshot < MsRestAzure::Resource + class Snapshot < Resource include MsRestAzure - include MsRest::JSONable - # @return [String] A relative URI containing the ID of the VM that has - # the disk attached. + # @return [String] Unused. Always Null. attr_accessor :managed_by # @return [DiskSku] diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_list.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_list.rb old mode 100755 new mode 100644 index e51fe95317..e698b1ce5f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_list.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_update.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_update.rb old mode 100755 new mode 100644 index 532bde09a7..63076a314d --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_update.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/snapshot_update.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Snapshot update resource. # - class SnapshotUpdate < MsRestAzure::ResourceUpdate + class SnapshotUpdate < ResourceUpdate include MsRestAzure - include MsRest::JSONable # @return [OperatingSystemTypes] the Operating System type. Possible # values include: 'Windows', 'Linux' attr_accessor :os_type diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/source_vault.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/source_vault.rb old mode 100755 new mode 100644 index 9593209ba9..af97882f2c --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/source_vault.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/source_vault.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SourceVault include MsRestAzure - include MsRest::JSONable # @return [String] Resource Id attr_accessor :id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_configuration.rb old mode 100755 new mode 100644 index 7ce7a446c2..e3966ba24a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_configuration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SshConfiguration include MsRestAzure - include MsRest::JSONable # @return [Array] The list of SSH public keys used to # authenticate with linux based VMs. attr_accessor :public_keys diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb old mode 100755 new mode 100644 index 49c3f6e725..29dc87f13d --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,15 +13,16 @@ class SshPublicKey include MsRestAzure - include MsRest::JSONable - # @return [String] Specifies the full path on the created VM where SSH + # @return [String] Specifies the full path on the created VM where ssh # public key is stored. If the file already exists, the specified key is - # appended to the file. + # appended to the file. Example: /home/user/.ssh/authorized_keys attr_accessor :path - # @return [String] Certificate public key used to authenticate to the VM - # through SSH. The certificate must be in Pem format with or without - # headers. + # @return [String] SSH public key certificate used to authenticate with + # the VM through ssh. The key needs to be at least 2048-bit and in + # ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on + # Linux and Mac for Linux VMs in + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). attr_accessor :key_data diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/status_level_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/status_level_types.rb old mode 100755 new mode 100644 index 60569b367d..b4aac00298 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/status_level_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/status_level_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_account_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_account_types.rb old mode 100755 new mode 100644 index 1a1cbc57b2..1fd7032fe9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_account_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_account_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_profile.rb old mode 100755 new mode 100644 index 6bf966c89f..bbdcd8ce17 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/storage_profile.rb @@ -1,25 +1,34 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes a storage profile. + # Specifies the storage settings for the virtual machine disks. # class StorageProfile include MsRestAzure - include MsRest::JSONable - # @return [ImageReference] The image reference. + # @return [ImageReference] Specifies information about the image to use. + # You can specify information about platform images, marketplace images, + # or virtual machine images. This element is required when you want to + # use a platform image, marketplace image, or virtual machine image, but + # is not used in other creation operations. attr_accessor :image_reference - # @return [OSDisk] The OS disk. + # @return [OSDisk] Specifies information about the operating system disk + # used by the virtual machine.

    For more information about disks, + # see [About disks and VHDs for Azure virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). attr_accessor :os_disk - # @return [Array] The data disks. + # @return [Array] Specifies the parameters that are used to add + # a data disk to a virtual machine.

    For more information about + # disks, see [About disks and VHDs for Azure virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). attr_accessor :data_disks diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sub_resource.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sub_resource.rb new file mode 100644 index 0000000000..b686dcd212 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sub_resource.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::ARM::Compute + module Models + # + # Model object. + # + # + class SubResource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + + # + # Mapper for SubResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubResource', + type: { + name: 'Composite', + class_name: 'SubResource', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sub_resource_read_only.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sub_resource_read_only.rb old mode 100755 new mode 100644 index 20aead2a5d..7153847f7f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/sub_resource_read_only.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SubResourceReadOnly include MsRestAzure - include MsRest::JSONable # @return [String] Resource Id attr_accessor :id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/update_resource.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/update_resource.rb new file mode 100644 index 0000000000..cd503944e9 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/update_resource.rb @@ -0,0 +1,51 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Compute + module Models + # + # The Update Resource model definition. + # + class UpdateResource + + include MsRestAzure + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for UpdateResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateResource', + type: { + name: 'Composite', + class_name: 'UpdateResource', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_mode.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_mode.rb old mode 100755 new mode 100644 index f9d9593b10..296446ab53 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_mode.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -11,6 +11,7 @@ module Models module UpgradeMode Automatic = "Automatic" Manual = "Manual" + Rolling = "Rolling" end end end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb old mode 100755 new mode 100644 index e8134d5605..88a8c073db --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb @@ -1,22 +1,35 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes an upgrade policy - automatic or manual. + # Describes an upgrade policy - automatic, manual, or rolling. # class UpgradePolicy include MsRestAzure - include MsRest::JSONable - # @return [UpgradeMode] The upgrade mode. Possible values include: - # 'Automatic', 'Manual' + # @return [UpgradeMode] Specifies the mode of an upgrade to virtual + # machines in the scale set.

    Possible values are:

    + # **Manual** - You control the application of updates to virtual + # machines in the scale set. You do this by using the manualUpgrade + # action.

    **Automatic** - All virtual machines in the scale + # set are automatically updated at the same time. Possible values + # include: 'Automatic', 'Manual', 'Rolling' attr_accessor :mode + # @return [RollingUpgradePolicy] The configuration parameters used while + # performing a rolling upgrade. + attr_accessor :rolling_upgrade_policy + + # @return [Boolean] Whether OS upgrades should automatically be applied + # to scale set instances in a rolling fashion when a newer version of the + # image becomes available. + attr_accessor :automatic_osupgrade + # # Mapper for UpgradePolicy class as Ruby Hash. @@ -37,6 +50,21 @@ def self.mapper() name: 'Enum', module: 'UpgradeMode' } + }, + rolling_upgrade_policy: { + required: false, + serialized_name: 'rollingUpgradePolicy', + type: { + name: 'Composite', + class_name: 'RollingUpgradePolicy' + } + }, + automatic_osupgrade: { + required: false, + serialized_name: 'automaticOSUpgrade', + type: { + name: 'Boolean' + } } } } diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage.rb old mode 100755 new mode 100644 index 58fbb191e0..a42dc1667f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Usage include MsRestAzure - include MsRest::JSONable # @return [String] An enum describing the unit of usage measurement. # Default value: 'Count' . attr_accessor :unit diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage_name.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage_name.rb old mode 100755 new mode 100644 index 1fb05f1485..653b379c55 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage_name.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/usage_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UsageName include MsRestAzure - include MsRest::JSONable # @return [String] The name of the resource. attr_accessor :value diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_certificate.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_certificate.rb old mode 100755 new mode 100644 index 4d92277cb8..abb44523f3 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_certificate.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,13 +13,24 @@ class VaultCertificate include MsRestAzure - include MsRest::JSONable - # @return [String] The URL referencing a secret in a Key Vault which - # contains a properly formatted certificate. + # @return [String] This is the URL of a certificate that has been + # uploaded to Key Vault as a secret. For adding a secret to the Key + # Vault, see [Add a key or secret to the key + # vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + # In this case, your certificate needs to be It is the Base64 encoding of + # the following JSON Object which is encoded in UTF-8:

    {
    + # "data":"",
    "dataType":"pfx",
    + # "password":""
    } attr_accessor :certificate_url - # @return [String] The Certificate store in LocalMachine to add the - # certificate to on Windows, leave empty on Linux. + # @return [String] For Windows VMs, specifies the certificate store on + # the Virtual Machine to which the certificate should be added. The + # specified certificate store is implicitly in the LocalMachine account. + #

    For Linux VMs, the certificate file is placed under the + # /var/lib/waagent directory, with the file name + # .crt for the X509 certificate file and + # .prv for private key. Both of these files are .pem + # formatted. attr_accessor :certificate_store diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_secret_group.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_secret_group.rb old mode 100755 new mode 100644 index 6734b7b488..97cb6f9f47 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_secret_group.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/vault_secret_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,8 +12,7 @@ class VaultSecretGroup include MsRestAzure - include MsRest::JSONable - # @return [SubResource] The Relative URL of the Key Vault containing all + # @return [SubResource] The relative URL of the Key Vault containing all # of the certificates in VaultCertificates. attr_accessor :source_vault diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_hard_disk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_hard_disk.rb old mode 100755 new mode 100644 index f20b9feabc..1484c0b7c8 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_hard_disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,9 +12,7 @@ class VirtualHardDisk include MsRestAzure - include MsRest::JSONable - # @return [String] The virtual hard disk's URI. Must be a valid URI to a - # virtual hard disk. + # @return [String] Specifies the virtual hard disk's uri. attr_accessor :uri diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine.rb old mode 100755 new mode 100644 index cae020abde..2797674e7f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,32 +8,50 @@ module Models # # Describes a Virtual Machine. # - class VirtualMachine < MsRestAzure::Resource + class VirtualMachine < Resource include MsRestAzure - include MsRest::JSONable - # @return [Plan] The purchase plan when deploying virtual machine from VM - # Marketplace images. + # @return [Plan] Specifies information about the marketplace image used + # to create the virtual machine. This element is only used for + # marketplace images. Before you can use a marketplace image from an API, + # you must enable the image for programmatic use. In the Azure portal, + # find the marketplace image that you want to use and then click **Want + # to deploy programmatically, Get Started ->**. Enter any required + # information and then click **Save**. attr_accessor :plan - # @return [HardwareProfile] The hardware profile. + # @return [HardwareProfile] Specifies the hardware settings for the + # virtual machine. attr_accessor :hardware_profile - # @return [StorageProfile] The storage profile. + # @return [StorageProfile] Specifies the storage settings for the virtual + # machine disks. attr_accessor :storage_profile - # @return [OSProfile] The OS profile. + # @return [OSProfile] Specifies the operating system settings for the + # virtual machine. attr_accessor :os_profile - # @return [NetworkProfile] The network profile. + # @return [NetworkProfile] Specifies the network interfaces of the + # virtual machine. attr_accessor :network_profile - # @return [DiagnosticsProfile] The diagnostics profile. + # @return [DiagnosticsProfile] Specifies the boot diagnostic settings + # state.

    Minimum api-version: 2015-06-15. attr_accessor :diagnostics_profile - # @return [SubResource] The reference Id of the availability set to which - # the virtual machine belongs. + # @return [SubResource] Specifies information about the availability set + # that the virtual machine should be assigned to. Virtual machines + # specified in the same availability set are allocated to different nodes + # to maximize availability. For more information about availability sets, + # see [Manage the availability of virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + #

    For more information on Azure planned maintainance, see + # [Planned maintenance for virtual machines in + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

    Currently, a VM can only be added to availability set at + # creation time. An existing VM cannot be added to an availability set. attr_accessor :availability_set # @return [String] The provisioning state, which only appears in the @@ -45,7 +63,13 @@ class VirtualMachine < MsRestAzure::Resource # @return [String] Specifies that the image or disk that is being used # was licensed on-premises. This element is only used for images that - # contain the Windows Server operating system. + # contain the Windows Server operating system.

    Possible values + # are:

    Windows_Client

    Windows_Server

    If this + # element is included in a request for an update, the value must match + # the initial value. This value cannot be updated.

    For more + # information, see [Azure Hybrid Use Benefit for Windows + # Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

    Minimum api-version: 2015-06-15 attr_accessor :license_type # @return [String] Specifies the VM unique ID which is a 128-bits @@ -61,6 +85,9 @@ class VirtualMachine < MsRestAzure::Resource # if configured. attr_accessor :identity + # @return [Array] The virtual machine zones. + attr_accessor :zones + # # Mapper for VirtualMachine class as Ruby Hash. @@ -230,6 +257,20 @@ def self.mapper() name: 'Composite', class_name: 'VirtualMachineIdentity' } + }, + zones: { + required: false, + serialized_name: 'zones', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb old mode 100755 new mode 100644 index 139100e0a5..82de103c19 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineAgentInstanceView include MsRestAzure - include MsRest::JSONable # @return [String] The VM Agent full version. attr_accessor :vm_agent_version diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb old mode 100755 new mode 100644 index 85e02e5c2c..48f9c970cd --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineCaptureParameters include MsRestAzure - include MsRest::JSONable # @return [String] The captured virtual hard disk's name prefix. attr_accessor :vhd_prefix diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb old mode 100755 new mode 100644 index d7a9775a48..398c6ee388 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Resource Id. # - class VirtualMachineCaptureResult < MsRestAzure::SubResource + class VirtualMachineCaptureResult < SubResource include MsRestAzure - include MsRest::JSONable # @return Operation output data (raw JSON) attr_accessor :output diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb old mode 100755 new mode 100644 index 01c25c1da8..0fefeba3c6 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes a Virtual Machine Extension. # - class VirtualMachineExtension < MsRestAzure::Resource + class VirtualMachineExtension < Resource include MsRestAzure - include MsRest::JSONable # @return [String] How the extension handler should be forced to update # even if the extension configuration has not changed. attr_accessor :force_update_tag @@ -20,20 +19,24 @@ class VirtualMachineExtension < MsRestAzure::Resource # @return [String] The name of the extension handler publisher. attr_accessor :publisher - # @return [String] The type of the extension handler. + # @return [String] Specifies the type of the extension; an example is + # "CustomScriptExtension". attr_accessor :virtual_machine_extension_type - # @return [String] The type version of the extension handler. + # @return [String] Specifies the version of the script handler. attr_accessor :type_handler_version - # @return [Boolean] Whether the extension handler should be automatically - # upgraded across minor versions. + # @return [Boolean] Indicates whether the extension should use a newer + # minor version if one is available at deployment time. Once deployed, + # however, the extension will not upgrade minor versions unless + # redeployed, even with this property set to true. attr_accessor :auto_upgrade_minor_version # @return Json formatted public settings for the extension. attr_accessor :settings - # @return Json formatted protected settings for the extension. + # @return The extension can contain either protectedSettings or + # protectedSettingsFromKeyVault or no protected settings at all. attr_accessor :protected_settings # @return [String] The provisioning state, which only appears in the diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb old mode 100755 new mode 100644 index aef9f94057..e2c1020815 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,12 +12,11 @@ class VirtualMachineExtensionHandlerInstanceView include MsRestAzure - include MsRest::JSONable - # @return [String] Full type of the extension handler which includes both - # publisher and type. + # @return [String] Specifies the type of the extension; an example is + # "CustomScriptExtension". attr_accessor :type - # @return [String] The type version of the extension handler. + # @return [String] Specifies the version of the script handler. attr_accessor :type_handler_version # @return [InstanceViewStatus] The extension handler status. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb old mode 100755 new mode 100644 index d85fb381a0..39e1a4dc5a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes a Virtual Machine Extension Image. # - class VirtualMachineExtensionImage < MsRestAzure::Resource + class VirtualMachineExtensionImage < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The operating system this extension supports. attr_accessor :operating_system diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb old mode 100755 new mode 100644 index 16368db32f..c9c0650336 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,15 +12,14 @@ class VirtualMachineExtensionInstanceView include MsRestAzure - include MsRest::JSONable # @return [String] The virtual machine extension name. attr_accessor :name - # @return [String] The full type of the extension handler which includes - # both publisher and type. + # @return [String] Specifies the type of the extension; an example is + # "CustomScriptExtension". attr_accessor :type - # @return [String] The type version of the extension handler. + # @return [String] Specifies the version of the script handler. attr_accessor :type_handler_version # @return [Array] The resource status information. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb new file mode 100644 index 0000000000..ad3fe2c922 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_health_status.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::ARM::Compute + module Models + # + # The health status of the VM. + # + class VirtualMachineHealthStatus + + include MsRestAzure + + # @return [InstanceViewStatus] The health status information for the VM. + attr_accessor :status + + + # + # Mapper for VirtualMachineHealthStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineHealthStatus', + type: { + name: 'Composite', + class_name: 'VirtualMachineHealthStatus', + model_properties: { + status: { + required: false, + read_only: true, + serialized_name: 'status', + type: { + name: 'Composite', + class_name: 'InstanceViewStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_identity.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_identity.rb old mode 100755 new mode 100644 index 5b28fd9bae..1347a81230 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineIdentity include MsRestAzure - include MsRest::JSONable # @return [String] The principal id of virtual machine identity. attr_accessor :principal_id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image.rb old mode 100755 new mode 100644 index 0b65770c82..17d59d1e5e --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineImage < VirtualMachineImageResource include MsRestAzure - include MsRest::JSONable # @return [PurchasePlan] attr_accessor :plan diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb old mode 100755 new mode 100644 index 84e3078228..2a44109128 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,18 +8,20 @@ module Models # # Virtual machine image resource information. # - class VirtualMachineImageResource < MsRestAzure::SubResource + class VirtualMachineImageResource < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The name of the resource. attr_accessor :name # @return [String] The supported Azure location of the resource. attr_accessor :location - # @return [Hash{String => String}] The tags attached to the resource. + # @return [Hash{String => String}] Specifies the tags that are assigned + # to the virtual machine. For more information about using tags, see + # [Using tags to organize your Azure + # resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). attr_accessor :tags diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb old mode 100755 new mode 100644 index fc855c7edd..c33b0cce31 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineInstanceView include MsRestAzure - include MsRest::JSONable # @return [Integer] Specifies the update domain of the virtual machine. attr_accessor :platform_update_domain @@ -37,7 +36,12 @@ class VirtualMachineInstanceView # information. attr_accessor :extensions - # @return [BootDiagnosticsInstanceView] The boot diagnostics. + # @return [BootDiagnosticsInstanceView] Boot Diagnostics is a debugging + # feature which allows you to view Console Output and Screenshot to + # diagnose VM status.

    For Linux Virtual Machines, you can easily + # view the output of your console log.

    For both Windows and + # Linux virtual machines, Azure also enables you to see a screenshot of + # the VM from the hypervisor. attr_accessor :boot_diagnostics # @return [Array] The resource status information. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb old mode 100755 new mode 100644 index 9f5b0bb8c7..928423b2e3 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb old mode 100755 new mode 100644 index cd414b99d5..2fa402771c --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,24 +8,25 @@ module Models # # Describes a Virtual Machine Scale Set. # - class VirtualMachineScaleSet < MsRestAzure::Resource + class VirtualMachineScaleSet < Resource include MsRestAzure - include MsRest::JSONable # @return [Sku] The virtual machine scale set sku. attr_accessor :sku - # @return [Plan] The purchase plan when deploying a virtual machine scale - # set from VM Marketplace images. + # @return [Plan] Specifies information about the marketplace image used + # to create the virtual machine. This element is only used for + # marketplace images. Before you can use a marketplace image from an API, + # you must enable the image for programmatic use. In the Azure portal, + # find the marketplace image that you want to use and then click **Want + # to deploy programmatically, Get Started ->**. Enter any required + # information and then click **Save**. attr_accessor :plan # @return [UpgradePolicy] The upgrade policy. attr_accessor :upgrade_policy - # @return [RecoveryPolicy] The recovery policy. - attr_accessor :recovery_policy - # @return [VirtualMachineScaleSetVMProfile] The virtual machine profile. attr_accessor :virtual_machine_profile @@ -49,6 +50,9 @@ class VirtualMachineScaleSet < MsRestAzure::Resource # machine scale set, if configured. attr_accessor :identity + # @return [Array] The virtual machine scale set zones. + attr_accessor :zones + # # Mapper for VirtualMachineScaleSet class as Ruby Hash. @@ -131,14 +135,6 @@ def self.mapper() class_name: 'UpgradePolicy' } }, - recovery_policy: { - required: false, - serialized_name: 'properties.recoveryPolicy', - type: { - name: 'Composite', - class_name: 'RecoveryPolicy' - } - }, virtual_machine_profile: { required: false, serialized_name: 'properties.virtualMachineProfile', @@ -184,6 +180,20 @@ def self.mapper() name: 'Composite', class_name: 'VirtualMachineScaleSetIdentity' } + }, + zones: { + required: false, + serialized_name: 'zones', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb old mode 100755 new mode 100644 index 0d260e05cf..5149026014 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,23 +12,29 @@ class VirtualMachineScaleSetDataDisk include MsRestAzure - include MsRest::JSONable # @return [String] The disk name. attr_accessor :name - # @return [Integer] The logical unit number. + # @return [Integer] Specifies the logical unit number of the data disk. + # This value is used to identify data disks within the VM and therefore + # must be unique for each data disk attached to a VM. attr_accessor :lun - # @return [CachingTypes] The caching type. Possible values include: - # 'None', 'ReadOnly', 'ReadWrite' + # @return [CachingTypes] Specifies the caching requirements.

    + # Possible values are:

    **None**

    **ReadOnly**

    + # **ReadWrite**

    Default: **None for Standard storage. ReadOnly + # for Premium storage**. Possible values include: 'None', 'ReadOnly', + # 'ReadWrite' attr_accessor :caching # @return [DiskCreateOptionTypes] The create option. Possible values - # include: 'fromImage', 'empty', 'attach' + # include: 'FromImage', 'Empty', 'Attach' attr_accessor :create_option - # @return [Integer] The initial disk size in GB for blank data disks, and - # the new desired size for existing OS and Data disks. + # @return [Integer] Specifies the size of an empty data disk in + # gigabytes. This element can be used to overwrite the name of the disk + # in a virtual machine image.

    This value cannot be larger than + # 1023 GB attr_accessor :disk_size_gb # @return [VirtualMachineScaleSetManagedDiskParameters] The managed disk diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb old mode 100755 new mode 100644 index 1e0424ef2b..d9c9fe5534 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes a Virtual Machine Scale Set Extension. # - class VirtualMachineScaleSetExtension < MsRestAzure::SubResourceReadOnly + class VirtualMachineScaleSetExtension < SubResourceReadOnly include MsRestAzure - include MsRest::JSONable # @return [String] The name of the extension. attr_accessor :name @@ -24,20 +23,24 @@ class VirtualMachineScaleSetExtension < MsRestAzure::SubResourceReadOnly # @return [String] The name of the extension handler publisher. attr_accessor :publisher - # @return [String] The type of the extension handler. + # @return [String] Specifies the type of the extension; an example is + # "CustomScriptExtension". attr_accessor :type - # @return [String] The type version of the extension handler. + # @return [String] Specifies the version of the script handler. attr_accessor :type_handler_version - # @return [Boolean] Whether the extension handler should be automatically - # upgraded across minor versions. + # @return [Boolean] Indicates whether the extension should use a newer + # minor version if one is available at deployment time. Once deployed, + # however, the extension will not upgrade minor versions unless + # redeployed, even with this property set to true. attr_accessor :auto_upgrade_minor_version # @return Json formatted public settings for the extension. attr_accessor :settings - # @return Json formatted protected settings for the extension. + # @return The extension can contain either protectedSettings or + # protectedSettingsFromKeyVault or no protected settings at all. attr_accessor :protected_settings # @return [String] The provisioning state, which only appears in the diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb old mode 100755 new mode 100644 index a16eee2722..2c6023cff2 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb old mode 100755 new mode 100644 index 426e8dc95b..0e92e31ac5 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetExtensionProfile include MsRestAzure - include MsRest::JSONable # @return [Array] The virtual machine # scale set child extension resources. attr_accessor :extensions diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb old mode 100755 new mode 100644 index f96a5e2bcc..d4c639a244 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetIdentity include MsRestAzure - include MsRest::JSONable # @return [String] The principal id of virtual machine scale set # identity. attr_accessor :principal_id diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb old mode 100755 new mode 100644 index a97361adc0..7005ec416b --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetInstanceView include MsRestAzure - include MsRest::JSONable # @return [VirtualMachineScaleSetInstanceViewStatusesSummary] The # instance view status summary for the virtual machine scale set. attr_accessor :virtual_machine diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb old mode 100755 new mode 100644 index e3e797e3dc..fc5fffd3d6 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class VirtualMachineScaleSetInstanceViewStatusesSummary include MsRestAzure - include MsRest::JSONable # @return [Array] The extensions # information. attr_accessor :statuses_summary diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb old mode 100755 new mode 100644 index c36bcb901a..f965c1e988 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,19 +8,18 @@ module Models # # Describes a virtual machine scale set network profile's IP configuration. # - class VirtualMachineScaleSetIPConfiguration < MsRestAzure::SubResource + class VirtualMachineScaleSetIPConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The IP configuration name. attr_accessor :name - # @return [ApiEntityReference] The subnet. + # @return [ApiEntityReference] Specifies the identifier of the subnet. attr_accessor :subnet - # @return [Boolean] Specifies the primary IP Configuration in case the - # network interface has more than one IP Configuration. + # @return [Boolean] Specifies the primary network interface in case the + # virtual machine has more than 1 network interface. attr_accessor :primary # @return [VirtualMachineScaleSetPublicIPAddressConfiguration] The @@ -33,14 +32,22 @@ class VirtualMachineScaleSetIPConfiguration < MsRestAzure::SubResource # Possible values include: 'IPv4', 'IPv6' attr_accessor :private_ipaddress_version - # @return [Array] The application gateway backend address - # pools. + # @return [Array] Specifies an array of references to + # backend address pools of application gateways. A scale set can + # reference backend address pools of multiple application gateways. + # Multiple scale sets cannot use the same application gateway. attr_accessor :application_gateway_backend_address_pools - # @return [Array] The load balancer backend address pools. + # @return [Array] Specifies an array of references to + # backend address pools of load balancers. A scale set can reference + # backend address pools of one public and one internal load balancer. + # Multiple scale sets cannot use the same load balancer. attr_accessor :load_balancer_backend_address_pools - # @return [Array] The load balancer inbound nat pools. + # @return [Array] Specifies an array of references to + # inbound Nat pools of the load balancers. A scale set can reference + # inbound nat pools of one public and one internal load balancer. + # Multiple scale sets cannot use the same load balancer attr_accessor :load_balancer_inbound_nat_pools diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb old mode 100755 new mode 100644 index 1fb5390f2f..5e6072d9dc --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb old mode 100755 new mode 100644 index 554b8d4298..c4d97c85e7 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb old mode 100755 new mode 100644 index ca110e0a9b..e85df6ffee --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb old mode 100755 new mode 100644 index 789e52deac..4ffa8eb9b9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,9 +12,9 @@ class VirtualMachineScaleSetManagedDiskParameters include MsRestAzure - include MsRest::JSONable - # @return [StorageAccountTypes] The Storage Account type. Possible values - # include: 'Standard_LRS', 'Premium_LRS' + # @return [StorageAccountTypes] Specifies the storage account type for + # the managed disk. Possible values are: Standard_LRS or Premium_LRS. + # Possible values include: 'Standard_LRS', 'Premium_LRS' attr_accessor :storage_account_type diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb old mode 100755 new mode 100644 index c170f4da87..f70c99490b --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,15 +9,15 @@ module Models # Describes a virtual machine scale set network profile's network # configurations. # - class VirtualMachineScaleSetNetworkConfiguration < MsRestAzure::SubResource + class VirtualMachineScaleSetNetworkConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The network configuration name. attr_accessor :name - # @return [Boolean] Whether this is a primary NIC on a virtual machine. + # @return [Boolean] Specifies the primary network interface in case the + # virtual machine has more than 1 network interface. attr_accessor :primary # @return [Boolean] Specifies whether the network interface is @@ -31,8 +31,8 @@ class VirtualMachineScaleSetNetworkConfiguration < MsRestAzure::SubResource # settings to be applied on the network interfaces. attr_accessor :dns_settings - # @return [Array] The virtual - # machine scale set IP Configuration. + # @return [Array] Specifies the IP + # configurations of the network interface. attr_accessor :ip_configurations diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb old mode 100755 new mode 100644 index e6ad57787c..fe6b3e3fb9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class VirtualMachineScaleSetNetworkConfigurationDnsSettings include MsRestAzure - include MsRest::JSONable # @return [Array] List of DNS servers IP addresses attr_accessor :dns_servers diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb old mode 100755 new mode 100644 index f5b6025bf0..1b18ee77f6 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,12 @@ class VirtualMachineScaleSetNetworkProfile include MsRestAzure - include MsRest::JSONable + # @return [ApiEntityReference] A reference to a load balancer probe used + # to determine the health of an instance in the virtual machine scale + # set. The reference will be in the form: + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + attr_accessor :health_probe + # @return [Array] The list of # network configurations. attr_accessor :network_interface_configurations @@ -30,6 +35,14 @@ def self.mapper() name: 'Composite', class_name: 'VirtualMachineScaleSetNetworkProfile', model_properties: { + health_probe: { + required: false, + serialized_name: 'healthProbe', + type: { + name: 'Composite', + class_name: 'ApiEntityReference' + } + }, network_interface_configurations: { required: false, serialized_name: 'networkInterfaceConfigurations', diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb old mode 100755 new mode 100644 index ab08a1a88c..2d6ab71ca8 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,29 +12,38 @@ class VirtualMachineScaleSetOSDisk include MsRestAzure - include MsRest::JSONable # @return [String] The disk name. attr_accessor :name - # @return [CachingTypes] The caching type. Possible values include: - # 'None', 'ReadOnly', 'ReadWrite' + # @return [CachingTypes] Specifies the caching requirements.

    + # Possible values are:

    **None**

    **ReadOnly**

    + # **ReadWrite**

    Default: **None for Standard storage. ReadOnly + # for Premium storage**. Possible values include: 'None', 'ReadOnly', + # 'ReadWrite' attr_accessor :caching - # @return [DiskCreateOptionTypes] The create option. Possible values - # include: 'fromImage', 'empty', 'attach' + # @return [DiskCreateOptionTypes] Specifies how the virtual machines in + # the scale set should be created.

    The only allowed value is: + # **FromImage** \u2013 This value is used when you are using an image to + # create the virtual machine. If you are using a platform image, you also + # use the imageReference element described above. If you are using a + # marketplace image, you also use the plan element previously described. + # Possible values include: 'FromImage', 'Empty', 'Attach' attr_accessor :create_option - # @return [OperatingSystemTypes] The Operating System type. Possible - # values include: 'Windows', 'Linux' + # @return [OperatingSystemTypes] This property allows you to specify the + # type of the OS that is included in the disk if creating a VM from + # user-image or a specialized VHD.

    Possible values are:

    + # **Windows**

    **Linux**. Possible values include: 'Windows', + # 'Linux' attr_accessor :os_type - # @return [VirtualHardDisk] The Source User Image VirtualHardDisk. This - # VirtualHardDisk will be copied before using it to attach to the Virtual - # Machine. If SourceImage is provided, the destination VirtualHardDisk - # should not exist. + # @return [VirtualHardDisk] Specifies information about the unmanaged + # user image to base the scale set on. attr_accessor :image - # @return [Array] The list of virtual hard disk container uris. + # @return [Array] Specifies the container urls that are used to + # store operating system disks for the scale set. attr_accessor :vhd_containers # @return [VirtualMachineScaleSetManagedDiskParameters] The managed disk diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb old mode 100755 new mode 100644 index c3392d2a51..fd3e55f74a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,28 +12,69 @@ class VirtualMachineScaleSetOSProfile include MsRestAzure - include MsRest::JSONable - # @return [String] The computer name prefix. + # @return [String] Specifies the computer name prefix for all of the + # virtual machines in the scale set. Computer name prefixes must be 1 to + # 15 characters long. attr_accessor :computer_name_prefix - # @return [String] The admin user name. + # @return [String] Specifies the name of the administrator account. + #

    **Windows-only restriction:** Cannot end in "."

    + # **Disallowed values:** "administrator", "admin", "user", "user1", + # "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + # "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", + # "guest", "john", "owner", "root", "server", "sql", "support", + # "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    + # **Minimum-length (Linux):** 1 character

    **Max-length + # (Linux):** 64 characters

    **Max-length (Windows):** 20 + # characters

  • For root access to the Linux VM, see [Using + # root privileges on Linux virtual machines in + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + # For a list of built-in system users on Linux that should not be used in + # this field, see [Selecting User Names for Linux on + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) attr_accessor :admin_username - # @return [String] The admin user password. + # @return [String] Specifies the password of the administrator account. + #

    **Minimum-length (Windows):** 8 characters

    + # **Minimum-length (Linux):** 6 characters

    **Max-length + # (Windows):** 123 characters

    **Max-length (Linux):** 72 + # characters

    **Complexity requirements:** 3 out of 4 conditions + # below need to be fulfilled
    Has lower characters
    Has upper + # characters
    Has a digit
    Has a special character (Regex match + # [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", + # "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", + # "Password1", "Password22", "iloveyou!"

    For resetting the + # password, see [How to reset the Remote Desktop service or its login + # password in a Windows + # VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

    For resetting root password, see [Manage users, SSH, and check + # or repair disks on Azure Linux VMs using the VMAccess + # Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) attr_accessor :admin_password - # @return [String] A base-64 encoded string of custom data. + # @return [String] Specifies a base-64 encoded string of custom data. The + # base-64 encoded string is decoded to a binary array that is saved as a + # file on the Virtual Machine. The maximum length of the binary array is + # 65535 bytes.

    For using cloud-init for your VM, see [Using + # cloud-init to customize a Linux VM during + # creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) attr_accessor :custom_data - # @return [WindowsConfiguration] The Windows Configuration of the OS - # profile. + # @return [WindowsConfiguration] Specifies Windows operating system + # settings on the virtual machine. attr_accessor :windows_configuration - # @return [LinuxConfiguration] The Linux Configuration of the OS profile. + # @return [LinuxConfiguration] Specifies the Linux operating system + # settings on the virtual machine.

    For a list of supported Linux + # distributions, see [Linux on Azure-Endorsed + # Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + #

    For running non-endorsed distributions, see [Information for + # Non-Endorsed + # Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). attr_accessor :linux_configuration - # @return [Array] The List of certificates for addition - # to the VM. + # @return [Array] Specifies set of certificates that + # should be installed onto the virtual machines in the scale set. attr_accessor :secrets diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb old mode 100755 new mode 100644 index ec0b9da3ac..8b68c06a1a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class VirtualMachineScaleSetPublicIPAddressConfiguration include MsRestAzure - include MsRest::JSONable # @return [String] The publicIP address configuration name. attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb old mode 100755 new mode 100644 index 1291a4a7ac..19c9fca2ed --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings include MsRestAzure - include MsRest::JSONable # @return [String] The Domain name label.The concatenation of the domain # name label and vm index will be the domain name labels of the # PublicIPAddress resources that will be created diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb old mode 100755 new mode 100644 index 60ac4a4d34..46e456d10e --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,15 +12,14 @@ class VirtualMachineScaleSetSku include MsRestAzure - include MsRest::JSONable # @return [String] The type of resource the sku applies to. attr_accessor :resource_type # @return [Sku] The Sku. attr_accessor :sku - # @return [VirtualMachineScaleSetSkuCapacity] Available scaling - # information. + # @return [VirtualMachineScaleSetSkuCapacity] Specifies the number of + # virtual machines in the scale set. attr_accessor :capacity diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb old mode 100755 new mode 100644 index 1e55ca4603..30e71937fb --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetSkuCapacity include MsRestAzure - include MsRest::JSONable # @return [Integer] The minimum capacity. attr_accessor :minimum diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb old mode 100755 new mode 100644 index 1229fa5601..7015137576 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb old mode 100755 new mode 100644 index 94e6b9d8a7..60e1336b78 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,14 +12,25 @@ class VirtualMachineScaleSetStorageProfile include MsRestAzure - include MsRest::JSONable - # @return [ImageReference] The image reference. + # @return [ImageReference] Specifies information about the image to use. + # You can specify information about platform images, marketplace images, + # or virtual machine images. This element is required when you want to + # use a platform image, marketplace image, or virtual machine image, but + # is not used in other creation operations. attr_accessor :image_reference - # @return [VirtualMachineScaleSetOSDisk] The OS disk. + # @return [VirtualMachineScaleSetOSDisk] Specifies information about the + # operating system disk used by the virtual machines in the scale set. + #

    For more information about disks, see [About disks and VHDs + # for Azure virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). attr_accessor :os_disk - # @return [Array] The data disks. + # @return [Array] Specifies the + # parameters that are used to add data disks to the virtual machines in + # the scale set.

    For more information about disks, see [About + # disks and VHDs for Azure virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). attr_accessor :data_disks diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb new file mode 100644 index 0000000000..24d6118243 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb @@ -0,0 +1,128 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Compute + module Models + # + # Describes a Virtual Machine Scale Set. + # + class VirtualMachineScaleSetUpdate < UpdateResource + + include MsRestAzure + + # @return [Sku] The virtual machine scale set sku. + attr_accessor :sku + + # @return [Plan] The purchase plan when deploying a virtual machine scale + # set from VM Marketplace images. + attr_accessor :plan + + # @return [UpgradePolicy] The upgrade policy. + attr_accessor :upgrade_policy + + # @return [VirtualMachineScaleSetUpdateVMProfile] The virtual machine + # profile. + attr_accessor :virtual_machine_profile + + # @return [Boolean] Specifies whether the Virtual Machine Scale Set + # should be overprovisioned. + attr_accessor :overprovision + + # @return [Boolean] When true this limits the scale set to a single + # placement group, of max size 100 virtual machines. + attr_accessor :single_placement_group + + # @return [VirtualMachineScaleSetIdentity] The identity of the virtual + # machine scale set, if configured. + attr_accessor :identity + + + # + # Mapper for VirtualMachineScaleSetUpdate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdate', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdate', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + plan: { + required: false, + serialized_name: 'plan', + type: { + name: 'Composite', + class_name: 'Plan' + } + }, + upgrade_policy: { + required: false, + serialized_name: 'properties.upgradePolicy', + type: { + name: 'Composite', + class_name: 'UpgradePolicy' + } + }, + virtual_machine_profile: { + required: false, + serialized_name: 'properties.virtualMachineProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateVMProfile' + } + }, + overprovision: { + required: false, + serialized_name: 'properties.overprovision', + type: { + name: 'Boolean' + } + }, + single_placement_group: { + required: false, + serialized_name: 'properties.singlePlacementGroup', + type: { + name: 'Boolean' + } + }, + identity: { + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetIdentity' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb new file mode 100644 index 0000000000..9add94d99a --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.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::ARM::Compute + module Models + # + # Describes a virtual machine scale set network profile's IP configuration. + # + class VirtualMachineScaleSetUpdateIPConfiguration < SubResource + + include MsRestAzure + + # @return [String] The IP configuration name. + attr_accessor :name + + # @return [ApiEntityReference] The subnet. + attr_accessor :subnet + + # @return [Boolean] Specifies the primary IP Configuration in case the + # network interface has more than one IP Configuration. + attr_accessor :primary + + # @return [VirtualMachineScaleSetUpdatePublicIPAddressConfiguration] The + # publicIPAddressConfiguration. + attr_accessor :public_ipaddress_configuration + + # @return [IPVersion] Available from Api-Version 2017-03-30 onwards, it + # represents whether the specific ipconfiguration is IPv4 or IPv6. + # Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + # Possible values include: 'IPv4', 'IPv6' + attr_accessor :private_ipaddress_version + + # @return [Array] The application gateway backend address + # pools. + attr_accessor :application_gateway_backend_address_pools + + # @return [Array] The load balancer backend address pools. + attr_accessor :load_balancer_backend_address_pools + + # @return [Array] The load balancer inbound nat pools. + attr_accessor :load_balancer_inbound_nat_pools + + + # + # Mapper for VirtualMachineScaleSetUpdateIPConfiguration class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateIPConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateIPConfiguration', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + subnet: { + required: false, + serialized_name: 'properties.subnet', + type: { + name: 'Composite', + class_name: 'ApiEntityReference' + } + }, + primary: { + required: false, + serialized_name: 'properties.primary', + type: { + name: 'Boolean' + } + }, + public_ipaddress_configuration: { + required: false, + serialized_name: 'properties.publicIPAddressConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration' + } + }, + private_ipaddress_version: { + required: false, + serialized_name: 'properties.privateIPAddressVersion', + type: { + name: 'String' + } + }, + application_gateway_backend_address_pools: { + required: false, + serialized_name: 'properties.applicationGatewayBackendAddressPools', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SubResourceElementType', + type: { + name: 'Composite', + class_name: 'SubResource' + } + } + } + }, + load_balancer_backend_address_pools: { + required: false, + serialized_name: 'properties.loadBalancerBackendAddressPools', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SubResourceElementType', + type: { + name: 'Composite', + class_name: 'SubResource' + } + } + } + }, + load_balancer_inbound_nat_pools: { + required: false, + serialized_name: 'properties.loadBalancerInboundNatPools', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SubResourceElementType', + type: { + name: 'Composite', + class_name: 'SubResource' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb new file mode 100644 index 0000000000..3838338d84 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb @@ -0,0 +1,116 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Compute + module Models + # + # Describes a virtual machine scale set network profile's network + # configurations. + # + class VirtualMachineScaleSetUpdateNetworkConfiguration < SubResource + + include MsRestAzure + + # @return [String] The network configuration name. + attr_accessor :name + + # @return [Boolean] Whether this is a primary NIC on a virtual machine. + attr_accessor :primary + + # @return [Boolean] Specifies whether the network interface is + # accelerated networking-enabled. + attr_accessor :enable_accelerated_networking + + # @return [SubResource] The network security group. + attr_accessor :network_security_group + + # @return [VirtualMachineScaleSetNetworkConfigurationDnsSettings] The dns + # settings to be applied on the network interfaces. + attr_accessor :dns_settings + + # @return [Array] The + # virtual machine scale set IP Configuration. + attr_accessor :ip_configurations + + + # + # Mapper for VirtualMachineScaleSetUpdateNetworkConfiguration class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateNetworkConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateNetworkConfiguration', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + primary: { + required: false, + serialized_name: 'properties.primary', + type: { + name: 'Boolean' + } + }, + enable_accelerated_networking: { + required: false, + serialized_name: 'properties.enableAcceleratedNetworking', + type: { + name: 'Boolean' + } + }, + network_security_group: { + required: false, + serialized_name: 'properties.networkSecurityGroup', + type: { + name: 'Composite', + class_name: 'SubResource' + } + }, + dns_settings: { + required: false, + serialized_name: 'properties.dnsSettings', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetNetworkConfigurationDnsSettings' + } + }, + ip_configurations: { + required: false, + serialized_name: 'properties.ipConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateIPConfigurationElementType', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateIPConfiguration' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb new file mode 100644 index 0000000000..0ecc1a0dc5 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.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::ARM::Compute + module Models + # + # Describes a virtual machine scale set network profile. + # + class VirtualMachineScaleSetUpdateNetworkProfile + + include MsRestAzure + + # @return [Array] The + # list of network configurations. + attr_accessor :network_interface_configurations + + + # + # Mapper for VirtualMachineScaleSetUpdateNetworkProfile class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateNetworkProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateNetworkProfile', + model_properties: { + network_interface_configurations: { + required: false, + serialized_name: 'networkInterfaceConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateNetworkConfigurationElementType', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateNetworkConfiguration' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb new file mode 100644 index 0000000000..7410824a05 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.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::ARM::Compute + module Models + # + # Describes virtual machine scale set operating system disk Update Object. + # This should be used for Updating VMSS OS Disk. + # + class VirtualMachineScaleSetUpdateOSDisk + + include MsRestAzure + + # @return [CachingTypes] The caching type. Possible values include: + # 'None', 'ReadOnly', 'ReadWrite' + attr_accessor :caching + + # @return [VirtualHardDisk] The Source User Image VirtualHardDisk. This + # VirtualHardDisk will be copied before using it to attach to the Virtual + # Machine. If SourceImage is provided, the destination VirtualHardDisk + # should not exist. + attr_accessor :image + + # @return [Array] The list of virtual hard disk container uris. + attr_accessor :vhd_containers + + # @return [VirtualMachineScaleSetManagedDiskParameters] The managed disk + # parameters. + attr_accessor :managed_disk + + + # + # Mapper for VirtualMachineScaleSetUpdateOSDisk class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateOSDisk', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateOSDisk', + model_properties: { + caching: { + required: false, + serialized_name: 'caching', + type: { + name: 'Enum', + module: 'CachingTypes' + } + }, + image: { + required: false, + serialized_name: 'image', + type: { + name: 'Composite', + class_name: 'VirtualHardDisk' + } + }, + vhd_containers: { + required: false, + serialized_name: 'vhdContainers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + managed_disk: { + required: false, + serialized_name: 'managedDisk', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetManagedDiskParameters' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb new file mode 100644 index 0000000000..a231ea1453 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Compute + module Models + # + # Describes a virtual machine scale set OS profile. + # + class VirtualMachineScaleSetUpdateOSProfile + + include MsRestAzure + + # @return [String] A base-64 encoded string of custom data. + attr_accessor :custom_data + + # @return [WindowsConfiguration] The Windows Configuration of the OS + # profile. + attr_accessor :windows_configuration + + # @return [LinuxConfiguration] The Linux Configuration of the OS profile. + attr_accessor :linux_configuration + + # @return [Array] The List of certificates for addition + # to the VM. + attr_accessor :secrets + + + # + # Mapper for VirtualMachineScaleSetUpdateOSProfile class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateOSProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateOSProfile', + model_properties: { + custom_data: { + required: false, + serialized_name: 'customData', + type: { + name: 'String' + } + }, + windows_configuration: { + required: false, + serialized_name: 'windowsConfiguration', + type: { + name: 'Composite', + class_name: 'WindowsConfiguration' + } + }, + linux_configuration: { + required: false, + serialized_name: 'linuxConfiguration', + type: { + name: 'Composite', + class_name: 'LinuxConfiguration' + } + }, + secrets: { + required: false, + serialized_name: 'secrets', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VaultSecretGroupElementType', + type: { + name: 'Composite', + class_name: 'VaultSecretGroup' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb new file mode 100644 index 0000000000..2f1994d06e --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.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::ARM::Compute + module Models + # + # Describes a virtual machines scale set IP Configuration's PublicIPAddress + # configuration + # + class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + + include MsRestAzure + + # @return [String] The publicIP address configuration name. + attr_accessor :name + + # @return [Integer] The idle timeout of the public IP address. + attr_accessor :idle_timeout_in_minutes + + # @return [VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings] + # The dns settings to be applied on the publicIP addresses . + attr_accessor :dns_settings + + + # + # Mapper for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration + # class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + idle_timeout_in_minutes: { + required: false, + serialized_name: 'properties.idleTimeoutInMinutes', + type: { + name: 'Number' + } + }, + dns_settings: { + required: false, + serialized_name: 'properties.dnsSettings', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb new file mode 100644 index 0000000000..22f03a98ea --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.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::ARM::Compute + module Models + # + # Describes a virtual machine scale set storage profile. + # + class VirtualMachineScaleSetUpdateStorageProfile + + include MsRestAzure + + # @return [ImageReference] The image reference. + attr_accessor :image_reference + + # @return [VirtualMachineScaleSetUpdateOSDisk] The OS disk. + attr_accessor :os_disk + + # @return [Array] The data disks. + attr_accessor :data_disks + + + # + # Mapper for VirtualMachineScaleSetUpdateStorageProfile class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateStorageProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateStorageProfile', + model_properties: { + image_reference: { + required: false, + serialized_name: 'imageReference', + type: { + name: 'Composite', + class_name: 'ImageReference' + } + }, + os_disk: { + required: false, + serialized_name: 'osDisk', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateOSDisk' + } + }, + data_disks: { + required: false, + serialized_name: 'dataDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VirtualMachineScaleSetDataDiskElementType', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetDataDisk' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb new file mode 100644 index 0000000000..82ee089250 --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb @@ -0,0 +1,105 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Compute + module Models + # + # Describes a virtual machine scale set virtual machine profile. + # + class VirtualMachineScaleSetUpdateVMProfile + + include MsRestAzure + + # @return [VirtualMachineScaleSetUpdateOSProfile] The virtual machine + # scale set OS profile. + attr_accessor :os_profile + + # @return [VirtualMachineScaleSetUpdateStorageProfile] The virtual + # machine scale set storage profile. + attr_accessor :storage_profile + + # @return [VirtualMachineScaleSetUpdateNetworkProfile] The virtual + # machine scale set network profile. + attr_accessor :network_profile + + # @return [DiagnosticsProfile] The virtual machine scale set diagnostics + # profile. + attr_accessor :diagnostics_profile + + # @return [VirtualMachineScaleSetExtensionProfile] The virtual machine + # scale set extension profile. + attr_accessor :extension_profile + + # @return [String] The license type, which is for bring your own license + # scenario. + attr_accessor :license_type + + + # + # Mapper for VirtualMachineScaleSetUpdateVMProfile class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineScaleSetUpdateVMProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateVMProfile', + model_properties: { + os_profile: { + required: false, + serialized_name: 'osProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateOSProfile' + } + }, + storage_profile: { + required: false, + serialized_name: 'storageProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateStorageProfile' + } + }, + network_profile: { + required: false, + serialized_name: 'networkProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetUpdateNetworkProfile' + } + }, + diagnostics_profile: { + required: false, + serialized_name: 'diagnosticsProfile', + type: { + name: 'Composite', + class_name: 'DiagnosticsProfile' + } + }, + extension_profile: { + required: false, + serialized_name: 'extensionProfile', + type: { + name: 'Composite', + class_name: 'VirtualMachineScaleSetExtensionProfile' + } + }, + license_type: { + required: false, + serialized_name: 'licenseType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb old mode 100755 new mode 100644 index 170c426641..f338c49c28 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes a virtual machine scale set virtual machine. # - class VirtualMachineScaleSetVM < MsRestAzure::Resource + class VirtualMachineScaleSetVM < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The virtual machine instance ID. attr_accessor :instance_id @@ -29,35 +28,61 @@ class VirtualMachineScaleSetVM < MsRestAzure::Resource # @return [VirtualMachineInstanceView] The virtual machine instance view. attr_accessor :instance_view - # @return [HardwareProfile] The hardware profile. + # @return [HardwareProfile] Specifies the hardware settings for the + # virtual machine. attr_accessor :hardware_profile - # @return [StorageProfile] The storage profile. + # @return [StorageProfile] Specifies the storage settings for the virtual + # machine disks. attr_accessor :storage_profile - # @return [OSProfile] The OS profile. + # @return [OSProfile] Specifies the operating system settings for the + # virtual machine. attr_accessor :os_profile - # @return [NetworkProfile] The network profile. + # @return [NetworkProfile] Specifies the network interfaces of the + # virtual machine. attr_accessor :network_profile - # @return [DiagnosticsProfile] The diagnostics profile. + # @return [DiagnosticsProfile] Specifies the boot diagnostic settings + # state.

    Minimum api-version: 2015-06-15. attr_accessor :diagnostics_profile - # @return [SubResource] The reference Id of the availability set to which - # this virtual machine belongs. + # @return [SubResource] Specifies information about the availability set + # that the virtual machine should be assigned to. Virtual machines + # specified in the same availability set are allocated to different nodes + # to maximize availability. For more information about availability sets, + # see [Manage the availability of virtual + # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + #

    For more information on Azure planned maintainance, see + # [Planned maintenance for virtual machines in + # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

    Currently, a VM can only be added to availability set at + # creation time. An existing VM cannot be added to an availability set. attr_accessor :availability_set # @return [String] The provisioning state, which only appears in the # response. attr_accessor :provisioning_state - # @return [String] The license type, which is for bring your own license - # scenario. + # @return [String] Specifies that the image or disk that is being used + # was licensed on-premises. This element is only used for images that + # contain the Windows Server operating system.

    Possible values + # are:

    Windows_Client

    Windows_Server

    If this + # element is included in a request for an update, the value must match + # the initial value. This value cannot be updated.

    For more + # information, see [Azure Hybrid Use Benefit for Windows + # Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

    Minimum api-version: 2015-06-15 attr_accessor :license_type - # @return [Plan] The purchase plan when deploying virtual machine from VM - # Marketplace images. + # @return [Plan] Specifies information about the marketplace image used + # to create the virtual machine. This element is only used for + # marketplace images. Before you can use a marketplace image from an API, + # you must enable the image for programmatic use. In the Azure portal, + # find the marketplace image that you want to use and then click **Want + # to deploy programmatically, Get Started ->**. Enter any required + # information and then click **Save**. attr_accessor :plan # @return [Array] The virtual machine child diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb old mode 100755 new mode 100644 index dca596dedd..bae44b7426 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetVMExtensionsSummary include MsRestAzure - include MsRest::JSONable # @return [String] The extension name. attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb old mode 100755 new mode 100644 index afe6ca1cad..f94b84a88e --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetVMInstanceIDs include MsRestAzure - include MsRest::JSONable # @return [Array] The virtual machine scale set instance ids. # Omitting the virtual machine scale set instance ids will result in the # operation being performed on all virtual machines in the virtual diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb old mode 100755 new mode 100644 index a003b1947d..d0e4e6277e --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetVMInstanceRequiredIDs include MsRestAzure - include MsRest::JSONable # @return [Array] The virtual machine scale set instance ids. attr_accessor :instance_ids diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb old mode 100755 new mode 100644 index 0316fb7189..17434b0594 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineScaleSetVMInstanceView include MsRestAzure - include MsRest::JSONable # @return [Integer] The Update Domain count. attr_accessor :platform_update_domain @@ -33,7 +32,15 @@ class VirtualMachineScaleSetVMInstanceView # information. attr_accessor :extensions - # @return [BootDiagnosticsInstanceView] The boot diagnostics. + # @return [VirtualMachineHealthStatus] The health status for the VM. + attr_accessor :vm_health + + # @return [BootDiagnosticsInstanceView] Boot Diagnostics is a debugging + # feature which allows you to view Console Output and Screenshot to + # diagnose VM status.

    For Linux Virtual Machines, you can easily + # view the output of your console log.

    For both Windows and + # Linux virtual machines, Azure also enables you to see a screenshot of + # the VM from the hypervisor. attr_accessor :boot_diagnostics # @return [Array] The resource status information. @@ -115,6 +122,15 @@ def self.mapper() } } }, + vm_health: { + required: false, + read_only: true, + serialized_name: 'vmHealth', + type: { + name: 'Composite', + class_name: 'VirtualMachineHealthStatus' + } + }, boot_diagnostics: { required: false, serialized_name: 'bootDiagnostics', diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb old mode 100755 new mode 100644 index aea6f27c0f..e62c3e75c9 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb old mode 100755 new mode 100644 index bfbcd65381..7fd12b9258 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,29 +12,36 @@ class VirtualMachineScaleSetVMProfile include MsRestAzure - include MsRest::JSONable - # @return [VirtualMachineScaleSetOSProfile] The virtual machine scale set - # OS profile. + # @return [VirtualMachineScaleSetOSProfile] Specifies the operating + # system settings for the virtual machines in the scale set. attr_accessor :os_profile - # @return [VirtualMachineScaleSetStorageProfile] The virtual machine - # scale set storage profile. + # @return [VirtualMachineScaleSetStorageProfile] Specifies the storage + # settings for the virtual machine disks. attr_accessor :storage_profile - # @return [VirtualMachineScaleSetNetworkProfile] The virtual machine - # scale set network profile. + # @return [VirtualMachineScaleSetNetworkProfile] Specifies properties of + # the network interfaces of the virtual machines in the scale set. attr_accessor :network_profile - # @return [DiagnosticsProfile] The virtual machine scale set diagnostics - # profile. + # @return [DiagnosticsProfile] Specifies the boot diagnostic settings + # state.

    Minimum api-version: 2015-06-15. attr_accessor :diagnostics_profile - # @return [VirtualMachineScaleSetExtensionProfile] The virtual machine - # scale set extension profile. + # @return [VirtualMachineScaleSetExtensionProfile] Specifies a collection + # of settings for extensions installed on virtual machines in the scale + # set. attr_accessor :extension_profile - # @return [String] The license type, which is for bring your own license - # scenario. + # @return [String] Specifies that the image or disk that is being used + # was licensed on-premises. This element is only used for images that + # contain the Windows Server operating system.

    Possible values + # are:

    Windows_Client

    Windows_Server

    If this + # element is included in a request for an update, the value must match + # the initial value. This value cannot be updated.

    For more + # information, see [Azure Hybrid Use Benefit for Windows + # Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + #

    Minimum api-version: 2015-06-15 attr_accessor :license_type diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size.rb old mode 100755 new mode 100644 index 6387843e19..4b8087d72b --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineSize include MsRestAzure - include MsRest::JSONable # @return [String] The name of the virtual machine size. attr_accessor :name diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb old mode 100755 new mode 100644 index fde9516584..9b6bbee8e4 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualMachineSizeListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of virtual machine sizes. attr_accessor :value diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb old mode 100755 new mode 100644 index c5198b0072..70e75cdcc5 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb old mode 100755 new mode 100644 index f18d8530d0..22ed6e83d2 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class VirtualMachineStatusCodeCount include MsRestAzure - include MsRest::JSONable # @return [String] The instance view status code. attr_accessor :code diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmconfiguration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmconfiguration.rb old mode 100755 new mode 100644 index 2f89926d63..bd4037ba7f --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmconfiguration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WinRMConfiguration include MsRestAzure - include MsRest::JSONable # @return [Array] The list of Windows Remote Management # listeners attr_accessor :listeners diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmlistener.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmlistener.rb old mode 100755 new mode 100644 index 3a07dff854..d290ed443d --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmlistener.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/win_rmlistener.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,13 +12,19 @@ class WinRMListener include MsRestAzure - include MsRest::JSONable - # @return [ProtocolTypes] The Protocol used by the WinRM listener. Http - # and Https are supported. Possible values include: 'Http', 'Https' + # @return [ProtocolTypes] Specifies the protocol of listener.

    + # Possible values are:
    **http**

    **https**. Possible values + # include: 'Http', 'Https' attr_accessor :protocol - # @return [String] The Certificate URL in KMS for Https listeners. Should - # be null for Http listeners. + # @return [String] This is the URL of a certificate that has been + # uploaded to Key Vault as a secret. For adding a secret to the Key + # Vault, see [Add a key or secret to the key + # vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). + # In this case, your certificate needs to be It is the Base64 encoding of + # the following JSON Object which is encoded in UTF-8:

    {
    + # "data":"",
    "dataType":"pfx",
    + # "password":""
    } attr_accessor :certificate_url diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/windows_configuration.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/windows_configuration.rb old mode 100755 new mode 100644 index 9e0ea6e883..2d209466a8 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/windows_configuration.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/models/windows_configuration.rb @@ -1,37 +1,39 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # - # Describes Windows Configuration of the OS Profile. + # Specifies Windows operating system settings on the virtual machine. # class WindowsConfiguration include MsRestAzure - include MsRest::JSONable - # @return [Boolean] Indicates whether the virtual machine agent should be - # provisioned on the Virtual Machine. If not specified, then the default - # behavior is to set it to true. + # @return [Boolean] Indicates whether virtual machine agent should be + # provisioned on the virtual machine.

    When this property is not + # specified in the request body, default behavior is to set it to true. + # This will ensure that VM Agent is installed on the VM so that + # extensions can be added to the VM later. attr_accessor :provision_vmagent - # @return [Boolean] Indicates whether Windows updates are automatically - # installed on the VM. + # @return [Boolean] Indicates whether virtual machine is enabled for + # automatic updates. attr_accessor :enable_automatic_updates - # @return [String] The time zone of the VM + # @return [String] Specifies the time zone of the virtual machine. e.g. + # "Pacific Standard Time" attr_accessor :time_zone - # @return [Array] Additional base-64 encoded - # XML formatted information that can be included in the Unattend.xml - # file. + # @return [Array] Specifies additional base-64 + # encoded XML formatted information that can be included in the + # Unattend.xml file, which is used by Windows Setup. attr_accessor :additional_unattend_content - # @return [WinRMConfiguration] The Windows Remote Management - # configuration of the VM + # @return [WinRMConfiguration] Specifies the Windows Remote Management + # listeners. This enables remote Windows PowerShell. attr_accessor :win_rm diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/module_definition.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/module_definition.rb old mode 100755 new mode 100644 index 4a5fbc49e5..6c40a5ec65 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/module_definition.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/resource_skus.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/resource_skus.rb old mode 100755 new mode 100644 index 58b1b67bf6..5688eab5ce --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/resource_skus.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/resource_skus.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/snapshots.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/snapshots.rb old mode 100755 new mode 100644 index 58dd75f6a0..e3545f8a07 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/snapshots.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/snapshots.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/usage_operations.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/usage_operations.rb old mode 100755 new mode 100644 index ff522ef436..0dccfd8582 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/usage_operations.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/usage_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/version.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/version.rb old mode 100755 new mode 100644 index 42f478373e..59fb6178a1 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/version.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb old mode 100755 new mode 100644 index 7c67025fe3..03324c031b --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb old mode 100755 new mode 100644 index ae472d3b50..dff7e0a929 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_images.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_images.rb old mode 100755 new mode 100644 index 86e4de3e85..af3d4de261 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_images.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_images.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_run_commands.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_run_commands.rb old mode 100755 new mode 100644 index 0a0ca00dfc..f13c59d82a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_run_commands.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb old mode 100755 new mode 100644 index 02f4ec1866..64e37bb6a0 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb new file mode 100644 index 0000000000..a3558f6ede --- /dev/null +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb @@ -0,0 +1,390 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Compute + # + # Compute Client + # + class VirtualMachineScaleSetRollingUpgrades + include MsRestAzure + + # + # Creates and initializes a new instance of the VirtualMachineScaleSetRollingUpgrades class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ComputeManagementClient] reference to the ComputeManagementClient + attr_reader :client + + # + # Cancels the current virtual machine scale set rolling upgrade. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationStatusResponse] operation results. + # + def cancel(resource_group_name, vm_scale_set_name, custom_headers = nil) + response = cancel_async(resource_group_name, vm_scale_set_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @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 cancel_async(resource_group_name, vm_scale_set_name, custom_headers = nil) + # Send request + promise = begin_cancel_async(resource_group_name, vm_scale_set_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Compute::Models::OperationStatusResponse.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Starts a rolling upgrade to move all virtual machine scale set instances to + # the latest available Platform Image OS version. Instances which are already + # running the latest available OS version are not affected. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationStatusResponse] operation results. + # + def start_osupgrade(resource_group_name, vm_scale_set_name, custom_headers = nil) + response = start_osupgrade_async(resource_group_name, vm_scale_set_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @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 start_osupgrade_async(resource_group_name, vm_scale_set_name, custom_headers = nil) + # Send request + promise = begin_start_osupgrade_async(resource_group_name, vm_scale_set_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Compute::Models::OperationStatusResponse.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 latest virtual machine scale set rolling upgrade. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RollingUpgradeStatusInfo] operation results. + # + def get_latest(resource_group_name, vm_scale_set_name, custom_headers = nil) + response = get_latest_async(resource_group_name, vm_scale_set_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the status of the latest virtual machine scale set rolling upgrade. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_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_latest_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil) + get_latest_async(resource_group_name, vm_scale_set_name, custom_headers).value! + end + + # + # Gets the status of the latest virtual machine scale set rolling upgrade. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param [Hash{String => String}] 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_latest_async(resource_group_name, vm_scale_set_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? + api_version = '2017-03-30' + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Compute::Models::RollingUpgradeStatusInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Cancels the current virtual machine scale set rolling upgrade. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationStatusResponse] operation results. + # + def begin_cancel(resource_group_name, vm_scale_set_name, custom_headers = nil) + response = begin_cancel_async(resource_group_name, vm_scale_set_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Cancels the current virtual machine scale set rolling upgrade. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_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_cancel_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil) + begin_cancel_async(resource_group_name, vm_scale_set_name, custom_headers).value! + end + + # + # Cancels the current virtual machine scale set rolling upgrade. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param [Hash{String => String}] 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_cancel_async(resource_group_name, vm_scale_set_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? + api_version = '2017-03-30' + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Compute::Models::OperationStatusResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Starts a rolling upgrade to move all virtual machine scale set instances to + # the latest available Platform Image OS version. Instances which are already + # running the latest available OS version are not affected. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationStatusResponse] operation results. + # + def begin_start_osupgrade(resource_group_name, vm_scale_set_name, custom_headers = nil) + response = begin_start_osupgrade_async(resource_group_name, vm_scale_set_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Starts a rolling upgrade to move all virtual machine scale set instances to + # the latest available Platform Image OS version. Instances which are already + # running the latest available OS version are not affected. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param custom_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_start_osupgrade_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil) + begin_start_osupgrade_async(resource_group_name, vm_scale_set_name, custom_headers).value! + end + + # + # Starts a rolling upgrade to move all virtual machine scale set instances to + # the latest available Platform Image OS version. Instances which are already + # running the latest available OS version are not affected. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set. + # @param [Hash{String => String}] 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_start_osupgrade_async(resource_group_name, vm_scale_set_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? + api_version = '2017-03-30' + 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.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Compute::Models::OperationStatusResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb old mode 100755 new mode 100644 index c11e7eca80..1792e4af7d --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb old mode 100755 new mode 100644 index 003572f3df..d0a56cd020 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -67,6 +67,52 @@ def create_or_update_async(resource_group_name, vm_scale_set_name, parameters, c promise end + # + # Update a VM scale set. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set to create or + # update. + # @param parameters [VirtualMachineScaleSetUpdate] The scale set object. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualMachineScaleSet] operation results. + # + def update(resource_group_name, vm_scale_set_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set to create or + # update. + # @param parameters [VirtualMachineScaleSetUpdate] The scale set object. + # @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, vm_scale_set_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Compute::Models::VirtualMachineScaleSet.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + # # Deletes a VM scale set. # @@ -1056,6 +1102,113 @@ def begin_create_or_update_async(resource_group_name, vm_scale_set_name, paramet promise.execute end + # + # Update a VM scale set. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set to create or + # update. + # @param parameters [VirtualMachineScaleSetUpdate] The scale set object. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualMachineScaleSet] operation results. + # + def begin_update(resource_group_name, vm_scale_set_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update a VM scale set. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set to create or + # update. + # @param parameters [VirtualMachineScaleSetUpdate] The scale set object. + # @param custom_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, vm_scale_set_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers).value! + end + + # + # Update a VM scale set. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_scale_set_name [String] The name of the VM scale set to create or + # update. + # @param parameters [VirtualMachineScaleSetUpdate] The scale set object. + # @param [Hash{String => String}] 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, vm_scale_set_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2017-03-30' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Compute::Models::VirtualMachineScaleSetUpdate.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.Compute/virtualMachineScaleSets/{vmScaleSetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Compute::Models::VirtualMachineScaleSet.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Deletes a VM scale set. # diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb old mode 100755 new mode 100644 index 1ef6cd8ff2..bfb41287b6 --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machines.rb b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machines.rb old mode 100755 new mode 100644 index 8176788977..a6252e6c2a --- a/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machines.rb +++ b/management/azure_mgmt_compute/lib/generated/azure_mgmt_compute/virtual_machines.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -256,6 +256,97 @@ def get_async(resource_group_name, vm_name, expand = nil, custom_headers = nil) promise.execute end + # + # Retrieves information about the run-time state of a virtual machine. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_name [String] The name of the virtual machine. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualMachineInstanceView] operation results. + # + def instance_view(resource_group_name, vm_name, custom_headers = nil) + response = instance_view_async(resource_group_name, vm_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves information about the run-time state of a virtual machine. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_name [String] The name of the virtual machine. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def instance_view_with_http_info(resource_group_name, vm_name, custom_headers = nil) + instance_view_async(resource_group_name, vm_name, custom_headers).value! + end + + # + # Retrieves information about the run-time state of a virtual machine. + # + # @param resource_group_name [String] The name of the resource group. + # @param vm_name [String] The name of the virtual machine. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def instance_view_async(resource_group_name, vm_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'vm_name is nil' if vm_name.nil? + api_version = '2017-03-30' + 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.Compute/virtualMachines/{vmName}/instanceView' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Compute::Models::VirtualMachineInstanceView.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Converts virtual machine disks from blob-based to managed disks. Virtual # machine must be stop-deallocated before invoking this operation. diff --git a/management/azure_mgmt_compute/spec/virtual_machines_spec.rb b/management/azure_mgmt_compute/spec/virtual_machines_spec.rb index 9aa90e0f7f..6505583e1f 100644 --- a/management/azure_mgmt_compute/spec/virtual_machines_spec.rb +++ b/management/azure_mgmt_compute/spec/virtual_machines_spec.rb @@ -113,11 +113,11 @@ ni = network_client.make_request(:get, ni_path, options) expect(ni).not_to be_nil # user NetworkInterface mapper to deserialize object - ni_instance = NetworkInterface.new.from_json(ni) + ni_instance = network_client.deserialize(NetworkInterface.mapper(), ni) # retrieve first IP address for first IP configuration ip_address_path = ni_instance.ip_configurations[0].public_ipaddress.id ip_address = network_client.make_request(:get, ip_address_path, options) - ip_address_instance = PublicIPAddress.new.from_json(ip_address) + ip_address_instance = network_client.deserialize(PublicIPAddress.mapper(), ip_address) expect(ip_address_instance.dns_settings.fqdn).to eq("testdomain53464.westus.cloudapp.azure.com") end @@ -135,7 +135,8 @@ result = @resource_helper.network_client.network_interfaces.list_all result.each do |network_interface| - expect(network_interface.virtual_machine).to be_an_instance_of(MsRestAzure::SubResource) + #Refer specification: https://github.com/Azure/azure-rest-api-specs/blob/ec9a03762fc8fd58fbee71cdbd18d1f4b28f168f/specification/network/resource-manager/Microsoft.Network/2017-09-01/networkInterface.json#L624 + expect(network_interface.virtual_machine).to be_an_instance_of(Azure::ARM::Network::Models::SubResource) end end diff --git a/management/azure_mgmt_consumption/.rspec b/management/azure_mgmt_consumption/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_consumption/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_consumption/LICENSE.txt b/management/azure_mgmt_consumption/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_consumption/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_consumption/Rakefile b/management/azure_mgmt_consumption/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_consumption/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_consumption/azure_mgmt_consumption.gemspec b/management/azure_mgmt_consumption/azure_mgmt_consumption.gemspec new file mode 100644 index 0000000000..b1c7479636 --- /dev/null +++ b/management/azure_mgmt_consumption/azure_mgmt_consumption.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_consumption/module_definition' +require 'generated/azure_mgmt_consumption/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_consumption' + spec.version = Azure::ARM::Consumption::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Consumption Services Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Consumption.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_consumption/lib/azure_mgmt_consumption.rb b/management/azure_mgmt_consumption/lib/azure_mgmt_consumption.rb new file mode 100644 index 0000000000..c73aeeabd9 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/azure_mgmt_consumption.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_consumption' + diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption.rb new file mode 100644 index 0000000000..f5c3da1edb --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption.rb @@ -0,0 +1,38 @@ +# encoding: 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 'generated/azure_mgmt_consumption/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::Consumption + autoload :UsageDetails, 'generated/azure_mgmt_consumption/usage_details.rb' + autoload :Operations, 'generated/azure_mgmt_consumption/operations.rb' + autoload :ConsumptionManagementClient, 'generated/azure_mgmt_consumption/consumption_management_client.rb' + + module Models + autoload :ErrorResponse, 'generated/azure_mgmt_consumption/models/error_response.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_consumption/models/operation_display.rb' + autoload :UsageDetailsListResult, 'generated/azure_mgmt_consumption/models/usage_details_list_result.rb' + autoload :Operation, 'generated/azure_mgmt_consumption/models/operation.rb' + autoload :MeterDetails, 'generated/azure_mgmt_consumption/models/meter_details.rb' + autoload :OperationListResult, 'generated/azure_mgmt_consumption/models/operation_list_result.rb' + autoload :ErrorDetails, 'generated/azure_mgmt_consumption/models/error_details.rb' + autoload :Resource, 'generated/azure_mgmt_consumption/models/resource.rb' + autoload :UsageDetail, 'generated/azure_mgmt_consumption/models/usage_detail.rb' + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/consumption_management_client.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/consumption_management_client.rb new file mode 100644 index 0000000000..45fdfd09f1 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/consumption_management_client.rb @@ -0,0 +1,134 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Consumption + # + # A service client - single point of access to the REST API. + # + class ConsumptionManagementClient < 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. + # The current version is 2017-02-27-preview. + attr_reader :api_version + + # @return [String] Azure Subscription ID. + 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 [UsageDetails] usage_details + attr_reader :usage_details + + # @return [Operations] operations + attr_reader :operations + + # + # Creates initializes a new instance of the ConsumptionManagementClient 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 + + @usage_details = UsageDetails.new(self) + @operations = Operations.new(self) + @api_version = '2017-04-24-preview' + @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_consumption' + if defined? Azure::ARM::Consumption::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::Consumption::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/error_details.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/error_details.rb new file mode 100644 index 0000000000..d9940e850e --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/error_details.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::ARM::Consumption + module Models + # + # The details of the error. + # + class ErrorDetails + + include MsRestAzure + + # @return [String] Error code. + attr_accessor :code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :message + + # @return [String] The target of the particular error. + attr_accessor :target + + + # + # Mapper for ErrorDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorDetails', + type: { + name: 'Composite', + class_name: 'ErrorDetails', + model_properties: { + code: { + required: false, + read_only: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + }, + target: { + required: false, + read_only: true, + serialized_name: 'target', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/error_response.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/error_response.rb new file mode 100644 index 0000000000..760cba852c --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/error_response.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::ARM::Consumption + module Models + # + # Error response indicates that the service is not able to process the + # incoming request. The reason is provided in the error message. + # + class ErrorResponse + + include MsRestAzure + + # @return [ErrorDetails] The details of the error. + attr_accessor :error + + + # + # 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: { + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'ErrorDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/meter_details.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/meter_details.rb new file mode 100644 index 0000000000..e1623f8ed8 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/meter_details.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::ARM::Consumption + module Models + # + # The properties of the meter detail. + # + class MeterDetails + + include MsRestAzure + + # @return [String] The name of the meter, within the given meter category + attr_accessor :meter_name + + # @return [String] The category of the meter, for example, 'Cloud + # services', 'Networking', etc.. + attr_accessor :meter_category + + # @return [String] The subcategory of the meter, for example, 'A6 Cloud + # services', 'ExpressRoute (IXP)', etc.. + attr_accessor :meter_sub_category + + # @return [String] The unit in which the meter consumption is charged, + # for example, 'Hours', 'GB', etc. + attr_accessor :unit + + # @return [String] The location in which the Azure service is available. + attr_accessor :meter_location + + # @return The total included quantity associated with the offer. + attr_accessor :total_included_quantity + + # @return The pretax listing price. + attr_accessor :pretax_standard_rate + + + # + # Mapper for MeterDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MeterDetails', + type: { + name: 'Composite', + class_name: 'MeterDetails', + model_properties: { + meter_name: { + required: false, + read_only: true, + serialized_name: 'meterName', + type: { + name: 'String' + } + }, + meter_category: { + required: false, + read_only: true, + serialized_name: 'meterCategory', + type: { + name: 'String' + } + }, + meter_sub_category: { + required: false, + read_only: true, + serialized_name: 'meterSubCategory', + type: { + name: 'String' + } + }, + unit: { + required: false, + read_only: true, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + meter_location: { + required: false, + read_only: true, + serialized_name: 'meterLocation', + type: { + name: 'String' + } + }, + total_included_quantity: { + required: false, + read_only: true, + serialized_name: 'totalIncludedQuantity', + type: { + name: 'Number' + } + }, + pretax_standard_rate: { + required: false, + read_only: true, + serialized_name: 'pretaxStandardRate', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation.rb new file mode 100644 index 0000000000..b3459aa0ce --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation.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::ARM::Consumption + module Models + # + # A Consumption REST API operation. + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation}. + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation_display.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation_display.rb new file mode 100644 index 0000000000..8aadcc81ce --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation_display.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::ARM::Consumption + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.Consumption. + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: + # UsageDetail, etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation_list_result.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation_list_result.rb new file mode 100644 index 0000000000..a9131c26c6 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/operation_list_result.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::ARM::Consumption + module Models + # + # Result of listing consumption operations. It contains a list of + # operations and a URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of consumption operations supported by + # the Microsoft.Consumption 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/resource.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/resource.rb new file mode 100644 index 0000000000..f74ee3cd9a --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/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::ARM::Consumption + module Models + # + # The Resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + tags: { + required: false, + read_only: true, + 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_consumption/lib/generated/azure_mgmt_consumption/models/usage_detail.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/usage_detail.rb new file mode 100644 index 0000000000..08b3210b24 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/usage_detail.rb @@ -0,0 +1,258 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Consumption + module Models + # + # An usage detail resource. + # + class UsageDetail < Resource + + include MsRestAzure + + # @return [String] The id of the billing period resource that the usage + # belongs to. + attr_accessor :billing_period_id + + # @return [String] The id of the invoice resource that the usage belongs + # to. + attr_accessor :invoice_id + + # @return [DateTime] The start of the date time range covered by the + # usage detail. + attr_accessor :usage_start + + # @return [DateTime] The end of the date time range covered by the usage + # detail. + attr_accessor :usage_end + + # @return [String] The name of the resource instance that the usage is + # about. + attr_accessor :instance_name + + # @return [String] The uri of the resource instance that the usage is + # about. + attr_accessor :instance_id + + # @return [String] The location of the resource instance that the usage + # is about. + attr_accessor :instance_location + + # @return [String] The ISO currency in which the meter is charged, for + # example, USD. + attr_accessor :currency + + # @return The quantity of usage. + attr_accessor :usage_quantity + + # @return The billable usage quantity. + attr_accessor :billable_quantity + + # @return The amount of cost before tax. + attr_accessor :pretax_cost + + # @return [Boolean] The estimated usage is subject to change. + attr_accessor :is_estimated + + # @return [String] The meter id. + attr_accessor :meter_id + + # @return [MeterDetails] The details about the meter. By default this is + # not populated, unless it's specified in $expand. + attr_accessor :meter_details + + # @return [Hash{String => String}] The list of key/value pairs for the + # additional properties, in the format 'key':'value' where key = the + # field name, and value = the field value. By default this is not + # populated, unless it's specified in $expand. + attr_accessor :additional_properties + + + # + # Mapper for UsageDetail class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UsageDetail', + type: { + name: 'Composite', + class_name: 'UsageDetail', + 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, + read_only: true, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + billing_period_id: { + required: false, + read_only: true, + serialized_name: 'properties.billingPeriodId', + type: { + name: 'String' + } + }, + invoice_id: { + required: false, + read_only: true, + serialized_name: 'properties.invoiceId', + type: { + name: 'String' + } + }, + usage_start: { + required: false, + read_only: true, + serialized_name: 'properties.usageStart', + type: { + name: 'DateTime' + } + }, + usage_end: { + required: false, + read_only: true, + serialized_name: 'properties.usageEnd', + type: { + name: 'DateTime' + } + }, + instance_name: { + required: false, + read_only: true, + serialized_name: 'properties.instanceName', + type: { + name: 'String' + } + }, + instance_id: { + required: false, + read_only: true, + serialized_name: 'properties.instanceId', + type: { + name: 'String' + } + }, + instance_location: { + required: false, + read_only: true, + serialized_name: 'properties.instanceLocation', + type: { + name: 'String' + } + }, + currency: { + required: false, + read_only: true, + serialized_name: 'properties.currency', + type: { + name: 'String' + } + }, + usage_quantity: { + required: false, + read_only: true, + serialized_name: 'properties.usageQuantity', + type: { + name: 'Number' + } + }, + billable_quantity: { + required: false, + read_only: true, + serialized_name: 'properties.billableQuantity', + type: { + name: 'Number' + } + }, + pretax_cost: { + required: false, + read_only: true, + serialized_name: 'properties.pretaxCost', + type: { + name: 'Number' + } + }, + is_estimated: { + required: false, + read_only: true, + serialized_name: 'properties.isEstimated', + type: { + name: 'Boolean' + } + }, + meter_id: { + required: false, + read_only: true, + serialized_name: 'properties.meterId', + type: { + name: 'String' + } + }, + meter_details: { + required: false, + read_only: true, + serialized_name: 'properties.meterDetails', + type: { + name: 'Composite', + class_name: 'MeterDetails' + } + }, + additional_properties: { + required: false, + read_only: true, + serialized_name: 'properties.additionalProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/usage_details_list_result.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/usage_details_list_result.rb new file mode 100644 index 0000000000..6b90114a17 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/models/usage_details_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::ARM::Consumption + module Models + # + # Result of listing usage details. It contains a list of available usage + # details in reverse chronological order by billing period. + # + class UsageDetailsListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of usage details. + attr_accessor :value + + # @return [String] The link (url) to the next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [UsageDetailsListResult] 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 UsageDetailsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UsageDetailsListResult', + type: { + name: 'Composite', + class_name: 'UsageDetailsListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UsageDetailElementType', + type: { + name: 'Composite', + class_name: 'UsageDetail' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/module_definition.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/module_definition.rb new file mode 100644 index 0000000000..78fa9ddc20 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/module_definition.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 end +module Azure::ARM end +module Azure::ARM::Consumption end diff --git a/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/operations.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/operations.rb new file mode 100644 index 0000000000..b4e829efda --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/operations.rb @@ -0,0 +1,216 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Consumption + # + # Consumption management client provides access to consumption resources for + # Azure Web-Direct subscriptions. Other subscription types which were not + # purchased directly through the Azure web portal are not supported through + # this preview API. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ConsumptionManagementClient] reference to the ConsumptionManagementClient + attr_reader :client + + # + # Lists all of the available consumption REST API operations. + # + # @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 consumption REST API operations. + # + # @param custom_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 consumption REST API operations. + # + # @param [Hash{String => String}] 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.Consumption/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Consumption::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 consumption REST 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 [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 consumption REST 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_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 consumption REST 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_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::ARM::Consumption::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 consumption REST API operations. + # + # @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_consumption/lib/generated/azure_mgmt_consumption/usage_details.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/usage_details.rb new file mode 100644 index 0000000000..072dfae679 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/usage_details.rb @@ -0,0 +1,304 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Consumption + # + # Consumption management client provides access to consumption resources for + # Azure Web-Direct subscriptions. Other subscription types which were not + # purchased directly through the Azure web portal are not supported through + # this preview API. + # + class UsageDetails + include MsRestAzure + + # + # Creates and initializes a new instance of the UsageDetails class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ConsumptionManagementClient] reference to the ConsumptionManagementClient + attr_reader :client + + # + # Lists the usage details for a scope in reverse chronological order by billing + # period. Usage details are available via this API only for January 1, 2017 or + # later. + # + # @param scope [String] The scope of the usage details. The scope can be + # '/subscriptions/{subscriptionId}' for a subscription, or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}' + # for an invoice or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + # for a billing perdiod. + # @param expand [String] May be used to expand the additionalProperties or + # meterDetails property within a list of usage details. By default, these + # fields are not included when listing usage details. + # @param filter [String] May be used to filter usageDetails by usageEnd (Utc + # time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does + # not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(scope, expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + first_page = list_as_lazy(scope, expand, filter, skiptoken, top, custom_headers) + first_page.get_all_items + end + + # + # Lists the usage details for a scope in reverse chronological order by billing + # period. Usage details are available via this API only for January 1, 2017 or + # later. + # + # @param scope [String] The scope of the usage details. The scope can be + # '/subscriptions/{subscriptionId}' for a subscription, or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}' + # for an invoice or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + # for a billing perdiod. + # @param expand [String] May be used to expand the additionalProperties or + # meterDetails property within a list of usage details. By default, these + # fields are not included when listing usage details. + # @param filter [String] May be used to filter usageDetails by usageEnd (Utc + # time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does + # not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(scope, expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + list_async(scope, expand, filter, skiptoken, top, custom_headers).value! + end + + # + # Lists the usage details for a scope in reverse chronological order by billing + # period. Usage details are available via this API only for January 1, 2017 or + # later. + # + # @param scope [String] The scope of the usage details. The scope can be + # '/subscriptions/{subscriptionId}' for a subscription, or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}' + # for an invoice or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + # for a billing perdiod. + # @param expand [String] May be used to expand the additionalProperties or + # meterDetails property within a list of usage details. By default, these + # fields are not included when listing usage details. + # @param filter [String] May be used to filter usageDetails by usageEnd (Utc + # time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does + # not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(scope, expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + fail ArgumentError, 'scope is nil' if scope.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 = '{scope}/providers/Microsoft.Consumption/usageDetails' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'scope' => scope}, + query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Consumption::Models::UsageDetailsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 usage details for a scope in reverse chronological order by billing + # period. Usage details are available via this API only for January 1, 2017 or + # later. + # + # @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 [UsageDetailsListResult] 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 usage details for a scope in reverse chronological order by billing + # period. Usage details are available via this API only for January 1, 2017 or + # later. + # + # @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 usage details for a scope in reverse chronological order by billing + # period. Usage details are available via this API only for January 1, 2017 or + # later. + # + # @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::ARM::Consumption::Models::UsageDetailsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 usage details for a scope in reverse chronological order by billing + # period. Usage details are available via this API only for January 1, 2017 or + # later. + # + # @param scope [String] The scope of the usage details. The scope can be + # '/subscriptions/{subscriptionId}' for a subscription, or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}' + # for an invoice or + # '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + # for a billing perdiod. + # @param expand [String] May be used to expand the additionalProperties or + # meterDetails property within a list of usage details. By default, these + # fields are not included when listing usage details. + # @param filter [String] May be used to filter usageDetails by usageEnd (Utc + # time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does + # not currently support 'ne', 'or', or 'not'. + # @param skiptoken [String] Skiptoken is only used if a previous operation + # returned a partial result. If a previous response contains a nextLink + # element, the value of the nextLink element will include a skiptoken parameter + # that specifies a starting point to use for subsequent calls. + # @param top [Integer] May be used to limit the number of results to the most + # recent N usageDetails. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UsageDetailsListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(scope, expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil) + response = list_async(scope, expand, filter, skiptoken, top, 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_consumption/lib/generated/azure_mgmt_consumption/version.rb b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/version.rb new file mode 100644 index 0000000000..d21a9a67a8 --- /dev/null +++ b/management/azure_mgmt_consumption/lib/generated/azure_mgmt_consumption/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::ARM::Consumption + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_consumption/spec/spec_helper.rb b/management/azure_mgmt_consumption/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_consumption/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_container_instance/.rspec b/management/azure_mgmt_container_instance/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_container_instance/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_container_instance/LICENSE.txt b/management/azure_mgmt_container_instance/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_container_instance/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_container_instance/Rakefile b/management/azure_mgmt_container_instance/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_container_instance/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_container_instance/azure_mgmt_container_instance.gemspec b/management/azure_mgmt_container_instance/azure_mgmt_container_instance.gemspec new file mode 100644 index 0000000000..e9e8e7a434 --- /dev/null +++ b/management/azure_mgmt_container_instance/azure_mgmt_container_instance.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_container_instance/module_definition' +require 'generated/azure_mgmt_container_instance/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_container_instance' + spec.version = Azure::ARM::ContainerInstance::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Container Instance Services Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Container Instance.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_container_instance/lib/azure_mgmt_container_instance.rb b/management/azure_mgmt_container_instance/lib/azure_mgmt_container_instance.rb new file mode 100644 index 0000000000..a72ff092ea --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/azure_mgmt_container_instance.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_container_instance' + diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance.rb new file mode 100644 index 0000000000..7cd0f31a9b --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance.rb @@ -0,0 +1,51 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +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 'generated/azure_mgmt_container_instance/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::ContainerInstance + autoload :ContainerGroups, 'generated/azure_mgmt_container_instance/container_groups.rb' + autoload :ContainerLogs, 'generated/azure_mgmt_container_instance/container_logs.rb' + autoload :ContainerInstanceManagementClient, 'generated/azure_mgmt_container_instance/container_instance_management_client.rb' + + module Models + autoload :Container, 'generated/azure_mgmt_container_instance/models/container.rb' + autoload :AzureFileVolume, 'generated/azure_mgmt_container_instance/models/azure_file_volume.rb' + autoload :EnvironmentVariable, 'generated/azure_mgmt_container_instance/models/environment_variable.rb' + autoload :Volume, 'generated/azure_mgmt_container_instance/models/volume.rb' + autoload :ContainerEvent, 'generated/azure_mgmt_container_instance/models/container_event.rb' + autoload :ImageRegistryCredential, 'generated/azure_mgmt_container_instance/models/image_registry_credential.rb' + autoload :ResourceRequests, 'generated/azure_mgmt_container_instance/models/resource_requests.rb' + autoload :Port, 'generated/azure_mgmt_container_instance/models/port.rb' + autoload :ResourceRequirements, 'generated/azure_mgmt_container_instance/models/resource_requirements.rb' + autoload :IpAddress, 'generated/azure_mgmt_container_instance/models/ip_address.rb' + autoload :ContainerPort, 'generated/azure_mgmt_container_instance/models/container_port.rb' + autoload :ContainerState, 'generated/azure_mgmt_container_instance/models/container_state.rb' + autoload :ResourceLimits, 'generated/azure_mgmt_container_instance/models/resource_limits.rb' + autoload :ContainerGroupListResult, 'generated/azure_mgmt_container_instance/models/container_group_list_result.rb' + autoload :ContainerPropertiesInstanceView, 'generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb' + autoload :Logs, 'generated/azure_mgmt_container_instance/models/logs.rb' + autoload :VolumeMount, 'generated/azure_mgmt_container_instance/models/volume_mount.rb' + autoload :Resource, 'generated/azure_mgmt_container_instance/models/resource.rb' + autoload :ContainerGroup, 'generated/azure_mgmt_container_instance/models/container_group.rb' + autoload :ContainerRestartPolicy, 'generated/azure_mgmt_container_instance/models/container_restart_policy.rb' + autoload :ContainerGroupNetworkProtocol, 'generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb' + autoload :OperatingSystemTypes, 'generated/azure_mgmt_container_instance/models/operating_system_types.rb' + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_groups.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_groups.rb new file mode 100644 index 0000000000..518d911453 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_groups.rb @@ -0,0 +1,838 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerInstance + # + # ContainerGroups + # + class ContainerGroups + include MsRestAzure + + # + # Creates and initializes a new instance of the ContainerGroups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ContainerInstanceManagementClient] reference to the ContainerInstanceManagementClient + attr_reader :client + + # + # Get a list of container groups in the specified subscription. + # + # Get a list of container groups in the specified subscription. This operation + # returns properties of each container group including containers, image + # registry credentials, restart policy, IP address type, OS type, state, and + # volumes. + # + # @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 + + # + # Get a list of container groups in the specified subscription. + # + # Get a list of container groups in the specified subscription. This operation + # returns properties of each container group including containers, image + # registry credentials, restart policy, IP address type, OS type, state, and + # volumes. + # + # @param custom_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 + + # + # Get a list of container groups in the specified subscription. + # + # Get a list of container groups in the specified subscription. This operation + # returns properties of each container group including containers, image + # registry credentials, restart policy, IP address type, OS type, state, and + # volumes. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups' + + 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::ARM::ContainerInstance::Models::ContainerGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a list of container groups in the specified subscription and resource + # group. + # + # Get a list of container groups in a specified subscription and resource + # group. This operation returns properties of each container group including + # containers, image registry credentials, restart policy, IP address type, OS + # type, state, and volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container 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 + + # + # Get a list of container groups in the specified subscription and resource + # group. + # + # Get a list of container groups in a specified subscription and resource + # group. This operation returns properties of each container group including + # containers, image registry credentials, restart policy, IP address type, OS + # type, state, and volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container 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 + + # + # Get a list of container groups in the specified subscription and resource + # group. + # + # Get a list of container groups in a specified subscription and resource + # group. This operation returns properties of each container group including + # containers, image registry credentials, restart policy, IP address type, OS + # type, state, and volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container 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, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerInstance/containerGroups' + + 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}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerInstance::Models::ContainerGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified container group. + # + # Gets the properties of the specified container group in the specified + # subscription and resource group. The operation returns the properties of each + # container group including containers, image registry credentials, restart + # policy, IP address type, OS type, state, and volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container group. + # @param container_group_name [String] The name of the container group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ContainerGroup] operation results. + # + def get(resource_group_name, container_group_name, custom_headers = nil) + response = get_async(resource_group_name, container_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the properties of the specified container group. + # + # Gets the properties of the specified container group in the specified + # subscription and resource group. The operation returns the properties of each + # container group including containers, image registry credentials, restart + # policy, IP address type, OS type, state, and volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container group. + # @param container_group_name [String] The name of the container group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, container_group_name, custom_headers = nil) + get_async(resource_group_name, container_group_name, custom_headers).value! + end + + # + # Get the properties of the specified container group. + # + # Gets the properties of the specified container group in the specified + # subscription and resource group. The operation returns the properties of each + # container group including containers, image registry credentials, restart + # policy, IP address type, OS type, state, and volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container group. + # @param container_group_name [String] The name of the container group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, container_group_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'container_group_name is nil' if container_group_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerInstance/containerGroups/{containerGroupName}' + + 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,'containerGroupName' => container_group_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::ARM::ContainerInstance::Models::ContainerGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or update container groups. + # + # Create or update container groups with specified configurations. + # + # @param resource_group_name [String] The name of the resource group to contain + # the container group to be created or updated. + # @param container_group_name [String] The name of the container group to be + # created or updated. + # @param container_group [ContainerGroup] The properties of the container group + # to be created or updated. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ContainerGroup] operation results. + # + def create_or_update(resource_group_name, container_group_name, container_group, custom_headers = nil) + response = create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update container groups. + # + # Create or update container groups with specified configurations. + # + # @param resource_group_name [String] The name of the resource group to contain + # the container group to be created or updated. + # @param container_group_name [String] The name of the container group to be + # created or updated. + # @param container_group [ContainerGroup] The properties of the container group + # to be created or updated. + # @param custom_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, container_group_name, container_group, custom_headers = nil) + create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers).value! + end + + # + # Create or update container groups. + # + # Create or update container groups with specified configurations. + # + # @param resource_group_name [String] The name of the resource group to contain + # the container group to be created or updated. + # @param container_group_name [String] The name of the container group to be + # created or updated. + # @param container_group [ContainerGroup] The properties of the container group + # to be created or updated. + # @param [Hash{String => String}] 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, container_group_name, container_group, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'container_group_name is nil' if container_group_name.nil? + fail ArgumentError, 'container_group is nil' if container_group.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ContainerInstance::Models::ContainerGroup.mapper() + request_content = @client.serialize(request_mapper, container_group) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}' + + 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,'containerGroupName' => container_group_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerInstance::Models::ContainerGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerInstance::Models::ContainerGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the specified container group. + # + # Delete the specified container group in the specified subscription and + # resource group. The operation does not delete other resources provided by the + # user, such as volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container group. + # @param container_group_name [String] The name of the container group to be + # deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ContainerGroup] operation results. + # + def delete(resource_group_name, container_group_name, custom_headers = nil) + response = delete_async(resource_group_name, container_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Delete the specified container group. + # + # Delete the specified container group in the specified subscription and + # resource group. The operation does not delete other resources provided by the + # user, such as volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container group. + # @param container_group_name [String] The name of the container group to be + # deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, container_group_name, custom_headers = nil) + delete_async(resource_group_name, container_group_name, custom_headers).value! + end + + # + # Delete the specified container group. + # + # Delete the specified container group in the specified subscription and + # resource group. The operation does not delete other resources provided by the + # user, such as volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container group. + # @param container_group_name [String] The name of the container group to be + # deleted. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, container_group_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'container_group_name is nil' if container_group_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerInstance/containerGroups/{containerGroupName}' + + 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,'containerGroupName' => container_group_name}, + 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? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerInstance::Models::ContainerGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a list of container groups in the specified subscription. + # + # Get a list of container groups in the specified subscription. This operation + # returns properties of each container group including containers, image + # registry credentials, restart policy, IP address type, OS type, state, and + # volumes. + # + # @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 [ContainerGroupListResult] 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 + + # + # Get a list of container groups in the specified subscription. + # + # Get a list of container groups in the specified subscription. This operation + # returns properties of each container group including containers, image + # registry credentials, restart policy, IP address type, OS type, state, and + # volumes. + # + # @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 + + # + # Get a list of container groups in the specified subscription. + # + # Get a list of container groups in the specified subscription. This operation + # returns properties of each container group including containers, image + # registry credentials, restart policy, IP address type, OS type, state, and + # volumes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerInstance::Models::ContainerGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a list of container groups in the specified subscription and resource + # group. + # + # Get a list of container groups in a specified subscription and resource + # group. This operation returns properties of each container group including + # containers, image registry credentials, restart policy, IP address type, OS + # type, state, and volumes. + # + # @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 [ContainerGroupListResult] 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 + + # + # Get a list of container groups in the specified subscription and resource + # group. + # + # Get a list of container groups in a specified subscription and resource + # group. This operation returns properties of each container group including + # containers, image registry credentials, restart policy, IP address type, OS + # type, state, and volumes. + # + # @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 + + # + # Get a list of container groups in the specified subscription and resource + # group. + # + # Get a list of container groups in a specified subscription and resource + # group. This operation returns properties of each container group including + # containers, image registry credentials, restart policy, IP address type, OS + # type, state, and volumes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerInstance::Models::ContainerGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a list of container groups in the specified subscription. + # + # Get a list of container groups in the specified subscription. This operation + # returns properties of each container group including containers, image + # registry credentials, restart policy, IP address type, OS type, state, and + # volumes. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ContainerGroupListResult] 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 + + # + # Get a list of container groups in the specified subscription and resource + # group. + # + # Get a list of container groups in a specified subscription and resource + # group. This operation returns properties of each container group including + # containers, image registry credentials, restart policy, IP address type, OS + # type, state, and volumes. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ContainerGroupListResult] which provide lazy access to pages of the + # response. + # + def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_resource_group_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_instance_management_client.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_instance_management_client.rb new file mode 100644 index 0000000000..86896ccffe --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_instance_management_client.rb @@ -0,0 +1,135 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerInstance + # + # A service client - single point of access to the REST API. + # + class ContainerInstanceManagementClient < 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] Subscription credentials which uniquely identify + # Microsoft Azure subscription. The subscription ID forms part of the URI + # for every service call. + attr_accessor :subscription_id + + # @return [String] Client API version + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [ContainerGroups] container_groups + attr_reader :container_groups + + # @return [ContainerLogs] container_logs + attr_reader :container_logs + + # + # Creates initializes a new instance of the ContainerInstanceManagementClient 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 + + @container_groups = ContainerGroups.new(self) + @container_logs = ContainerLogs.new(self) + @api_version = '2017-08-01-preview' + @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_container_instance' + if defined? Azure::ARM::ContainerInstance::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::ContainerInstance::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_logs.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_logs.rb new file mode 100644 index 0000000000..5bd3a444c6 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/container_logs.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::ARM::ContainerInstance + # + # ContainerLogs + # + class ContainerLogs + include MsRestAzure + + # + # Creates and initializes a new instance of the ContainerLogs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ContainerInstanceManagementClient] reference to the ContainerInstanceManagementClient + attr_reader :client + + # + # Get the logs for a specified container instance. + # + # Get the logs for a specified container instance in a specified resource group + # and container group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container instance. + # @param container_name [String] The name of the container instance. + # @param container_group_name [String] The name of the container group the + # container instance belongs to. + # @param tail [Integer] The number of lines to show from the tail of the + # container instance log. If not provided, all available logs are shown up to + # 4mb. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Logs] operation results. + # + def list(resource_group_name, container_name, container_group_name, tail = nil, custom_headers = nil) + response = list_async(resource_group_name, container_name, container_group_name, tail, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the logs for a specified container instance. + # + # Get the logs for a specified container instance in a specified resource group + # and container group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container instance. + # @param container_name [String] The name of the container instance. + # @param container_group_name [String] The name of the container group the + # container instance belongs to. + # @param tail [Integer] The number of lines to show from the tail of the + # container instance log. If not provided, all available logs are shown up to + # 4mb. + # @param custom_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, container_name, container_group_name, tail = nil, custom_headers = nil) + list_async(resource_group_name, container_name, container_group_name, tail, custom_headers).value! + end + + # + # Get the logs for a specified container instance. + # + # Get the logs for a specified container instance in a specified resource group + # and container group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the container instance. + # @param container_name [String] The name of the container instance. + # @param container_group_name [String] The name of the container group the + # container instance belongs to. + # @param tail [Integer] The number of lines to show from the tail of the + # container instance log. If not provided, all available logs are shown up to + # 4mb. + # @param [Hash{String => String}] 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, container_name, container_group_name, tail = nil, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, 'container_group_name is nil' if container_group_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs' + + 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,'containerName' => container_name,'containerGroupName' => container_group_name}, + query_params: {'api-version' => @client.api_version,'tail' => tail}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerInstance::Models::Logs.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_container_instance/lib/generated/azure_mgmt_container_instance/models/azure_file_volume.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/azure_file_volume.rb new file mode 100644 index 0000000000..e94ba159d3 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/azure_file_volume.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::ARM::ContainerInstance + module Models + # + # The properties of the Azure File volume. Azure File shares are mounted as + # volumes. + # + class AzureFileVolume + + include MsRestAzure + + # @return [String] The name of the Azure File share to be mounted as a + # volume. + attr_accessor :share_name + + # @return [Boolean] The flag indicating whether the Azure File shared + # mounted as a volume is read-only. + attr_accessor :read_only + + # @return [String] The name of the storage account that contains the + # Azure File share. + attr_accessor :storage_account_name + + # @return [String] The storage account access key used to access the + # Azure File share. + attr_accessor :storage_account_key + + + # + # Mapper for AzureFileVolume class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureFileVolume', + type: { + name: 'Composite', + class_name: 'AzureFileVolume', + model_properties: { + share_name: { + required: true, + serialized_name: 'shareName', + type: { + name: 'String' + } + }, + read_only: { + required: false, + serialized_name: 'readOnly', + type: { + name: 'Boolean' + } + }, + storage_account_name: { + required: true, + serialized_name: 'storageAccountName', + type: { + name: 'String' + } + }, + storage_account_key: { + required: false, + serialized_name: 'storageAccountKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container.rb new file mode 100644 index 0000000000..8548343d57 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container.rb @@ -0,0 +1,155 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerInstance + module Models + # + # A container instance. + # + class Container + + include MsRestAzure + + # @return [String] The user-provided name of the container instance. + attr_accessor :name + + # @return [String] The name of the image used to create the container + # instance. + attr_accessor :image + + # @return [Array] The commands to execute within the container + # instance in exec form. + attr_accessor :command + + # @return [Array] The exposed ports on the container + # instance. + attr_accessor :ports + + # @return [Array] The environment variables to set + # in the container instance. + attr_accessor :environment_variables + + # @return [ContainerPropertiesInstanceView] The instance view of the + # container instance. Only valid in response. + attr_accessor :instance_view + + # @return [ResourceRequirements] The resource requirements of the + # container instance. + attr_accessor :resources + + # @return [Array] The volume mounts available to the + # container instance. + attr_accessor :volume_mounts + + + # + # Mapper for Container class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Container', + type: { + name: 'Composite', + class_name: 'Container', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + image: { + required: true, + serialized_name: 'properties.image', + type: { + name: 'String' + } + }, + command: { + required: false, + serialized_name: 'properties.command', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + ports: { + required: false, + serialized_name: 'properties.ports', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ContainerPortElementType', + type: { + name: 'Composite', + class_name: 'ContainerPort' + } + } + } + }, + environment_variables: { + required: false, + serialized_name: 'properties.environmentVariables', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EnvironmentVariableElementType', + type: { + name: 'Composite', + class_name: 'EnvironmentVariable' + } + } + } + }, + instance_view: { + required: false, + read_only: true, + serialized_name: 'properties.instanceView', + type: { + name: 'Composite', + class_name: 'ContainerPropertiesInstanceView' + } + }, + resources: { + required: true, + serialized_name: 'properties.resources', + type: { + name: 'Composite', + class_name: 'ResourceRequirements' + } + }, + volume_mounts: { + required: false, + serialized_name: 'properties.volumeMounts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VolumeMountElementType', + type: { + name: 'Composite', + class_name: 'VolumeMount' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_event.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_event.rb new file mode 100644 index 0000000000..a4d3428a32 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_event.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerInstance + module Models + # + # A container instance event. + # + class ContainerEvent + + include MsRestAzure + + # @return [Integer] The count of the event. + attr_accessor :count + + # @return [DateTime] The date-time of the earliest logged event. + attr_accessor :first_timestamp + + # @return [DateTime] The date-time of the latest logged event. + attr_accessor :last_timestamp + + # @return [String] The event message. + attr_accessor :message + + # @return [String] The event type. + attr_accessor :type + + + # + # Mapper for ContainerEvent class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContainerEvent', + type: { + name: 'Composite', + class_name: 'ContainerEvent', + model_properties: { + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + first_timestamp: { + required: false, + serialized_name: 'firstTimestamp', + type: { + name: 'DateTime' + } + }, + last_timestamp: { + required: false, + serialized_name: 'lastTimestamp', + type: { + name: 'DateTime' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group.rb new file mode 100644 index 0000000000..b110281fda --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group.rb @@ -0,0 +1,194 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerInstance + module Models + # + # A container group. + # + class ContainerGroup < Resource + + include MsRestAzure + + # @return [String] The provisioning state of the container group. This + # only appears in the response. + attr_accessor :provisioning_state + + # @return [Array] The containers within the container group. + attr_accessor :containers + + # @return [Array] The image registry credentials + # by which the container group is created from. + attr_accessor :image_registry_credentials + + # @return [ContainerRestartPolicy] Restart policy for all containers + # within the container group. Currently the only available option is + # `always`. Possible values include: 'always' + attr_accessor :restart_policy + + # @return [IpAddress] The IP address type of the container group. + attr_accessor :ip_address + + # @return [OperatingSystemTypes] The operating system type required by + # the containers in the container group. Possible values include: + # 'Windows', 'Linux' + attr_accessor :os_type + + # @return [String] The current state of the container group. This is only + # valid for the response. + attr_accessor :state + + # @return [Array] The list of volumes that can be mounted by + # containers in this container group. + attr_accessor :volumes + + + # + # Mapper for ContainerGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContainerGroup', + type: { + name: 'Composite', + class_name: 'ContainerGroup', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + containers: { + required: false, + serialized_name: 'properties.containers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ContainerElementType', + type: { + name: 'Composite', + class_name: 'Container' + } + } + } + }, + image_registry_credentials: { + required: false, + serialized_name: 'properties.imageRegistryCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ImageRegistryCredentialElementType', + type: { + name: 'Composite', + class_name: 'ImageRegistryCredential' + } + } + } + }, + restart_policy: { + required: false, + serialized_name: 'properties.restartPolicy', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'properties.ipAddress', + type: { + name: 'Composite', + class_name: 'IpAddress' + } + }, + os_type: { + required: false, + serialized_name: 'properties.osType', + type: { + name: 'String' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + volumes: { + required: false, + serialized_name: 'properties.volumes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VolumeElementType', + type: { + name: 'Composite', + class_name: 'Volume' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group_list_result.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group_list_result.rb new file mode 100644 index 0000000000..bb1a364bba --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group_list_result.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::ARM::ContainerInstance + module Models + # + # The container group list response that contains the container group + # properties. + # + class ContainerGroupListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of container groups. + attr_accessor :value + + # @return [String] The URI to fetch the next page of container groups. + 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 [ContainerGroupListResult] 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 ContainerGroupListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContainerGroupListResult', + type: { + name: 'Composite', + class_name: 'ContainerGroupListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ContainerGroupElementType', + type: { + name: 'Composite', + class_name: 'ContainerGroup' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb new file mode 100644 index 0000000000..299e6b3564 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_group_network_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::ARM::ContainerInstance + module Models + # + # Defines values for ContainerGroupNetworkProtocol + # + module ContainerGroupNetworkProtocol + TCP = "TCP" + UDP = "UDP" + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_port.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_port.rb new file mode 100644 index 0000000000..4e4a4d9c3b --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_port.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::ARM::ContainerInstance + module Models + # + # The port exposed on the container instance. + # + class ContainerPort + + include MsRestAzure + + # @return [Integer] The port number exposed within the container group. + attr_accessor :port + + + # + # Mapper for ContainerPort class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContainerPort', + type: { + name: 'Composite', + class_name: 'ContainerPort', + model_properties: { + port: { + required: true, + serialized_name: 'port', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb new file mode 100644 index 0000000000..8fd229f1da --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_properties_instance_view.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::ARM::ContainerInstance + module Models + # + # The instance view of the container instance. Only valid in response. + # + class ContainerPropertiesInstanceView + + include MsRestAzure + + # @return [Integer] The number of times that the container instance has + # been restarted. + attr_accessor :restart_count + + # @return [ContainerState] Current container instance state. + attr_accessor :current_state + + # @return [ContainerState] Previous container instance state. + attr_accessor :previous_state + + # @return [Array] The events of the container instance. + attr_accessor :events + + + # + # Mapper for ContainerPropertiesInstanceView class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContainerProperties_instanceView', + type: { + name: 'Composite', + class_name: 'ContainerPropertiesInstanceView', + model_properties: { + restart_count: { + required: false, + serialized_name: 'restartCount', + type: { + name: 'Number' + } + }, + current_state: { + required: false, + serialized_name: 'currentState', + type: { + name: 'Composite', + class_name: 'ContainerState' + } + }, + previous_state: { + required: false, + serialized_name: 'previousState', + type: { + name: 'Composite', + class_name: 'ContainerState' + } + }, + events: { + required: false, + serialized_name: 'events', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ContainerEventElementType', + type: { + name: 'Composite', + class_name: 'ContainerEvent' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_restart_policy.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_restart_policy.rb new file mode 100644 index 0000000000..1cbd88b059 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_restart_policy.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerInstance + module Models + # + # Defines values for ContainerRestartPolicy + # + module ContainerRestartPolicy + Always = "always" + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_state.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_state.rb new file mode 100644 index 0000000000..ef1343ceec --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/container_state.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerInstance + module Models + # + # The container instance state. + # + class ContainerState + + include MsRestAzure + + # @return [String] The state of the container instance. + attr_accessor :state + + # @return [DateTime] The date-time when the container instance state + # started. + attr_accessor :start_time + + # @return [Integer] The container instance exit codes correspond to those + # from the `docker run` command. + attr_accessor :exit_code + + # @return [DateTime] The date-time when the container instance state + # finished. + attr_accessor :finish_time + + # @return [String] The human-readable status of the container instance + # state. + attr_accessor :detail_status + + + # + # Mapper for ContainerState class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContainerState', + type: { + name: 'Composite', + class_name: 'ContainerState', + model_properties: { + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + exit_code: { + required: false, + serialized_name: 'exitCode', + type: { + name: 'Number' + } + }, + finish_time: { + required: false, + serialized_name: 'finishTime', + type: { + name: 'DateTime' + } + }, + detail_status: { + required: false, + serialized_name: 'detailStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/environment_variable.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/environment_variable.rb new file mode 100644 index 0000000000..e620e2e809 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/environment_variable.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::ARM::ContainerInstance + module Models + # + # The environment variable to set within the container instance. + # + class EnvironmentVariable + + include MsRestAzure + + # @return [String] The name of the environment variable. + attr_accessor :name + + # @return [String] The value of the environment variable. + attr_accessor :value + + + # + # Mapper for EnvironmentVariable class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EnvironmentVariable', + type: { + name: 'Composite', + class_name: 'EnvironmentVariable', + 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_container_instance/lib/generated/azure_mgmt_container_instance/models/image_registry_credential.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/image_registry_credential.rb new file mode 100644 index 0000000000..05e535ec60 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/image_registry_credential.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::ARM::ContainerInstance + module Models + # + # Image registry credential. + # + class ImageRegistryCredential + + include MsRestAzure + + # @return [String] The Docker image registry server without a protocol + # such as "http" and "https". + attr_accessor :server + + # @return [String] The username for the private registry. + attr_accessor :username + + # @return [String] The password for the private registry. + attr_accessor :password + + + # + # Mapper for ImageRegistryCredential class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ImageRegistryCredential', + type: { + name: 'Composite', + class_name: 'ImageRegistryCredential', + model_properties: { + server: { + required: true, + serialized_name: 'server', + type: { + name: 'String' + } + }, + username: { + required: true, + 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_container_instance/lib/generated/azure_mgmt_container_instance/models/ip_address.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/ip_address.rb new file mode 100644 index 0000000000..11c5468548 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/ip_address.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::ARM::ContainerInstance + module Models + # + # IP address for the container group. + # + class IpAddress + + include MsRestAzure + + # @return [Array] The list of ports exposed on the container group. + attr_accessor :ports + + # @return [String] Specifies if the IP is exposed to the public internet. + # Default value: 'Public' . + attr_accessor :type + + # @return [String] The IP exposed to the public internet. + attr_accessor :ip + + + # + # Mapper for IpAddress class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IpAddress', + type: { + name: 'Composite', + class_name: 'IpAddress', + model_properties: { + ports: { + required: true, + serialized_name: 'ports', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PortElementType', + type: { + name: 'Composite', + class_name: 'Port' + } + } + } + }, + type: { + required: true, + is_constant: true, + serialized_name: 'type', + default_value: 'Public', + type: { + name: 'String' + } + }, + ip: { + required: false, + serialized_name: 'ip', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/logs.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/logs.rb new file mode 100644 index 0000000000..cf3dc2cd88 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/logs.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::ARM::ContainerInstance + module Models + # + # The logs. + # + class Logs + + include MsRestAzure + + # @return [String] The content of the log. + attr_accessor :content + + + # + # Mapper for Logs class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Logs', + type: { + name: 'Composite', + class_name: 'Logs', + model_properties: { + content: { + required: false, + serialized_name: 'content', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/operating_system_types.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/operating_system_types.rb new file mode 100644 index 0000000000..2c0b66689c --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/operating_system_types.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::ARM::ContainerInstance + module Models + # + # Defines values for OperatingSystemTypes + # + module OperatingSystemTypes + Windows = "Windows" + Linux = "Linux" + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/port.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/port.rb new file mode 100644 index 0000000000..cf8b7df511 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/port.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::ARM::ContainerInstance + module Models + # + # The port exposed on the container group. + # + class Port + + include MsRestAzure + + # @return [ContainerGroupNetworkProtocol] The protocol associated with + # the port. Possible values include: 'TCP', 'UDP' + attr_accessor :protocol + + # @return [Integer] The port number. + attr_accessor :port + + + # + # Mapper for Port class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Port', + type: { + name: 'Composite', + class_name: 'Port', + model_properties: { + protocol: { + required: false, + serialized_name: 'protocol', + type: { + name: 'String' + } + }, + port: { + required: true, + serialized_name: 'port', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource.rb new file mode 100644 index 0000000000..6634bc98f1 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource.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::ARM::ContainerInstance + module Models + # + # The Resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] The resource id. + attr_accessor :id + + # @return [String] The resource name. + attr_accessor :name + + # @return [String] The resource type. + attr_accessor :type + + # @return [String] The resource location. + attr_accessor :location + + # @return [Hash{String => String}] The resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_limits.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_limits.rb new file mode 100644 index 0000000000..da9377c801 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_limits.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::ARM::ContainerInstance + module Models + # + # The resource limits. + # + class ResourceLimits + + include MsRestAzure + + # @return [Float] The memory limit in GB of this container instance. + attr_accessor :memory_in_gb + + # @return [Float] The CPU limit of this container instance. + attr_accessor :cpu + + + # + # Mapper for ResourceLimits class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceLimits', + type: { + name: 'Composite', + class_name: 'ResourceLimits', + model_properties: { + memory_in_gb: { + required: false, + serialized_name: 'memoryInGB', + type: { + name: 'Double' + } + }, + cpu: { + required: false, + serialized_name: 'cpu', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_requests.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_requests.rb new file mode 100644 index 0000000000..0577f4e493 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_requests.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::ARM::ContainerInstance + module Models + # + # The resource requests. + # + class ResourceRequests + + include MsRestAzure + + # @return [Float] The memory request in GB of this container instance. + attr_accessor :memory_in_gb + + # @return [Float] The CPU request of this container instance. + attr_accessor :cpu + + + # + # Mapper for ResourceRequests class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceRequests', + type: { + name: 'Composite', + class_name: 'ResourceRequests', + model_properties: { + memory_in_gb: { + required: true, + serialized_name: 'memoryInGB', + type: { + name: 'Double' + } + }, + cpu: { + required: true, + serialized_name: 'cpu', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_requirements.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_requirements.rb new file mode 100644 index 0000000000..104ceb4ca5 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/resource_requirements.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::ARM::ContainerInstance + module Models + # + # The resource requirements. + # + class ResourceRequirements + + include MsRestAzure + + # @return [ResourceRequests] The resource requests of this container + # instance. + attr_accessor :requests + + # @return [ResourceLimits] The resource limits of this container + # instance. + attr_accessor :limits + + + # + # Mapper for ResourceRequirements class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceRequirements', + type: { + name: 'Composite', + class_name: 'ResourceRequirements', + model_properties: { + requests: { + required: true, + serialized_name: 'requests', + type: { + name: 'Composite', + class_name: 'ResourceRequests' + } + }, + limits: { + required: false, + serialized_name: 'limits', + type: { + name: 'Composite', + class_name: 'ResourceLimits' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/volume.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/volume.rb new file mode 100644 index 0000000000..da24fee610 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/volume.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::ARM::ContainerInstance + module Models + # + # The properties of the volume. + # + class Volume + + include MsRestAzure + + # @return [String] The name of the volume. + attr_accessor :name + + # @return [AzureFileVolume] The name of the Azure File volume. + attr_accessor :azure_file + + + # + # Mapper for Volume class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Volume', + type: { + name: 'Composite', + class_name: 'Volume', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + azure_file: { + required: true, + serialized_name: 'azureFile', + type: { + name: 'Composite', + class_name: 'AzureFileVolume' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/volume_mount.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/volume_mount.rb new file mode 100644 index 0000000000..fd9b9ffc0d --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/models/volume_mount.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::ARM::ContainerInstance + module Models + # + # The properties of the volume mount. + # + class VolumeMount + + include MsRestAzure + + # @return [String] The name of the volume mount. + attr_accessor :name + + # @return [String] The path within the container where the volume should + # be mounted. Must not contain colon (:). + attr_accessor :mount_path + + # @return [Boolean] The flag indicating whether the volume mount is + # read-only. + attr_accessor :read_only + + + # + # Mapper for VolumeMount class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VolumeMount', + type: { + name: 'Composite', + class_name: 'VolumeMount', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + mount_path: { + required: true, + serialized_name: 'mountPath', + type: { + name: 'String' + } + }, + read_only: { + required: false, + serialized_name: 'readOnly', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/module_definition.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/module_definition.rb new file mode 100644 index 0000000000..9a788c3ae3 --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/module_definition.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 end +module Azure::ARM end +module Azure::ARM::ContainerInstance end diff --git a/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/version.rb b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/version.rb new file mode 100644 index 0000000000..bf8fd5298d --- /dev/null +++ b/management/azure_mgmt_container_instance/lib/generated/azure_mgmt_container_instance/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::ARM::ContainerInstance + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_container_instance/spec/spec_helper.rb b/management/azure_mgmt_container_instance/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_container_instance/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_container_registry/.rspec b/management/azure_mgmt_container_registry/.rspec new file mode 100644 index 0000000000..f6f85f5be0 --- /dev/null +++ b/management/azure_mgmt_container_registry/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation \ No newline at end of file diff --git a/management/azure_mgmt_container_registry/LICENSE.txt b/management/azure_mgmt_container_registry/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_container_registry/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_container_registry/Rakefile b/management/azure_mgmt_container_registry/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_container_registry/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_container_registry/azure_mgmt_container_registry.gemspec b/management/azure_mgmt_container_registry/azure_mgmt_container_registry.gemspec new file mode 100644 index 0000000000..e10021b500 --- /dev/null +++ b/management/azure_mgmt_container_registry/azure_mgmt_container_registry.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_container_registry/module_definition' +require 'generated/azure_mgmt_container_registry/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_container_registry' + spec.version = Azure::ARM::ContainerRegistry::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Container Registry Management Client Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Container Registry Management services.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_container_registry/lib/azure_mgmt_container_registry.rb b/management/azure_mgmt_container_registry/lib/azure_mgmt_container_registry.rb new file mode 100644 index 0000000000..6676217f74 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/azure_mgmt_container_registry.rb @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_container_registry' \ No newline at end of file diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry.rb new file mode 100644 index 0000000000..60c8868494 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry.rb @@ -0,0 +1,73 @@ +# encoding: 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 'generated/azure_mgmt_container_registry/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::ContainerRegistry + autoload :Registries, 'generated/azure_mgmt_container_registry/registries.rb' + autoload :Operations, 'generated/azure_mgmt_container_registry/operations.rb' + autoload :Replications, 'generated/azure_mgmt_container_registry/replications.rb' + autoload :Webhooks, 'generated/azure_mgmt_container_registry/webhooks.rb' + autoload :ContainerRegistryManagementClient, 'generated/azure_mgmt_container_registry/container_registry_management_client.rb' + + module Models + autoload :ReplicationUpdateParameters, 'generated/azure_mgmt_container_registry/models/replication_update_parameters.rb' + autoload :ReplicationListResult, 'generated/azure_mgmt_container_registry/models/replication_list_result.rb' + autoload :RegistryNameStatus, 'generated/azure_mgmt_container_registry/models/registry_name_status.rb' + autoload :OperationDisplayDefinition, 'generated/azure_mgmt_container_registry/models/operation_display_definition.rb' + autoload :OperationDefinition, 'generated/azure_mgmt_container_registry/models/operation_definition.rb' + autoload :Sku, 'generated/azure_mgmt_container_registry/models/sku.rb' + autoload :WebhookCreateParameters, 'generated/azure_mgmt_container_registry/models/webhook_create_parameters.rb' + autoload :StorageAccountProperties, 'generated/azure_mgmt_container_registry/models/storage_account_properties.rb' + autoload :WebhookUpdateParameters, 'generated/azure_mgmt_container_registry/models/webhook_update_parameters.rb' + autoload :RegistryUpdateParameters, 'generated/azure_mgmt_container_registry/models/registry_update_parameters.rb' + autoload :WebhookListResult, 'generated/azure_mgmt_container_registry/models/webhook_list_result.rb' + autoload :RegistryPassword, 'generated/azure_mgmt_container_registry/models/registry_password.rb' + autoload :EventInfo, 'generated/azure_mgmt_container_registry/models/event_info.rb' + autoload :RegenerateCredentialParameters, 'generated/azure_mgmt_container_registry/models/regenerate_credential_parameters.rb' + autoload :CallbackConfig, 'generated/azure_mgmt_container_registry/models/callback_config.rb' + autoload :RegistryUsageListResult, 'generated/azure_mgmt_container_registry/models/registry_usage_list_result.rb' + autoload :Target, 'generated/azure_mgmt_container_registry/models/target.rb' + autoload :RegistryNameCheckRequest, 'generated/azure_mgmt_container_registry/models/registry_name_check_request.rb' + autoload :Request, 'generated/azure_mgmt_container_registry/models/request.rb' + autoload :Status, 'generated/azure_mgmt_container_registry/models/status.rb' + autoload :Actor, 'generated/azure_mgmt_container_registry/models/actor.rb' + autoload :RegistryListResult, 'generated/azure_mgmt_container_registry/models/registry_list_result.rb' + autoload :Source, 'generated/azure_mgmt_container_registry/models/source.rb' + autoload :RegistryUsage, 'generated/azure_mgmt_container_registry/models/registry_usage.rb' + autoload :EventContent, 'generated/azure_mgmt_container_registry/models/event_content.rb' + autoload :OperationListResult, 'generated/azure_mgmt_container_registry/models/operation_list_result.rb' + autoload :EventRequestMessage, 'generated/azure_mgmt_container_registry/models/event_request_message.rb' + autoload :RegistryListCredentialsResult, 'generated/azure_mgmt_container_registry/models/registry_list_credentials_result.rb' + autoload :EventResponseMessage, 'generated/azure_mgmt_container_registry/models/event_response_message.rb' + autoload :EventListResult, 'generated/azure_mgmt_container_registry/models/event_list_result.rb' + autoload :Resource, 'generated/azure_mgmt_container_registry/models/resource.rb' + autoload :Registry, 'generated/azure_mgmt_container_registry/models/registry.rb' + autoload :Replication, 'generated/azure_mgmt_container_registry/models/replication.rb' + autoload :Webhook, 'generated/azure_mgmt_container_registry/models/webhook.rb' + autoload :Event, 'generated/azure_mgmt_container_registry/models/event.rb' + autoload :SkuName, 'generated/azure_mgmt_container_registry/models/sku_name.rb' + autoload :SkuTier, 'generated/azure_mgmt_container_registry/models/sku_tier.rb' + autoload :ProvisioningState, 'generated/azure_mgmt_container_registry/models/provisioning_state.rb' + autoload :PasswordName, 'generated/azure_mgmt_container_registry/models/password_name.rb' + autoload :RegistryUsageUnit, 'generated/azure_mgmt_container_registry/models/registry_usage_unit.rb' + autoload :WebhookStatus, 'generated/azure_mgmt_container_registry/models/webhook_status.rb' + autoload :WebhookAction, 'generated/azure_mgmt_container_registry/models/webhook_action.rb' + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/container_registry_management_client.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/container_registry_management_client.rb new file mode 100644 index 0000000000..8e88fa8ce6 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/container_registry_management_client.rb @@ -0,0 +1,141 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + # + # A service client - single point of access to the REST API. + # + class ContainerRegistryManagementClient < 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] The Microsoft Azure subscription ID. + attr_accessor :subscription_id + + # @return [String] The client API version. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Registries] registries + attr_reader :registries + + # @return [Operations] operations + attr_reader :operations + + # @return [Replications] replications + attr_reader :replications + + # @return [Webhooks] webhooks + attr_reader :webhooks + + # + # Creates initializes a new instance of the ContainerRegistryManagementClient 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 + + @registries = Registries.new(self) + @operations = Operations.new(self) + @replications = Replications.new(self) + @webhooks = Webhooks.new(self) + @api_version = '2017-10-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_container_registry' + if defined? Azure::ARM::ContainerRegistry::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::ContainerRegistry::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/actor.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/actor.rb new file mode 100644 index 0000000000..f164a4a457 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/actor.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::ARM::ContainerRegistry + module Models + # + # The agent that initiated the event. For most situations, this could be + # from the authorization context of the request. + # + class Actor + + include MsRestAzure + + # @return [String] The subject or username associated with the request + # context that generated the event. + attr_accessor :name + + + # + # Mapper for Actor class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Actor', + type: { + name: 'Composite', + class_name: 'Actor', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/callback_config.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/callback_config.rb new file mode 100644 index 0000000000..bfaf01c1a6 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/callback_config.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::ARM::ContainerRegistry + module Models + # + # The configuration of service URI and custom headers for the webhook. + # + class CallbackConfig + + include MsRestAzure + + # @return [String] The service URI for the webhook to post notifications. + attr_accessor :service_uri + + # @return [Hash{String => String}] Custom headers that will be added to + # the webhook notifications. + attr_accessor :custom_headers + + + # + # Mapper for CallbackConfig class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CallbackConfig', + type: { + name: 'Composite', + class_name: 'CallbackConfig', + model_properties: { + service_uri: { + required: true, + serialized_name: 'serviceUri', + type: { + name: 'String' + } + }, + custom_headers: { + required: false, + serialized_name: 'customHeaders', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event.rb new file mode 100644 index 0000000000..7507e65748 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event.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::ARM::ContainerRegistry + module Models + # + # The event for a webhook. + # + class Event < EventInfo + + include MsRestAzure + + # @return [EventRequestMessage] The event request message sent to the + # service URI. + attr_accessor :event_request_message + + # @return [EventResponseMessage] The event response message received from + # the service URI. + attr_accessor :event_response_message + + + # + # Mapper for Event class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Event', + type: { + name: 'Composite', + class_name: 'Event', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + event_request_message: { + required: false, + serialized_name: 'eventRequestMessage', + type: { + name: 'Composite', + class_name: 'EventRequestMessage' + } + }, + event_response_message: { + required: false, + serialized_name: 'eventResponseMessage', + type: { + name: 'Composite', + class_name: 'EventResponseMessage' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_content.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_content.rb new file mode 100644 index 0000000000..f1c94ac020 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_content.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::ARM::ContainerRegistry + module Models + # + # The content of the event request message. + # + class EventContent + + include MsRestAzure + + # @return [String] The event ID. + attr_accessor :id + + # @return [DateTime] The time at which the event occurred. + attr_accessor :timestamp + + # @return [String] The action that encompasses the provided event. + attr_accessor :action + + # @return [Target] The target of the event. + attr_accessor :target + + # @return [Request] The request that generated the event. + attr_accessor :request + + # @return [Actor] The agent that initiated the event. For most + # situations, this could be from the authorization context of the + # request. + attr_accessor :actor + + # @return [Source] The registry node that generated the event. Put + # differently, while the actor initiates the event, the source generates + # it. + attr_accessor :source + + + # + # Mapper for EventContent class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventContent', + type: { + name: 'Composite', + class_name: 'EventContent', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + timestamp: { + required: false, + serialized_name: 'timestamp', + type: { + name: 'DateTime' + } + }, + action: { + required: false, + serialized_name: 'action', + type: { + name: 'String' + } + }, + target: { + required: false, + serialized_name: 'target', + type: { + name: 'Composite', + class_name: 'Target' + } + }, + request: { + required: false, + serialized_name: 'request', + type: { + name: 'Composite', + class_name: 'Request' + } + }, + actor: { + required: false, + serialized_name: 'actor', + type: { + name: 'Composite', + class_name: 'Actor' + } + }, + source: { + required: false, + serialized_name: 'source', + type: { + name: 'Composite', + class_name: 'Source' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_info.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_info.rb new file mode 100644 index 0000000000..db8f3b2ffb --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_info.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::ARM::ContainerRegistry + module Models + # + # The basic information of an event. + # + class EventInfo + + include MsRestAzure + + # @return [String] The event ID. + attr_accessor :id + + + # + # Mapper for EventInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventInfo', + type: { + name: 'Composite', + class_name: 'EventInfo', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_list_result.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_list_result.rb new file mode 100644 index 0000000000..a38292458f --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_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::ARM::ContainerRegistry + module Models + # + # The result of a request to list events for a webhook. + # + class EventListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of events. Since this list may be + # incomplete, the nextLink field should be used to request the next list + # of events. + attr_accessor :value + + # @return [String] The URI that can be used to request the next list of + # events. + 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 [EventListResult] 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 EventListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventListResult', + type: { + name: 'Composite', + class_name: 'EventListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EventElementType', + type: { + name: 'Composite', + class_name: 'Event' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_request_message.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_request_message.rb new file mode 100644 index 0000000000..42fa1e4db9 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_request_message.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::ARM::ContainerRegistry + module Models + # + # The event request message sent to the service URI. + # + class EventRequestMessage + + include MsRestAzure + + # @return [EventContent] The content of the event request message. + attr_accessor :content + + # @return [Hash{String => String}] The headers of the event request + # message. + attr_accessor :headers + + # @return [String] The HTTP method used to send the event request + # message. + attr_accessor :method + + # @return [String] The URI used to send the event request message. + attr_accessor :request_uri + + # @return [String] The HTTP message version. + attr_accessor :version + + + # + # Mapper for EventRequestMessage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventRequestMessage', + type: { + name: 'Composite', + class_name: 'EventRequestMessage', + model_properties: { + content: { + required: false, + serialized_name: 'content', + type: { + name: 'Composite', + class_name: 'EventContent' + } + }, + headers: { + required: false, + serialized_name: 'headers', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + method: { + required: false, + serialized_name: 'method', + type: { + name: 'String' + } + }, + request_uri: { + required: false, + serialized_name: 'requestUri', + type: { + name: 'String' + } + }, + version: { + required: false, + serialized_name: 'version', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_response_message.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_response_message.rb new file mode 100644 index 0000000000..165aa4bb3b --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/event_response_message.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::ARM::ContainerRegistry + module Models + # + # The event response message received from the service URI. + # + class EventResponseMessage + + include MsRestAzure + + # @return [String] The content of the event response message. + attr_accessor :content + + # @return [Hash{String => String}] The headers of the event response + # message. + attr_accessor :headers + + # @return [String] The reason phrase of the event response message. + attr_accessor :reason_phrase + + # @return [String] The status code of the event response message. + attr_accessor :status_code + + # @return [String] The HTTP message version. + attr_accessor :version + + + # + # Mapper for EventResponseMessage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventResponseMessage', + type: { + name: 'Composite', + class_name: 'EventResponseMessage', + model_properties: { + content: { + required: false, + serialized_name: 'content', + type: { + name: 'String' + } + }, + headers: { + required: false, + serialized_name: 'headers', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + reason_phrase: { + required: false, + serialized_name: 'reasonPhrase', + type: { + name: 'String' + } + }, + status_code: { + required: false, + serialized_name: 'statusCode', + type: { + name: 'String' + } + }, + version: { + required: false, + serialized_name: 'version', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_definition.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_definition.rb new file mode 100644 index 0000000000..9c082fdaac --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_definition.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::ARM::ContainerRegistry + module Models + # + # The definition of a container registry operation. + # + class OperationDefinition + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation}. + attr_accessor :name + + # @return [OperationDisplayDefinition] The display information for the + # container registry operation. + attr_accessor :display + + + # + # Mapper for OperationDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationDefinition', + type: { + name: 'Composite', + class_name: 'OperationDefinition', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplayDefinition' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_display_definition.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_display_definition.rb new file mode 100644 index 0000000000..4a6b018558 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_display_definition.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::ARM::ContainerRegistry + module Models + # + # The display information for a container registry operation. + # + class OperationDisplayDefinition + + include MsRestAzure + + # @return [String] The resource provider name: + # Microsoft.ContainerRegistry. + attr_accessor :provider + + # @return [String] The resource on which the operation is performed. + attr_accessor :resource + + # @return [String] The operation that users can perform. + attr_accessor :operation + + # @return [String] The description for the operation. + attr_accessor :description + + + # + # Mapper for OperationDisplayDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationDisplayDefinition', + type: { + name: 'Composite', + class_name: 'OperationDisplayDefinition', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_list_result.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/operation_list_result.rb new file mode 100644 index 0000000000..85c87d5427 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/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::ARM::ContainerRegistry + module Models + # + # The result of a request to list container registry operations. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of container registry + # operations. Since this list may be incomplete, the nextLink field + # should be used to request the next list of operations. + attr_accessor :value + + # @return [String] The URI that can be used to request the next list of + # container registry operations. + 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: 'OperationDefinitionElementType', + type: { + name: 'Composite', + class_name: 'OperationDefinition' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/password_name.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/password_name.rb new file mode 100644 index 0000000000..352697d16c --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/password_name.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # Defines values for PasswordName + # + module PasswordName + Password = "password" + Password2 = "password2" + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/provisioning_state.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/provisioning_state.rb new file mode 100644 index 0000000000..1eaa85ff8a --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/provisioning_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::ARM::ContainerRegistry + module Models + # + # Defines values for ProvisioningState + # + module ProvisioningState + Creating = "Creating" + Updating = "Updating" + Deleting = "Deleting" + Succeeded = "Succeeded" + Failed = "Failed" + Canceled = "Canceled" + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/regenerate_credential_parameters.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/regenerate_credential_parameters.rb new file mode 100644 index 0000000000..6842b40fe1 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/regenerate_credential_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::ARM::ContainerRegistry + module Models + # + # The parameters used to regenerate the login credential. + # + class RegenerateCredentialParameters + + include MsRestAzure + + # @return [PasswordName] Specifies name of the password which should be + # regenerated -- password or password2. Possible values include: + # 'password', 'password2' + attr_accessor :name + + + # + # Mapper for RegenerateCredentialParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegenerateCredentialParameters', + type: { + name: 'Composite', + class_name: 'RegenerateCredentialParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'Enum', + module: 'PasswordName' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry.rb new file mode 100644 index 0000000000..fecc091154 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry.rb @@ -0,0 +1,164 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # An object that represents a container registry. + # + class Registry < Resource + + include MsRestAzure + + # @return [Sku] The SKU of the container registry. + attr_accessor :sku + + # @return [String] The URL that can be used to log into the container + # registry. + attr_accessor :login_server + + # @return [DateTime] The creation date of the container registry in + # ISO8601 format. + attr_accessor :creation_date + + # @return [ProvisioningState] The provisioning state of the container + # registry at the time the operation was called. Possible values include: + # 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + attr_accessor :provisioning_state + + # @return [Status] The status of the container registry at the time the + # operation was called. + attr_accessor :status + + # @return [Boolean] The value that indicates whether the admin user is + # enabled. Default value: false . + attr_accessor :admin_user_enabled + + # @return [StorageAccountProperties] The properties of the storage + # account for the container registry. Only applicable to Classic SKU. + attr_accessor :storage_account + + + # + # Mapper for Registry class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Registry', + type: { + name: 'Composite', + class_name: 'Registry', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: true, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + login_server: { + required: false, + read_only: true, + serialized_name: 'properties.loginServer', + type: { + name: 'String' + } + }, + creation_date: { + required: false, + read_only: true, + serialized_name: 'properties.creationDate', + type: { + name: 'DateTime' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'properties.status', + type: { + name: 'Composite', + class_name: 'Status' + } + }, + admin_user_enabled: { + required: false, + serialized_name: 'properties.adminUserEnabled', + default_value: false, + type: { + name: 'Boolean' + } + }, + storage_account: { + required: false, + serialized_name: 'properties.storageAccount', + type: { + name: 'Composite', + class_name: 'StorageAccountProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_list_credentials_result.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_list_credentials_result.rb new file mode 100644 index 0000000000..b2fcad05fc --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_list_credentials_result.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # The response from the ListCredentials operation. + # + class RegistryListCredentialsResult + + include MsRestAzure + + # @return [String] The username for a container registry. + attr_accessor :username + + # @return [Array] The list of passwords for a container + # registry. + attr_accessor :passwords + + + # + # Mapper for RegistryListCredentialsResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryListCredentialsResult', + type: { + name: 'Composite', + class_name: 'RegistryListCredentialsResult', + model_properties: { + username: { + required: false, + serialized_name: 'username', + type: { + name: 'String' + } + }, + passwords: { + required: false, + serialized_name: 'passwords', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RegistryPasswordElementType', + type: { + name: 'Composite', + class_name: 'RegistryPassword' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_list_result.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_list_result.rb new file mode 100644 index 0000000000..b12c43d741 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_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::ARM::ContainerRegistry + module Models + # + # The result of a request to list container registries. + # + class RegistryListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of container registries. Since this + # list may be incomplete, the nextLink field should be used to request + # the next list of container registries. + attr_accessor :value + + # @return [String] The URI that can be used to request the next list of + # container registries. + 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 [RegistryListResult] 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 RegistryListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryListResult', + type: { + name: 'Composite', + class_name: 'RegistryListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RegistryElementType', + type: { + name: 'Composite', + class_name: 'Registry' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_name_check_request.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_name_check_request.rb new file mode 100644 index 0000000000..d0fe632b58 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_name_check_request.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # A request to check whether a container registry name is available. + # + class RegistryNameCheckRequest + + include MsRestAzure + + # @return [String] The name of the container registry. + attr_accessor :name + + # @return [String] The resource type of the container registry. This + # field must be set to 'Microsoft.ContainerRegistry/registries'. Default + # value: 'Microsoft.ContainerRegistry/registries' . + attr_accessor :type + + + # + # Mapper for RegistryNameCheckRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryNameCheckRequest', + type: { + name: 'Composite', + class_name: 'RegistryNameCheckRequest', + model_properties: { + name: { + required: true, + serialized_name: 'name', + constraints: { + MaxLength: 50, + MinLength: 5, + Pattern: '^[a-zA-Z0-9]*$' + }, + type: { + name: 'String' + } + }, + type: { + required: true, + is_constant: true, + serialized_name: 'type', + default_value: 'Microsoft.ContainerRegistry/registries', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_name_status.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_name_status.rb new file mode 100644 index 0000000000..ba7c0a6d26 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_name_status.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::ARM::ContainerRegistry + module Models + # + # The result of a request to check the availability of a container registry + # name. + # + class RegistryNameStatus + + include MsRestAzure + + # @return [Boolean] The value that indicates whether the name is + # available. + attr_accessor :name_available + + # @return [String] If any, the reason that the name is not available. + attr_accessor :reason + + # @return [String] If any, the error message that provides more detail + # for the reason that the name is not available. + attr_accessor :message + + + # + # Mapper for RegistryNameStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryNameStatus', + type: { + name: 'Composite', + class_name: 'RegistryNameStatus', + model_properties: { + name_available: { + required: false, + serialized_name: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + reason: { + required: false, + serialized_name: 'reason', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_password.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_password.rb new file mode 100644 index 0000000000..62857e9515 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_password.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::ARM::ContainerRegistry + module Models + # + # The login password for the container registry. + # + class RegistryPassword + + include MsRestAzure + + # @return [PasswordName] The password name. Possible values include: + # 'password', 'password2' + attr_accessor :name + + # @return [String] The password value. + attr_accessor :value + + + # + # Mapper for RegistryPassword class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryPassword', + type: { + name: 'Composite', + class_name: 'RegistryPassword', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'Enum', + module: 'PasswordName' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_update_parameters.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_update_parameters.rb new file mode 100644 index 0000000000..df9f86a3ca --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_update_parameters.rb @@ -0,0 +1,87 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # The parameters for updating a container registry. + # + class RegistryUpdateParameters + + include MsRestAzure + + # @return [Hash{String => String}] The tags for the container registry. + attr_accessor :tags + + # @return [Sku] The SKU of the container registry. + attr_accessor :sku + + # @return [Boolean] The value that indicates whether the admin user is + # enabled. + attr_accessor :admin_user_enabled + + # @return [StorageAccountProperties] The parameters of a storage account + # for the container registry. Only applicable to Classic SKU. If + # specified, the storage account must be in the same physical location as + # the container registry. + attr_accessor :storage_account + + + # + # Mapper for RegistryUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryUpdateParameters', + type: { + name: 'Composite', + class_name: 'RegistryUpdateParameters', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + admin_user_enabled: { + required: false, + serialized_name: 'properties.adminUserEnabled', + type: { + name: 'Boolean' + } + }, + storage_account: { + required: false, + serialized_name: 'properties.storageAccount', + type: { + name: 'Composite', + class_name: 'StorageAccountProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage.rb new file mode 100644 index 0000000000..fda93a78b0 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage.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::ARM::ContainerRegistry + module Models + # + # The quota usage for a container registry. + # + class RegistryUsage + + include MsRestAzure + + # @return [String] The name of the usage. + attr_accessor :name + + # @return [Integer] The limit of the usage. + attr_accessor :limit + + # @return [Integer] The current value of the usage. + attr_accessor :current_value + + # @return [RegistryUsageUnit] The unit of measurement. Possible values + # include: 'Count', 'Bytes' + attr_accessor :unit + + + # + # Mapper for RegistryUsage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryUsage', + type: { + name: 'Composite', + class_name: 'RegistryUsage', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + limit: { + required: false, + serialized_name: 'limit', + type: { + name: 'Number' + } + }, + current_value: { + required: false, + serialized_name: 'currentValue', + type: { + name: 'Number' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage_list_result.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage_list_result.rb new file mode 100644 index 0000000000..9cdedc4092 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage_list_result.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # The result of a request to get container registry quota usages. + # + class RegistryUsageListResult + + include MsRestAzure + + # @return [Array] The list of container registry quota + # usages. + attr_accessor :value + + + # + # Mapper for RegistryUsageListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegistryUsageListResult', + type: { + name: 'Composite', + class_name: 'RegistryUsageListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RegistryUsageElementType', + type: { + name: 'Composite', + class_name: 'RegistryUsage' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage_unit.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage_unit.rb new file mode 100644 index 0000000000..3178e94e67 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/registry_usage_unit.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::ARM::ContainerRegistry + module Models + # + # Defines values for RegistryUsageUnit + # + module RegistryUsageUnit + Count = "Count" + Bytes = "Bytes" + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication.rb new file mode 100644 index 0000000000..ae4a1f29d3 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication.rb @@ -0,0 +1,105 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # An object that represents a replication for a container registry. + # + class Replication < Resource + + include MsRestAzure + + # @return [ProvisioningState] The provisioning state of the replication + # at the time the operation was called. Possible values include: + # 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + attr_accessor :provisioning_state + + # @return [Status] The status of the replication at the time the + # operation was called. + attr_accessor :status + + + # + # Mapper for Replication class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Replication', + type: { + name: 'Composite', + class_name: 'Replication', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'properties.status', + type: { + name: 'Composite', + class_name: 'Status' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication_list_result.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication_list_result.rb new file mode 100644 index 0000000000..bfa2ae2d73 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication_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::ARM::ContainerRegistry + module Models + # + # The result of a request to list replications for a container registry. + # + class ReplicationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of replications. Since this list + # may be incomplete, the nextLink field should be used to request the + # next list of replications. + attr_accessor :value + + # @return [String] The URI that can be used to request the next list of + # replications. + 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 [ReplicationListResult] 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 ReplicationListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationListResult', + type: { + name: 'Composite', + class_name: 'ReplicationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ReplicationElementType', + type: { + name: 'Composite', + class_name: 'Replication' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication_update_parameters.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication_update_parameters.rb new file mode 100644 index 0000000000..bbf1e52e49 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/replication_update_parameters.rb @@ -0,0 +1,51 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # The parameters for updating a replication. + # + class ReplicationUpdateParameters + + include MsRestAzure + + # @return [Hash{String => String}] The tags for the replication. + attr_accessor :tags + + + # + # Mapper for ReplicationUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationUpdateParameters', + type: { + name: 'Composite', + class_name: 'ReplicationUpdateParameters', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/request.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/request.rb new file mode 100644 index 0000000000..0cdba70a7f --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/request.rb @@ -0,0 +1,87 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # The request that generated the event. + # + class Request + + include MsRestAzure + + # @return [String] The ID of the request that initiated the event. + attr_accessor :id + + # @return [String] The IP or hostname and possibly port of the client + # connection that initiated the event. This is the RemoteAddr from the + # standard http request. + attr_accessor :addr + + # @return [String] The externally accessible hostname of the registry + # instance, as specified by the http host header on incoming requests. + attr_accessor :host + + # @return [String] The request method that generated the event. + attr_accessor :method + + # @return [String] The user agent header of the request. + attr_accessor :useragent + + + # + # Mapper for Request class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Request', + type: { + name: 'Composite', + class_name: 'Request', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + addr: { + required: false, + serialized_name: 'addr', + type: { + name: 'String' + } + }, + host: { + required: false, + serialized_name: 'host', + type: { + name: 'String' + } + }, + method: { + required: false, + serialized_name: 'method', + type: { + name: 'String' + } + }, + useragent: { + required: false, + serialized_name: 'useragent', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/resource.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/resource.rb new file mode 100644 index 0000000000..cecfbd3efa --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/resource.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::ARM::ContainerRegistry + module Models + # + # An Azure resource. + # + class Resource + + include MsRestAzure + + # @return [String] The resource ID. + attr_accessor :id + + # @return [String] The name of the resource. + attr_accessor :name + + # @return [String] The type of the resource. + attr_accessor :type + + # @return [String] The location of the resource. This cannot be changed + # after the resource is created. + attr_accessor :location + + # @return [Hash{String => String}] The tags of the resource. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku.rb new file mode 100644 index 0000000000..34d0673f18 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku.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::ARM::ContainerRegistry + module Models + # + # The SKU of a container registry. + # + class Sku + + include MsRestAzure + + # @return [SkuName] The SKU name of the container registry. Required for + # registry creation. Possible values include: 'Classic', 'Basic', + # 'Standard', 'Premium' + attr_accessor :name + + # @return [SkuTier] The SKU tier based on the SKU name. Possible values + # include: 'Classic', 'Basic', 'Standard', 'Premium' + attr_accessor :tier + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tier: { + required: false, + read_only: true, + serialized_name: 'tier', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku_name.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku_name.rb new file mode 100644 index 0000000000..3292b9d1a3 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku_name.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::ARM::ContainerRegistry + module Models + # + # Defines values for SkuName + # + module SkuName + Classic = "Classic" + Basic = "Basic" + Standard = "Standard" + Premium = "Premium" + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku_tier.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku_tier.rb new file mode 100644 index 0000000000..09e9810ee2 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/sku_tier.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::ARM::ContainerRegistry + module Models + # + # Defines values for SkuTier + # + module SkuTier + Classic = "Classic" + Basic = "Basic" + Standard = "Standard" + Premium = "Premium" + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/source.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/source.rb new file mode 100644 index 0000000000..9657613954 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/source.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::ARM::ContainerRegistry + module Models + # + # The registry node that generated the event. Put differently, while the + # actor initiates the event, the source generates it. + # + class Source + + include MsRestAzure + + # @return [String] The IP or hostname and the port of the registry node + # that generated the event. Generally, this will be resolved by + # os.Hostname() along with the running port. + attr_accessor :addr + + # @return [String] The running instance of an application. Changes after + # each restart. + attr_accessor :instance_id + + + # + # Mapper for Source class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Source', + type: { + name: 'Composite', + class_name: 'Source', + model_properties: { + addr: { + required: false, + serialized_name: 'addr', + type: { + name: 'String' + } + }, + instance_id: { + required: false, + serialized_name: 'instanceID', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/status.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/status.rb new file mode 100644 index 0000000000..812880473c --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/status.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::ARM::ContainerRegistry + module Models + # + # The status of an Azure resource at the time the operation was called. + # + class Status + + include MsRestAzure + + # @return [String] The short label for the status. + attr_accessor :display_status + + # @return [String] The detailed message for the status, including alerts + # and error messages. + attr_accessor :message + + # @return [DateTime] The timestamp when the status was changed to the + # current value. + attr_accessor :timestamp + + + # + # Mapper for Status class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Status', + type: { + name: 'Composite', + class_name: 'Status', + model_properties: { + display_status: { + required: false, + read_only: true, + serialized_name: 'displayStatus', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + }, + timestamp: { + required: false, + read_only: true, + serialized_name: 'timestamp', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/storage_account_properties.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/storage_account_properties.rb new file mode 100644 index 0000000000..ebb2d77a40 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/storage_account_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::ARM::ContainerRegistry + module Models + # + # The properties of a storage account for a container registry. Only + # applicable to Classic SKU. + # + class StorageAccountProperties + + include MsRestAzure + + # @return [String] The resource ID of the storage account. + attr_accessor :id + + + # + # Mapper for StorageAccountProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageAccountProperties', + type: { + name: 'Composite', + class_name: 'StorageAccountProperties', + model_properties: { + id: { + required: true, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/target.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/target.rb new file mode 100644 index 0000000000..b152714736 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/target.rb @@ -0,0 +1,107 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # The target of the event. + # + class Target + + include MsRestAzure + + # @return [String] The MIME type of the referenced object. + attr_accessor :media_type + + # @return [Integer] The number of bytes of the content. Same as Length + # field. + attr_accessor :size + + # @return [String] The digest of the content, as defined by the Registry + # V2 HTTP API Specificiation. + attr_accessor :digest + + # @return [Integer] The number of bytes of the content. Same as Size + # field. + attr_accessor :length + + # @return [String] The repository name. + attr_accessor :repository + + # @return [String] The direct URL to the content. + attr_accessor :url + + # @return [String] The tag name. + attr_accessor :tag + + + # + # Mapper for Target class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Target', + type: { + name: 'Composite', + class_name: 'Target', + model_properties: { + media_type: { + required: false, + serialized_name: 'mediaType', + type: { + name: 'String' + } + }, + size: { + required: false, + serialized_name: 'size', + type: { + name: 'Number' + } + }, + digest: { + required: false, + serialized_name: 'digest', + type: { + name: 'String' + } + }, + length: { + required: false, + serialized_name: 'length', + type: { + name: 'Number' + } + }, + repository: { + required: false, + serialized_name: 'repository', + type: { + name: 'String' + } + }, + url: { + required: false, + serialized_name: 'url', + type: { + name: 'String' + } + }, + tag: { + required: false, + serialized_name: 'tag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook.rb new file mode 100644 index 0000000000..8fda06e76c --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook.rb @@ -0,0 +1,134 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + module Models + # + # An object that represents a webhook for a container registry. + # + class Webhook < Resource + + include MsRestAzure + + # @return [WebhookStatus] The status of the webhook at the time the + # operation was called. Possible values include: 'enabled', 'disabled' + attr_accessor :status + + # @return [String] The scope of repositories where the event can be + # triggered. For example, 'foo:*' means events for all tags under + # repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + # equivalent to 'foo:latest'. Empty means all events. + attr_accessor :scope + + # @return [Array] The list of actions that trigger the + # webhook to post notifications. + attr_accessor :actions + + # @return [ProvisioningState] The provisioning state of the webhook at + # the time the operation was called. Possible values include: 'Creating', + # 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + attr_accessor :provisioning_state + + + # + # Mapper for Webhook class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Webhook', + type: { + name: 'Composite', + class_name: 'Webhook', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + scope: { + required: false, + serialized_name: 'properties.scope', + type: { + name: 'String' + } + }, + actions: { + required: true, + serialized_name: 'properties.actions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WebhookActionElementType', + type: { + name: 'String' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_action.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_action.rb new file mode 100644 index 0000000000..389708d7a7 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_action.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::ARM::ContainerRegistry + module Models + # + # Defines values for WebhookAction + # + module WebhookAction + Push = "push" + Delete = "delete" + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_create_parameters.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_create_parameters.rb new file mode 100644 index 0000000000..76a2e2ff08 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_create_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::ARM::ContainerRegistry + module Models + # + # The parameters for creating a webhook. + # + class WebhookCreateParameters + + include MsRestAzure + + # @return [Hash{String => String}] The tags for the webhook. + attr_accessor :tags + + # @return [String] The location of the webhook. This cannot be changed + # after the resource is created. + attr_accessor :location + + # @return [String] The service URI for the webhook to post notifications. + attr_accessor :service_uri + + # @return [Hash{String => String}] Custom headers that will be added to + # the webhook notifications. + attr_accessor :custom_headers + + # @return [WebhookStatus] The status of the webhook at the time the + # operation was called. Possible values include: 'enabled', 'disabled' + attr_accessor :status + + # @return [String] The scope of repositories where the event can be + # triggered. For example, 'foo:*' means events for all tags under + # repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + # equivalent to 'foo:latest'. Empty means all events. + attr_accessor :scope + + # @return [Array] The list of actions that trigger the + # webhook to post notifications. + attr_accessor :actions + + + # + # Mapper for WebhookCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebhookCreateParameters', + type: { + name: 'Composite', + class_name: 'WebhookCreateParameters', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + service_uri: { + required: true, + serialized_name: 'properties.serviceUri', + type: { + name: 'String' + } + }, + custom_headers: { + required: false, + serialized_name: 'properties.customHeaders', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + scope: { + required: false, + serialized_name: 'properties.scope', + type: { + name: 'String' + } + }, + actions: { + required: true, + serialized_name: 'properties.actions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WebhookActionElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_list_result.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_list_result.rb new file mode 100644 index 0000000000..f8dfddfab8 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_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::ARM::ContainerRegistry + module Models + # + # The result of a request to list webhooks for a container registry. + # + class WebhookListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of webhooks. Since this list may be + # incomplete, the nextLink field should be used to request the next list + # of webhooks. + attr_accessor :value + + # @return [String] The URI that can be used to request the next list of + # webhooks. + 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 [WebhookListResult] 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 WebhookListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebhookListResult', + type: { + name: 'Composite', + class_name: 'WebhookListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WebhookElementType', + type: { + name: 'Composite', + class_name: 'Webhook' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_status.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_status.rb new file mode 100644 index 0000000000..ca86429fd2 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_status.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::ARM::ContainerRegistry + module Models + # + # Defines values for WebhookStatus + # + module WebhookStatus + Enabled = "enabled" + Disabled = "disabled" + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_update_parameters.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_update_parameters.rb new file mode 100644 index 0000000000..a1d152e07b --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/models/webhook_update_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::ARM::ContainerRegistry + module Models + # + # The parameters for updating a webhook. + # + class WebhookUpdateParameters + + include MsRestAzure + + # @return [Hash{String => String}] The tags for the webhook. + attr_accessor :tags + + # @return [String] The service URI for the webhook to post notifications. + attr_accessor :service_uri + + # @return [Hash{String => String}] Custom headers that will be added to + # the webhook notifications. + attr_accessor :custom_headers + + # @return [WebhookStatus] The status of the webhook at the time the + # operation was called. Possible values include: 'enabled', 'disabled' + attr_accessor :status + + # @return [String] The scope of repositories where the event can be + # triggered. For example, 'foo:*' means events for all tags under + # repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is + # equivalent to 'foo:latest'. Empty means all events. + attr_accessor :scope + + # @return [Array] The list of actions that trigger the + # webhook to post notifications. + attr_accessor :actions + + + # + # Mapper for WebhookUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebhookUpdateParameters', + type: { + name: 'Composite', + class_name: 'WebhookUpdateParameters', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + service_uri: { + required: false, + serialized_name: 'properties.serviceUri', + type: { + name: 'String' + } + }, + custom_headers: { + required: false, + serialized_name: 'properties.customHeaders', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'String' + } + }, + scope: { + required: false, + serialized_name: 'properties.scope', + type: { + name: 'String' + } + }, + actions: { + required: false, + serialized_name: 'properties.actions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WebhookActionElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/module_definition.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/module_definition.rb new file mode 100644 index 0000000000..d9cd502f1d --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/module_definition.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 end +module Azure::ARM end +module Azure::ARM::ContainerRegistry end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/operations.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/operations.rb new file mode 100644 index 0000000000..024187bc53 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/operations.rb @@ -0,0 +1,213 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + # + # Operations + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ContainerRegistryManagementClient] reference to the ContainerRegistryManagementClient + attr_reader :client + + # + # Lists all of the available Azure Container Registry REST API operations. + # + # @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 Azure Container Registry REST API operations. + # + # @param custom_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 Azure Container Registry REST API operations. + # + # @param [Hash{String => String}] 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.ContainerRegistry/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::ARM::ContainerRegistry::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 Azure Container Registry REST 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 [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 Azure Container Registry REST 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_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 Azure Container Registry REST 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_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::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 Azure Container Registry REST API operations. + # + # @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_container_registry/lib/generated/azure_mgmt_container_registry/registries.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/registries.rb new file mode 100644 index 0000000000..fe2cb7ed15 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/registries.rb @@ -0,0 +1,1371 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + # + # Registries + # + class Registries + include MsRestAzure + + # + # Creates and initializes a new instance of the Registries class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ContainerRegistryManagementClient] reference to the ContainerRegistryManagementClient + attr_reader :client + + # + # Checks whether the container registry name is available for use. The name + # must contain only alphanumeric characters, be globally unique, and between 5 + # and 50 characters in length. + # + # @param registry_name_check_request [RegistryNameCheckRequest] The object + # containing information for the availability request. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RegistryNameStatus] operation results. + # + def check_name_availability(registry_name_check_request, custom_headers = nil) + response = check_name_availability_async(registry_name_check_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks whether the container registry name is available for use. The name + # must contain only alphanumeric characters, be globally unique, and between 5 + # and 50 characters in length. + # + # @param registry_name_check_request [RegistryNameCheckRequest] The object + # containing information for the availability request. + # @param custom_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(registry_name_check_request, custom_headers = nil) + check_name_availability_async(registry_name_check_request, custom_headers).value! + end + + # + # Checks whether the container registry name is available for use. The name + # must contain only alphanumeric characters, be globally unique, and between 5 + # and 50 characters in length. + # + # @param registry_name_check_request [RegistryNameCheckRequest] The object + # containing information for the availability request. + # @param [Hash{String => String}] 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(registry_name_check_request, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'registry_name_check_request is nil' if registry_name_check_request.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ContainerRegistry::Models::RegistryNameCheckRequest.mapper() + request_content = @client.serialize(request_mapper, registry_name_check_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/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::ARM::ContainerRegistry::Models::RegistryNameStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Registry] operation results. + # + def get(resource_group_name, registry_name, custom_headers = nil) + response = get_async(resource_group_name, registry_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the properties of the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_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, registry_name, custom_headers = nil) + get_async(resource_group_name, registry_name, custom_headers).value! + end + + # + # Gets the properties of the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param [Hash{String => String}] 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, registry_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}' + + 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,'registryName' => registry_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::ARM::ContainerRegistry::Models::Registry.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry [Registry] The parameters for creating a container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Registry] operation results. + # + def create(resource_group_name, registry_name, registry, custom_headers = nil) + response = create_async(resource_group_name, registry_name, registry, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry [Registry] The parameters for creating a container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(resource_group_name, registry_name, registry, custom_headers = nil) + # Send request + promise = begin_create_async(resource_group_name, registry_name, registry, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ContainerRegistry::Models::Registry.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, registry_name, custom_headers = nil) + response = delete_async(resource_group_name, registry_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, registry_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, registry_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry_update_parameters [RegistryUpdateParameters] The parameters + # for updating a container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Registry] operation results. + # + def update(resource_group_name, registry_name, registry_update_parameters, custom_headers = nil) + response = update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry_update_parameters [RegistryUpdateParameters] The parameters + # for updating a container registry. + # @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, registry_name, registry_update_parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ContainerRegistry::Models::Registry.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists all the container registries under the specified resource group. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @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 + + # + # Lists all the container registries under the specified resource group. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param custom_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 + + # + # Lists all the container registries under the specified resource group. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param [Hash{String => String}] 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, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries' + + 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}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::RegistryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the container registries under the specified 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 the container registries under the specified 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 the container registries under the specified 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.ContainerRegistry/registries' + + 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::ARM::ContainerRegistry::Models::RegistryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 login credentials for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RegistryListCredentialsResult] operation results. + # + def list_credentials(resource_group_name, registry_name, custom_headers = nil) + response = list_credentials_async(resource_group_name, registry_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the login credentials for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_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_credentials_with_http_info(resource_group_name, registry_name, custom_headers = nil) + list_credentials_async(resource_group_name, registry_name, custom_headers).value! + end + + # + # Lists the login credentials for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param [Hash{String => String}] 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_credentials_async(resource_group_name, registry_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/listCredentials' + + 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,'registryName' => registry_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 == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::RegistryListCredentialsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates one of the login credentials for the specified container + # registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param regenerate_credential_parameters [RegenerateCredentialParameters] + # Specifies name of the password which should be regenerated -- password or + # password2. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RegistryListCredentialsResult] operation results. + # + def regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers = nil) + response = regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates one of the login credentials for the specified container + # registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param regenerate_credential_parameters [RegenerateCredentialParameters] + # Specifies name of the password which should be regenerated -- password or + # password2. + # @param custom_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_credential_with_http_info(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers = nil) + regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers).value! + end + + # + # Regenerates one of the login credentials for the specified container + # registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param regenerate_credential_parameters [RegenerateCredentialParameters] + # Specifies name of the password which should be regenerated -- password or + # password2. + # @param [Hash{String => String}] 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_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'regenerate_credential_parameters is nil' if regenerate_credential_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::ARM::ContainerRegistry::Models::RegenerateCredentialParameters.mapper() + request_content = @client.serialize(request_mapper, regenerate_credential_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential' + + 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,'registryName' => registry_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 == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::RegistryListCredentialsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 quota usages for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RegistryUsageListResult] operation results. + # + def list_usages(resource_group_name, registry_name, custom_headers = nil) + response = list_usages_async(resource_group_name, registry_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the quota usages for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_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_usages_with_http_info(resource_group_name, registry_name, custom_headers = nil) + list_usages_async(resource_group_name, registry_name, custom_headers).value! + end + + # + # Gets the quota usages for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param [Hash{String => String}] 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_usages_async(resource_group_name, registry_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/listUsages' + + 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,'registryName' => registry_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::ARM::ContainerRegistry::Models::RegistryUsageListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry [Registry] The parameters for creating a container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Registry] operation results. + # + def begin_create(resource_group_name, registry_name, registry, custom_headers = nil) + response = begin_create_async(resource_group_name, registry_name, registry, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry [Registry] The parameters for creating a container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(resource_group_name, registry_name, registry, custom_headers = nil) + begin_create_async(resource_group_name, registry_name, registry, custom_headers).value! + end + + # + # Creates a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry [Registry] The parameters for creating a container registry. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(resource_group_name, registry_name, registry, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'registry is nil' if registry.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ContainerRegistry::Models::Registry.mapper() + request_content = @client.serialize(request_mapper, registry) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}' + + 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,'registryName' => registry_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Registry.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Registry.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, registry_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, registry_name, custom_headers).value! + nil + end + + # + # Deletes a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, registry_name, custom_headers = nil) + begin_delete_async(resource_group_name, registry_name, custom_headers).value! + end + + # + # Deletes a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, registry_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}' + + 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,'registryName' => registry_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry_update_parameters [RegistryUpdateParameters] The parameters + # for updating a container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Registry] operation results. + # + def begin_update(resource_group_name, registry_name, registry_update_parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry_update_parameters [RegistryUpdateParameters] The parameters + # for updating a container registry. + # @param custom_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, registry_name, registry_update_parameters, custom_headers = nil) + begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers).value! + end + + # + # Updates a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param registry_update_parameters [RegistryUpdateParameters] The parameters + # for updating a container registry. + # @param [Hash{String => String}] 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, registry_name, registry_update_parameters, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'registry_update_parameters is nil' if registry_update_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::ARM::ContainerRegistry::Models::RegistryUpdateParameters.mapper() + request_content = @client.serialize(request_mapper, registry_update_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}' + + 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,'registryName' => registry_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(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Registry.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Registry.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the container registries under the specified 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 [RegistryListResult] operation results. + # + def list_by_resource_group_next(next_page_link, custom_headers = nil) + response = list_by_resource_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all the container registries under the specified 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 + + # + # Lists all the container registries under the specified 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::ARM::ContainerRegistry::Models::RegistryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the container registries under the specified 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 [RegistryListResult] 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 the container registries under the specified 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 the container registries under the specified 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::ARM::ContainerRegistry::Models::RegistryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the container registries under the specified resource group. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RegistryListResult] 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 the container registries under the specified subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RegistryListResult] 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_container_registry/lib/generated/azure_mgmt_container_registry/replications.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/replications.rb new file mode 100644 index 0000000000..bbed7c308d --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/replications.rb @@ -0,0 +1,799 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + # + # Replications + # + class Replications + include MsRestAzure + + # + # Creates and initializes a new instance of the Replications class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ContainerRegistryManagementClient] reference to the ContainerRegistryManagementClient + attr_reader :client + + # + # Gets the properties of the specified replication. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Replication] operation results. + # + def get(resource_group_name, registry_name, replication_name, custom_headers = nil) + response = get_async(resource_group_name, registry_name, replication_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the properties of the specified replication. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param custom_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, registry_name, replication_name, custom_headers = nil) + get_async(resource_group_name, registry_name, replication_name, custom_headers).value! + end + + # + # Gets the properties of the specified replication. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param [Hash{String => String}] 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, registry_name, replication_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'replication_name is nil' if replication_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/replications/{replicationName}' + + 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,'registryName' => registry_name,'replicationName' => replication_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::ARM::ContainerRegistry::Models::Replication.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication [Replication] The parameters for creating a replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Replication] operation results. + # + def create(resource_group_name, registry_name, replication_name, replication, custom_headers = nil) + response = create_async(resource_group_name, registry_name, replication_name, replication, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication [Replication] The parameters for creating a replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(resource_group_name, registry_name, replication_name, replication, custom_headers = nil) + # Send request + promise = begin_create_async(resource_group_name, registry_name, replication_name, replication, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ContainerRegistry::Models::Replication.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a replication from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, registry_name, replication_name, custom_headers = nil) + response = delete_async(resource_group_name, registry_name, replication_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, registry_name, replication_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, registry_name, replication_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates a replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication_update_parameters [ReplicationUpdateParameters] The + # parameters for updating a replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Replication] operation results. + # + def update(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers = nil) + response = update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication_update_parameters [ReplicationUpdateParameters] The + # parameters for updating a replication. + # @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, registry_name, replication_name, replication_update_parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ContainerRegistry::Models::Replication.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists all the replications for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @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, registry_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, registry_name, custom_headers) + first_page.get_all_items + end + + # + # Lists all the replications for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_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, registry_name, custom_headers = nil) + list_async(resource_group_name, registry_name, custom_headers).value! + end + + # + # Lists all the replications for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param [Hash{String => String}] 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, registry_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/replications' + + 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,'registryName' => registry_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::ARM::ContainerRegistry::Models::ReplicationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication [Replication] The parameters for creating a replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Replication] operation results. + # + def begin_create(resource_group_name, registry_name, replication_name, replication, custom_headers = nil) + response = begin_create_async(resource_group_name, registry_name, replication_name, replication, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication [Replication] The parameters for creating a replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(resource_group_name, registry_name, replication_name, replication, custom_headers = nil) + begin_create_async(resource_group_name, registry_name, replication_name, replication, custom_headers).value! + end + + # + # Creates a replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication [Replication] The parameters for creating a replication. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(resource_group_name, registry_name, replication_name, replication, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'replication_name is nil' if replication_name.nil? + fail ArgumentError, 'replication is nil' if replication.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ContainerRegistry::Models::Replication.mapper() + request_content = @client.serialize(request_mapper, replication) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}' + + 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,'registryName' => registry_name,'replicationName' => replication_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Replication.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Replication.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a replication from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, registry_name, replication_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, registry_name, replication_name, custom_headers).value! + nil + end + + # + # Deletes a replication from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, registry_name, replication_name, custom_headers = nil) + begin_delete_async(resource_group_name, registry_name, replication_name, custom_headers).value! + end + + # + # Deletes a replication from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, registry_name, replication_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'replication_name is nil' if replication_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/replications/{replicationName}' + + 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,'registryName' => registry_name,'replicationName' => replication_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates a replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication_update_parameters [ReplicationUpdateParameters] The + # parameters for updating a replication. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Replication] operation results. + # + def begin_update(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication_update_parameters [ReplicationUpdateParameters] The + # parameters for updating a replication. + # @param custom_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, registry_name, replication_name, replication_update_parameters, custom_headers = nil) + begin_update_async(resource_group_name, registry_name, replication_name, replication_update_parameters, custom_headers).value! + end + + # + # Updates a replication for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param replication_name [String] The name of the replication. + # @param replication_update_parameters [ReplicationUpdateParameters] The + # parameters for updating a replication. + # @param [Hash{String => String}] 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, registry_name, replication_name, replication_update_parameters, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'replication_name is nil' if replication_name.nil? + fail ArgumentError, 'replication_update_parameters is nil' if replication_update_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::ARM::ContainerRegistry::Models::ReplicationUpdateParameters.mapper() + request_content = @client.serialize(request_mapper, replication_update_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}' + + 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,'registryName' => registry_name,'replicationName' => replication_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(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Replication.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Replication.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the replications for the specified container registry. + # + # @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 [ReplicationListResult] 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 the replications for the specified container registry. + # + # @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 the replications for the specified container registry. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::ReplicationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the replications for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, registry_name, custom_headers = nil) + response = list_async(resource_group_name, registry_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/version.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/version.rb new file mode 100644 index 0000000000..b2a28cca0e --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/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::ARM::ContainerRegistry + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/webhooks.rb b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/webhooks.rb new file mode 100644 index 0000000000..0d075ff359 --- /dev/null +++ b/management/azure_mgmt_container_registry/lib/generated/azure_mgmt_container_registry/webhooks.rb @@ -0,0 +1,1208 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ContainerRegistry + # + # Webhooks + # + class Webhooks + include MsRestAzure + + # + # Creates and initializes a new instance of the Webhooks class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ContainerRegistryManagementClient] reference to the ContainerRegistryManagementClient + attr_reader :client + + # + # Gets the properties of the specified webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def get(resource_group_name, registry_name, webhook_name, custom_headers = nil) + response = get_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the properties of the specified webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_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, registry_name, webhook_name, custom_headers = nil) + get_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + end + + # + # Gets the properties of the specified webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param [Hash{String => String}] 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, registry_name, webhook_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}' + + 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,'registryName' => registry_name,'webhookName' => webhook_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::ARM::ContainerRegistry::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webhook for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_create_parameters [WebhookCreateParameters] The parameters for + # creating a webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def create(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers = nil) + response = create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_create_parameters [WebhookCreateParameters] The parameters for + # creating a webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers = nil) + # Send request + promise = begin_create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ContainerRegistry::Models::Webhook.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a webhook from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, registry_name, webhook_name, custom_headers = nil) + response = delete_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, registry_name, webhook_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, registry_name, webhook_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates a webhook with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_update_parameters [WebhookUpdateParameters] The parameters for + # updating a webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def update(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers = nil) + response = update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_update_parameters [WebhookUpdateParameters] The parameters for + # updating a webhook. + # @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, registry_name, webhook_name, webhook_update_parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ContainerRegistry::Models::Webhook.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists all the webhooks for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @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, registry_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, registry_name, custom_headers) + first_page.get_all_items + end + + # + # Lists all the webhooks for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_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, registry_name, custom_headers = nil) + list_async(resource_group_name, registry_name, custom_headers).value! + end + + # + # Lists all the webhooks for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param [Hash{String => String}] 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, registry_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/webhooks' + + 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,'registryName' => registry_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::ARM::ContainerRegistry::Models::WebhookListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Triggers a ping event to be sent to the webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventInfo] operation results. + # + def ping(resource_group_name, registry_name, webhook_name, custom_headers = nil) + response = ping_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Triggers a ping event to be sent to the webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def ping_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers = nil) + ping_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + end + + # + # Triggers a ping event to be sent to the webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def ping_async(resource_group_name, registry_name, webhook_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping' + + 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,'registryName' => registry_name,'webhookName' => webhook_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 == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::EventInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 configuration of service URI and custom headers for the webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CallbackConfig] operation results. + # + def get_callback_config(resource_group_name, registry_name, webhook_name, custom_headers = nil) + response = get_callback_config_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the configuration of service URI and custom headers for the webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_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_callback_config_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers = nil) + get_callback_config_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + end + + # + # Gets the configuration of service URI and custom headers for the webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param [Hash{String => String}] 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_callback_config_async(resource_group_name, registry_name, webhook_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig' + + 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,'registryName' => registry_name,'webhookName' => webhook_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 == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::CallbackConfig.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recent events for the specified webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @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_events(resource_group_name, registry_name, webhook_name, custom_headers = nil) + first_page = list_events_as_lazy(resource_group_name, registry_name, webhook_name, custom_headers) + first_page.get_all_items + end + + # + # Lists recent events for the specified webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_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_events_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers = nil) + list_events_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + end + + # + # Lists recent events for the specified webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param [Hash{String => String}] 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_events_async(resource_group_name, registry_name, webhook_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents' + + 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,'registryName' => registry_name,'webhookName' => webhook_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 == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::EventListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webhook for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_create_parameters [WebhookCreateParameters] The parameters for + # creating a webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def begin_create(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers = nil) + response = begin_create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a webhook for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_create_parameters [WebhookCreateParameters] The parameters for + # creating a webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers = nil) + begin_create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers).value! + end + + # + # Creates a webhook for a container registry with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_create_parameters [WebhookCreateParameters] The parameters for + # creating a webhook. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(resource_group_name, registry_name, webhook_name, webhook_create_parameters, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + fail ArgumentError, 'webhook_create_parameters is nil' if webhook_create_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::ARM::ContainerRegistry::Models::WebhookCreateParameters.mapper() + request_content = @client.serialize(request_mapper, webhook_create_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}' + + 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,'registryName' => registry_name,'webhookName' => webhook_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a webhook from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, registry_name, webhook_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + nil + end + + # + # Deletes a webhook from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, registry_name, webhook_name, custom_headers = nil) + begin_delete_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + end + + # + # Deletes a webhook from a container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, registry_name, webhook_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + + + request_headers = {} + + # Set Headers + request_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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}' + + 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,'registryName' => registry_name,'webhookName' => webhook_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates a webhook with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_update_parameters [WebhookUpdateParameters] The parameters for + # updating a webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Webhook] operation results. + # + def begin_update(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a webhook with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_update_parameters [WebhookUpdateParameters] The parameters for + # updating a webhook. + # @param custom_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, registry_name, webhook_name, webhook_update_parameters, custom_headers = nil) + begin_update_async(resource_group_name, registry_name, webhook_name, webhook_update_parameters, custom_headers).value! + end + + # + # Updates a webhook with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param webhook_update_parameters [WebhookUpdateParameters] The parameters for + # updating a webhook. + # @param [Hash{String => String}] 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, registry_name, webhook_name, webhook_update_parameters, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'registry_name is nil' if registry_name.nil? + fail ArgumentError, 'webhook_name is nil' if webhook_name.nil? + fail ArgumentError, 'webhook_update_parameters is nil' if webhook_update_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::ARM::ContainerRegistry::Models::WebhookUpdateParameters.mapper() + request_content = @client.serialize(request_mapper, webhook_update_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}' + + 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,'registryName' => registry_name,'webhookName' => webhook_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(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::Webhook.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the webhooks for the specified container registry. + # + # @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 [WebhookListResult] 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 the webhooks for the specified container registry. + # + # @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 the webhooks for the specified container registry. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::WebhookListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recent events for the specified webhook. + # + # @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 [EventListResult] operation results. + # + def list_events_next(next_page_link, custom_headers = nil) + response = list_events_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists recent events for the specified webhook. + # + # @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_events_next_with_http_info(next_page_link, custom_headers = nil) + list_events_next_async(next_page_link, custom_headers).value! + end + + # + # Lists recent events for the specified webhook. + # + # @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_events_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ContainerRegistry::Models::EventListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the webhooks for the specified container registry. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebhookListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, registry_name, custom_headers = nil) + response = list_async(resource_group_name, registry_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists recent events for the specified webhook. + # + # @param resource_group_name [String] The name of the resource group to which + # the container registry belongs. + # @param registry_name [String] The name of the container registry. + # @param webhook_name [String] The name of the webhook. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventListResult] which provide lazy access to pages of the response. + # + def list_events_as_lazy(resource_group_name, registry_name, webhook_name, custom_headers = nil) + response = list_events_async(resource_group_name, registry_name, webhook_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_events_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_container_registry/spec/spec_helper.rb b/management/azure_mgmt_container_registry/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_container_registry/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_customer_insights/.rspec b/management/azure_mgmt_customer_insights/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_customer_insights/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_customer_insights/LICENSE.txt b/management/azure_mgmt_customer_insights/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_customer_insights/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_customer_insights/Rakefile b/management/azure_mgmt_customer_insights/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_customer_insights/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_customer_insights/azure_mgmt_customer_insights.gemspec b/management/azure_mgmt_customer_insights/azure_mgmt_customer_insights.gemspec new file mode 100644 index 0000000000..f53f469e19 --- /dev/null +++ b/management/azure_mgmt_customer_insights/azure_mgmt_customer_insights.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_customer_insights/module_definition' +require 'generated/azure_mgmt_customer_insights/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_customer_insights' + spec.version = Azure::ARM::CustomerInsights::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Customer Insights Services Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Customer Insights.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_customer_insights/lib/azure_mgmt_customer_insights.rb b/management/azure_mgmt_customer_insights/lib/azure_mgmt_customer_insights.rb new file mode 100644 index 0000000000..ca242b49d8 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/azure_mgmt_customer_insights.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_customer_insights' + diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights.rb new file mode 100644 index 0000000000..f0a09d1340 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights.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. + +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 'generated/azure_mgmt_customer_insights/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::CustomerInsights + autoload :Hubs, 'generated/azure_mgmt_customer_insights/hubs.rb' + autoload :Profiles, 'generated/azure_mgmt_customer_insights/profiles.rb' + autoload :Interactions, 'generated/azure_mgmt_customer_insights/interactions.rb' + autoload :Relationships, 'generated/azure_mgmt_customer_insights/relationships.rb' + autoload :RelationshipLinks, 'generated/azure_mgmt_customer_insights/relationship_links.rb' + autoload :AuthorizationPolicies, 'generated/azure_mgmt_customer_insights/authorization_policies.rb' + autoload :Connectors, 'generated/azure_mgmt_customer_insights/connectors.rb' + autoload :ConnectorMappings, 'generated/azure_mgmt_customer_insights/connector_mappings.rb' + autoload :Kpi, 'generated/azure_mgmt_customer_insights/kpi.rb' + autoload :WidgetTypes, 'generated/azure_mgmt_customer_insights/widget_types.rb' + autoload :Views, 'generated/azure_mgmt_customer_insights/views.rb' + autoload :Links, 'generated/azure_mgmt_customer_insights/links.rb' + autoload :Roles, 'generated/azure_mgmt_customer_insights/roles.rb' + autoload :RoleAssignments, 'generated/azure_mgmt_customer_insights/role_assignments.rb' + autoload :Images, 'generated/azure_mgmt_customer_insights/images.rb' + autoload :Predictions, 'generated/azure_mgmt_customer_insights/predictions.rb' + autoload :CustomerInsightsManagementClient, 'generated/azure_mgmt_customer_insights/customer_insights_management_client.rb' + + module Models + autoload :InteractionListResult, 'generated/azure_mgmt_customer_insights/models/interaction_list_result.rb' + autoload :ParticipantProfilePropertyReference, 'generated/azure_mgmt_customer_insights/models/participant_profile_property_reference.rb' + autoload :Participant, 'generated/azure_mgmt_customer_insights/models/participant.rb' + autoload :HubListResult, 'generated/azure_mgmt_customer_insights/models/hub_list_result.rb' + autoload :StrongId, 'generated/azure_mgmt_customer_insights/models/strong_id.rb' + autoload :ProfileEnumValidValuesFormat, 'generated/azure_mgmt_customer_insights/models/profile_enum_valid_values_format.rb' + autoload :DataSourcePrecedence, 'generated/azure_mgmt_customer_insights/models/data_source_precedence.rb' + autoload :PropertyDefinition, 'generated/azure_mgmt_customer_insights/models/property_definition.rb' + autoload :RelationshipsLookup, 'generated/azure_mgmt_customer_insights/models/relationships_lookup.rb' + autoload :AuthorizationPolicy, 'generated/azure_mgmt_customer_insights/models/authorization_policy.rb' + autoload :ProfileListResult, 'generated/azure_mgmt_customer_insights/models/profile_list_result.rb' + autoload :SalesforceTable, 'generated/azure_mgmt_customer_insights/models/salesforce_table.rb' + autoload :ImageDefinition, 'generated/azure_mgmt_customer_insights/models/image_definition.rb' + autoload :AzureBlobConnectorProperties, 'generated/azure_mgmt_customer_insights/models/azure_blob_connector_properties.rb' + autoload :HubBillingInfoFormat, 'generated/azure_mgmt_customer_insights/models/hub_billing_info_format.rb' + autoload :CrmConnectorProperties, 'generated/azure_mgmt_customer_insights/models/crm_connector_properties.rb' + autoload :ConnectorMappingFormat, 'generated/azure_mgmt_customer_insights/models/connector_mapping_format.rb' + autoload :KpiListResult, 'generated/azure_mgmt_customer_insights/models/kpi_list_result.rb' + autoload :ConnectorMappingStructure, 'generated/azure_mgmt_customer_insights/models/connector_mapping_structure.rb' + autoload :PredictionListResult, 'generated/azure_mgmt_customer_insights/models/prediction_list_result.rb' + autoload :ConnectorMappingProperties, 'generated/azure_mgmt_customer_insights/models/connector_mapping_properties.rb' + autoload :PredictionModelStatus, 'generated/azure_mgmt_customer_insights/models/prediction_model_status.rb' + autoload :KpiGroupByMetadata, 'generated/azure_mgmt_customer_insights/models/kpi_group_by_metadata.rb' + autoload :ConnectorListResult, 'generated/azure_mgmt_customer_insights/models/connector_list_result.rb' + autoload :KpiAlias, 'generated/azure_mgmt_customer_insights/models/kpi_alias.rb' + autoload :PredictionTrainingResults, 'generated/azure_mgmt_customer_insights/models/prediction_training_results.rb' + autoload :KpiDefinition, 'generated/azure_mgmt_customer_insights/models/kpi_definition.rb' + autoload :ConnectorMappingListResult, 'generated/azure_mgmt_customer_insights/models/connector_mapping_list_result.rb' + autoload :ProxyResource, 'generated/azure_mgmt_customer_insights/models/proxy_resource.rb' + autoload :CanonicalProfileDefinition, 'generated/azure_mgmt_customer_insights/models/canonical_profile_definition.rb' + autoload :ParticipantPropertyReference, 'generated/azure_mgmt_customer_insights/models/participant_property_reference.rb' + autoload :AuthorizationPolicyListResult, 'generated/azure_mgmt_customer_insights/models/authorization_policy_list_result.rb' + autoload :RelationshipTypeMapping, 'generated/azure_mgmt_customer_insights/models/relationship_type_mapping.rb' + autoload :CanonicalProfileDefinitionPropertiesItem, 'generated/azure_mgmt_customer_insights/models/canonical_profile_definition_properties_item.rb' + autoload :RelationshipLinkFieldMapping, 'generated/azure_mgmt_customer_insights/models/relationship_link_field_mapping.rb' + autoload :RoleListResult, 'generated/azure_mgmt_customer_insights/models/role_list_result.rb' + autoload :GetImageUploadUrlInput, 'generated/azure_mgmt_customer_insights/models/get_image_upload_url_input.rb' + autoload :LinkListResult, 'generated/azure_mgmt_customer_insights/models/link_list_result.rb' + autoload :SalesforceConnectorProperties, 'generated/azure_mgmt_customer_insights/models/salesforce_connector_properties.rb' + autoload :PredictionDistributionDefinition, 'generated/azure_mgmt_customer_insights/models/prediction_distribution_definition.rb' + autoload :ConnectorMappingErrorManagement, 'generated/azure_mgmt_customer_insights/models/connector_mapping_error_management.rb' + autoload :RelationshipListResult, 'generated/azure_mgmt_customer_insights/models/relationship_list_result.rb' + autoload :ConnectorMappingCompleteOperation, 'generated/azure_mgmt_customer_insights/models/connector_mapping_complete_operation.rb' + autoload :PredictionDistributionDefinitionDistributionsItem, 'generated/azure_mgmt_customer_insights/models/prediction_distribution_definition_distributions_item.rb' + autoload :KpiParticipantProfilesMetadata, 'generated/azure_mgmt_customer_insights/models/kpi_participant_profiles_metadata.rb' + autoload :RelationshipLinkListResult, 'generated/azure_mgmt_customer_insights/models/relationship_link_list_result.rb' + autoload :Resource, 'generated/azure_mgmt_customer_insights/models/resource.rb' + autoload :PredictionSystemGeneratedEntities, 'generated/azure_mgmt_customer_insights/models/prediction_system_generated_entities.rb' + autoload :RelationshipTypeFieldMapping, 'generated/azure_mgmt_customer_insights/models/relationship_type_field_mapping.rb' + autoload :ViewListResult, 'generated/azure_mgmt_customer_insights/models/view_list_result.rb' + autoload :SalesforceDiscoverSetting, 'generated/azure_mgmt_customer_insights/models/salesforce_discover_setting.rb' + autoload :PredictionGradesItem, 'generated/azure_mgmt_customer_insights/models/prediction_grades_item.rb' + autoload :ConnectorMappingAvailability, 'generated/azure_mgmt_customer_insights/models/connector_mapping_availability.rb' + autoload :WidgetTypeListResult, 'generated/azure_mgmt_customer_insights/models/widget_type_list_result.rb' + autoload :KpiExtract, 'generated/azure_mgmt_customer_insights/models/kpi_extract.rb' + autoload :AssignmentPrincipal, 'generated/azure_mgmt_customer_insights/models/assignment_principal.rb' + autoload :MetadataDefinitionBase, 'generated/azure_mgmt_customer_insights/models/metadata_definition_base.rb' + autoload :ResourceSetDescription, 'generated/azure_mgmt_customer_insights/models/resource_set_description.rb' + autoload :KpiThresholds, 'generated/azure_mgmt_customer_insights/models/kpi_thresholds.rb' + autoload :PredictionMappings, 'generated/azure_mgmt_customer_insights/models/prediction_mappings.rb' + autoload :CrmConnectorEntities, 'generated/azure_mgmt_customer_insights/models/crm_connector_entities.rb' + autoload :RoleAssignmentListResult, 'generated/azure_mgmt_customer_insights/models/role_assignment_list_result.rb' + autoload :TypePropertiesMapping, 'generated/azure_mgmt_customer_insights/models/type_properties_mapping.rb' + autoload :SuggestRelationshipLinksResponse, 'generated/azure_mgmt_customer_insights/models/suggest_relationship_links_response.rb' + autoload :Hub, 'generated/azure_mgmt_customer_insights/models/hub.rb' + autoload :EntityTypeDefinition, 'generated/azure_mgmt_customer_insights/models/entity_type_definition.rb' + autoload :ProfileResourceFormat, 'generated/azure_mgmt_customer_insights/models/profile_resource_format.rb' + autoload :InteractionResourceFormat, 'generated/azure_mgmt_customer_insights/models/interaction_resource_format.rb' + autoload :KpiResourceFormat, 'generated/azure_mgmt_customer_insights/models/kpi_resource_format.rb' + autoload :EnrichingKpi, 'generated/azure_mgmt_customer_insights/models/enriching_kpi.rb' + autoload :ConnectorResourceFormat, 'generated/azure_mgmt_customer_insights/models/connector_resource_format.rb' + autoload :ConnectorMappingResourceFormat, 'generated/azure_mgmt_customer_insights/models/connector_mapping_resource_format.rb' + autoload :AuthorizationPolicyResourceFormat, 'generated/azure_mgmt_customer_insights/models/authorization_policy_resource_format.rb' + autoload :LinkResourceFormat, 'generated/azure_mgmt_customer_insights/models/link_resource_format.rb' + autoload :RelationshipResourceFormat, 'generated/azure_mgmt_customer_insights/models/relationship_resource_format.rb' + autoload :RelationshipLinkResourceFormat, 'generated/azure_mgmt_customer_insights/models/relationship_link_resource_format.rb' + autoload :ViewResourceFormat, 'generated/azure_mgmt_customer_insights/models/view_resource_format.rb' + autoload :WidgetTypeResourceFormat, 'generated/azure_mgmt_customer_insights/models/widget_type_resource_format.rb' + autoload :RoleAssignmentResourceFormat, 'generated/azure_mgmt_customer_insights/models/role_assignment_resource_format.rb' + autoload :RoleResourceFormat, 'generated/azure_mgmt_customer_insights/models/role_resource_format.rb' + autoload :PredictionResourceFormat, 'generated/azure_mgmt_customer_insights/models/prediction_resource_format.rb' + autoload :EntityTypes, 'generated/azure_mgmt_customer_insights/models/entity_types.rb' + autoload :DataSourceType, 'generated/azure_mgmt_customer_insights/models/data_source_type.rb' + autoload :Status, 'generated/azure_mgmt_customer_insights/models/status.rb' + autoload :ProvisioningStates, 'generated/azure_mgmt_customer_insights/models/provisioning_states.rb' + autoload :PermissionTypes, 'generated/azure_mgmt_customer_insights/models/permission_types.rb' + autoload :ConnectorTypes, 'generated/azure_mgmt_customer_insights/models/connector_types.rb' + autoload :ConnectorStates, 'generated/azure_mgmt_customer_insights/models/connector_states.rb' + autoload :ErrorManagementTypes, 'generated/azure_mgmt_customer_insights/models/error_management_types.rb' + autoload :FrequencyTypes, 'generated/azure_mgmt_customer_insights/models/frequency_types.rb' + autoload :CompletionOperationTypes, 'generated/azure_mgmt_customer_insights/models/completion_operation_types.rb' + autoload :ConnectorMappingStates, 'generated/azure_mgmt_customer_insights/models/connector_mapping_states.rb' + autoload :CalculationWindowTypes, 'generated/azure_mgmt_customer_insights/models/calculation_window_types.rb' + autoload :KpiFunctions, 'generated/azure_mgmt_customer_insights/models/kpi_functions.rb' + autoload :EntityType, 'generated/azure_mgmt_customer_insights/models/entity_type.rb' + autoload :LinkTypes, 'generated/azure_mgmt_customer_insights/models/link_types.rb' + autoload :InstanceOperationType, 'generated/azure_mgmt_customer_insights/models/instance_operation_type.rb' + autoload :CardinalityTypes, 'generated/azure_mgmt_customer_insights/models/cardinality_types.rb' + autoload :RoleTypes, 'generated/azure_mgmt_customer_insights/models/role_types.rb' + autoload :CanonicalPropertyValueType, 'generated/azure_mgmt_customer_insights/models/canonical_property_value_type.rb' + autoload :PredictionModelLifeCycle, 'generated/azure_mgmt_customer_insights/models/prediction_model_life_cycle.rb' + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/authorization_policies.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/authorization_policies.rb new file mode 100644 index 0000000000..78b00b540c --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/authorization_policies.rb @@ -0,0 +1,634 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class AuthorizationPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the AuthorizationPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates an authorization policy or updates an existing authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param parameters [AuthorizationPolicyResourceFormat] Parameters supplied to + # the CreateOrUpdate authorization policy operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationPolicyResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates an authorization policy or updates an existing authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param parameters [AuthorizationPolicyResourceFormat] Parameters supplied to + # the CreateOrUpdate authorization policy 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 create_or_update_with_http_info(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers).value! + end + + # + # Creates an authorization policy or updates an existing authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param parameters [AuthorizationPolicyResourceFormat] Parameters supplied to + # the CreateOrUpdate authorization policy 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 create_or_update_async(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicyResourceFormat.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.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicyResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicyResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an authorization policy in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationPolicyResourceFormat] operation results. + # + def get(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an authorization policy in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers).value! + end + + # + # Gets an authorization policy in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_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.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicyResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the authorization policies in a specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the authorization policies in a specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all the authorization policies in a specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/authorizationPolicies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicyListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates the primary policy key of the specified authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationPolicy] operation results. + # + def regenerate_primary_key(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + response = regenerate_primary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the primary policy key of the specified authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_primary_key_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + regenerate_primary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers).value! + end + + # + # Regenerates the primary policy key of the specified authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_primary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_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.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/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,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates the secondary policy key of the specified authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationPolicy] operation results. + # + def regenerate_secondary_key(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + response = regenerate_secondary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the secondary policy key of the specified authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_secondary_key_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + regenerate_secondary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers).value! + end + + # + # Regenerates the secondary policy key of the specified authorization policy. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param authorization_policy_name [String] The name of the policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_secondary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_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.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/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,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the authorization policies in a specified hub. + # + # @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 [AuthorizationPolicyListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the authorization policies in a specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the authorization policies in a specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::AuthorizationPolicyListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the authorization policies in a specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationPolicyListResult] which provide lazy access to pages of + # the response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/connector_mappings.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/connector_mappings.rb new file mode 100644 index 0000000000..ef10982d4d --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/connector_mappings.rb @@ -0,0 +1,548 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class ConnectorMappings + include MsRestAzure + + # + # Creates and initializes a new instance of the ConnectorMappings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a connector mapping or updates an existing connector mapping in the + # connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param parameters [ConnectorMappingResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector Mapping operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectorMappingResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a connector mapping or updates an existing connector mapping in the + # connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param parameters [ConnectorMappingResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector Mapping 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 create_or_update_with_http_info(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers).value! + end + + # + # Creates a connector mapping or updates an existing connector mapping in the + # connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param parameters [ConnectorMappingResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector Mapping 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 create_or_update_async(resource_group_name, hub_name, connector_name, mapping_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'connector_name is nil' if connector_name.nil? + fail ArgumentError, 'mapping_name is nil' if mapping_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::ConnectorMappingResourceFormat.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.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'connectorName' => connector_name,'mappingName' => mapping_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorMappingResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorMappingResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a connector mapping in the connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectorMappingResourceFormat] operation results. + # + def get(resource_group_name, hub_name, connector_name, mapping_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, connector_name, mapping_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a connector mapping in the connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param custom_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, hub_name, connector_name, mapping_name, custom_headers = nil) + get_async(resource_group_name, hub_name, connector_name, mapping_name, custom_headers).value! + end + + # + # Gets a connector mapping in the connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param [Hash{String => String}] 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, hub_name, connector_name, mapping_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'connector_name is nil' if connector_name.nil? + fail ArgumentError, 'mapping_name is nil' if mapping_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.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'connectorName' => connector_name,'mappingName' => mapping_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorMappingResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a connector mapping in the connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, hub_name, connector_name, mapping_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, connector_name, mapping_name, custom_headers).value! + nil + end + + # + # Deletes a connector mapping in the connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param custom_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, hub_name, connector_name, mapping_name, custom_headers = nil) + delete_async(resource_group_name, hub_name, connector_name, mapping_name, custom_headers).value! + end + + # + # Deletes a connector mapping in the connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param mapping_name [String] The name of the connector mapping. + # @param [Hash{String => String}] 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, hub_name, connector_name, mapping_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'connector_name is nil' if connector_name.nil? + fail ArgumentError, 'mapping_name is nil' if mapping_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.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'connectorName' => connector_name,'mappingName' => mapping_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the connector mappings in the specified connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @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_connector(resource_group_name, hub_name, connector_name, custom_headers = nil) + first_page = list_by_connector_as_lazy(resource_group_name, hub_name, connector_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the connector mappings in the specified connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_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_connector_with_http_info(resource_group_name, hub_name, connector_name, custom_headers = nil) + list_by_connector_async(resource_group_name, hub_name, connector_name, custom_headers).value! + end + + # + # Gets all the connector mappings in the specified connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param [Hash{String => String}] 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_connector_async(resource_group_name, hub_name, connector_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'connector_name is nil' if connector_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.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'connectorName' => connector_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorMappingListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the connector mappings in the specified connector. + # + # @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 [ConnectorMappingListResult] operation results. + # + def list_by_connector_next(next_page_link, custom_headers = nil) + response = list_by_connector_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the connector mappings in the specified connector. + # + # @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_connector_next_with_http_info(next_page_link, custom_headers = nil) + list_by_connector_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the connector mappings in the specified connector. + # + # @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_connector_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorMappingListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the connector mappings in the specified connector. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectorMappingListResult] which provide lazy access to pages of + # the response. + # + def list_by_connector_as_lazy(resource_group_name, hub_name, connector_name, custom_headers = nil) + response = list_by_connector_async(resource_group_name, hub_name, connector_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_connector_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/connectors.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/connectors.rb new file mode 100644 index 0000000000..b5832f2e55 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/connectors.rb @@ -0,0 +1,606 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Connectors + include MsRestAzure + + # + # Creates and initializes a new instance of the Connectors class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a connector or updates an existing connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param parameters [ConnectorResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectorResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, connector_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, connector_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param parameters [ConnectorResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector 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, hub_name, connector_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, connector_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorResourceFormat.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectorResourceFormat] operation results. + # + def get(resource_group_name, hub_name, connector_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, connector_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_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, hub_name, connector_name, custom_headers = nil) + get_async(resource_group_name, hub_name, connector_name, custom_headers).value! + end + + # + # Gets a connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param [Hash{String => String}] 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, hub_name, connector_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'connector_name is nil' if connector_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.CustomerInsights/hubs/{hubName}/connectors/{connectorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'connectorName' => connector_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, hub_name, connector_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, connector_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, hub_name, connector_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, hub_name, connector_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets all the connectors in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the connectors in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all the connectors in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/connectors' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 connector or updates an existing connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param parameters [ConnectorResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectorResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, connector_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, connector_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a connector or updates an existing connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param parameters [ConnectorResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector 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, hub_name, connector_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, connector_name, parameters, custom_headers).value! + end + + # + # Creates a connector or updates an existing connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param parameters [ConnectorResourceFormat] Parameters supplied to the + # CreateOrUpdate Connector 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, hub_name, connector_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'connector_name is nil' if connector_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::ConnectorResourceFormat.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.CustomerInsights/hubs/{hubName}/connectors/{connectorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'connectorName' => connector_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, hub_name, connector_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, hub_name, connector_name, custom_headers).value! + nil + end + + # + # Deletes a connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, hub_name, connector_name, custom_headers = nil) + begin_delete_async(resource_group_name, hub_name, connector_name, custom_headers).value! + end + + # + # Deletes a connector in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param connector_name [String] The name of the connector. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, hub_name, connector_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'connector_name is nil' if connector_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.CustomerInsights/hubs/{hubName}/connectors/{connectorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'connectorName' => connector_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the connectors in the specified hub. + # + # @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 [ConnectorListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the connectors in the specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the connectors in the specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ConnectorListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the connectors in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ConnectorListResult] which provide lazy access to pages of the + # response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/customer_insights_management_client.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/customer_insights_management_client.rb new file mode 100644 index 0000000000..52d7b63ada --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/customer_insights_management_client.rb @@ -0,0 +1,191 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # A service client - single point of access to the REST API. + # + class CustomerInsightsManagementClient < 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] Gets subscription credentials which uniquely identify + # Microsoft Azure subscription. The subscription ID forms part of the URI + # for every service call. + attr_accessor :subscription_id + + # @return [String] Client Api Version. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Hubs] hubs + attr_reader :hubs + + # @return [Profiles] profiles + attr_reader :profiles + + # @return [Interactions] interactions + attr_reader :interactions + + # @return [Relationships] relationships + attr_reader :relationships + + # @return [RelationshipLinks] relationship_links + attr_reader :relationship_links + + # @return [AuthorizationPolicies] authorization_policies + attr_reader :authorization_policies + + # @return [Connectors] connectors + attr_reader :connectors + + # @return [ConnectorMappings] connector_mappings + attr_reader :connector_mappings + + # @return [Kpi] kpi + attr_reader :kpi + + # @return [WidgetTypes] widget_types + attr_reader :widget_types + + # @return [Views] views + attr_reader :views + + # @return [Links] links + attr_reader :links + + # @return [Roles] roles + attr_reader :roles + + # @return [RoleAssignments] role_assignments + attr_reader :role_assignments + + # @return [Images] images + attr_reader :images + + # @return [Predictions] predictions + attr_reader :predictions + + # + # Creates initializes a new instance of the CustomerInsightsManagementClient 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 + + @hubs = Hubs.new(self) + @profiles = Profiles.new(self) + @interactions = Interactions.new(self) + @relationships = Relationships.new(self) + @relationship_links = RelationshipLinks.new(self) + @authorization_policies = AuthorizationPolicies.new(self) + @connectors = Connectors.new(self) + @connector_mappings = ConnectorMappings.new(self) + @kpi = Kpi.new(self) + @widget_types = WidgetTypes.new(self) + @views = Views.new(self) + @links = Links.new(self) + @roles = Roles.new(self) + @role_assignments = RoleAssignments.new(self) + @images = Images.new(self) + @predictions = Predictions.new(self) + @api_version = '2017-04-26' + @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_customer_insights' + if defined? Azure::ARM::CustomerInsights::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::CustomerInsights::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/cognitive_services_accounts.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/hubs.rb similarity index 55% rename from management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/cognitive_services_accounts.rb rename to management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/hubs.rb index adcc3ce678..da67a2e8fb 100644 --- a/management/azure_mgmt_cognitive_services/lib/generated/azure_mgmt_cognitive_services/cognitive_services_accounts.rb +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/hubs.rb @@ -1,83 +1,77 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. -module Azure::ARM::CognitiveServices +module Azure::ARM::CustomerInsights # - # Cognitive Services Management Client + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. # - class CognitiveServicesAccounts + class Hubs include MsRestAzure # - # Creates and initializes a new instance of the CognitiveServicesAccounts class. + # Creates and initializes a new instance of the Hubs class. # @param client service class for accessing basic functionality. # def initialize(client) @client = client end - # @return [CognitiveServicesManagementClient] reference to the CognitiveServicesManagementClient + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient attr_reader :client # - # Create Cognitive Services Account. Accounts is a resource group wide resource - # type. It holds the keys for developer to access intelligent APIs. It's also - # the resource type for billing. + # Creates a hub, or updates an existing hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param parameters [CognitiveServicesAccountCreateParameters] The parameters - # to provide for the created account. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the Hub. + # @param parameters [Hub] Parameters supplied to the CreateOrUpdate Hub + # operation. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CognitiveServicesAccount] operation results. + # @return [Hub] operation results. # - def create(resource_group_name, account_name, parameters, custom_headers = nil) - response = create_async(resource_group_name, account_name, parameters, custom_headers).value! + def create_or_update(resource_group_name, hub_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, parameters, custom_headers).value! response.body unless response.nil? end # - # Create Cognitive Services Account. Accounts is a resource group wide resource - # type. It holds the keys for developer to access intelligent APIs. It's also - # the resource type for billing. + # Creates a hub, or updates an existing hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param parameters [CognitiveServicesAccountCreateParameters] The parameters - # to provide for the created account. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the Hub. + # @param parameters [Hub] Parameters supplied to the CreateOrUpdate Hub + # 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 create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil) - create_async(resource_group_name, account_name, parameters, custom_headers).value! + def create_or_update_with_http_info(resource_group_name, hub_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, hub_name, parameters, custom_headers).value! end # - # Create Cognitive Services Account. Accounts is a resource group wide resource - # type. It holds the keys for developer to access intelligent APIs. It's also - # the resource type for billing. + # Creates a hub, or updates an existing hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param parameters [CognitiveServicesAccountCreateParameters] The parameters - # to provide for the created account. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the Hub. + # @param parameters [Hub] Parameters supplied to the CreateOrUpdate Hub + # 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 create_async(resource_group_name, account_name, parameters, custom_headers = nil) + def create_or_update_async(resource_group_name, hub_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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? @@ -92,17 +86,17 @@ def create_async(resource_group_name, account_name, parameters, custom_headers = request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountCreateParameters.mapper() + request_mapper = Azure::ARM::CustomerInsights::Models::Hub.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.CognitiveServices/accounts/{accountName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -114,27 +108,27 @@ def create_async(resource_group_name, account_name, parameters, custom_headers = http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 201 + unless status_code == 201 || status_code == 200 error_model = JSON.load(response_content) - fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + 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 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result_mapper = Azure::ARM::CustomerInsights::Models::Hub.mapper() result.body = @client.deserialize(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 + if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result_mapper = Azure::ARM::CustomerInsights::Models::Hub.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -148,76 +142,54 @@ def create_async(resource_group_name, account_name, parameters, custom_headers = end # - # Updates a Cognitive Services account + # Updates a Hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param sku [Sku] Gets or sets the SKU of the resource. - # @param tags [Hash{String => String}] Gets or sets a list of key value pairs - # that describe the resource. These tags can be used in viewing and grouping - # this resource (across resource groups). A maximum of 15 tags can be provided - # for a resource. Each tag must have a key no greater than 128 characters and - # value no greater than 256 characters. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the Hub. + # @param parameters [Hub] Parameters supplied to the Update Hub operation. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CognitiveServicesAccount] operation results. + # @return [Hub] operation results. # - def update(resource_group_name, account_name, sku = nil, tags = nil, custom_headers = nil) - response = update_async(resource_group_name, account_name, sku, tags, custom_headers).value! + def update(resource_group_name, hub_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, hub_name, parameters, custom_headers).value! response.body unless response.nil? end # - # Updates a Cognitive Services account + # Updates a Hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param sku [Sku] Gets or sets the SKU of the resource. - # @param tags [Hash{String => String}] Gets or sets a list of key value pairs - # that describe the resource. These tags can be used in viewing and grouping - # this resource (across resource groups). A maximum of 15 tags can be provided - # for a resource. Each tag must have a key no greater than 128 characters and - # value no greater than 256 characters. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the Hub. + # @param parameters [Hub] Parameters supplied to the Update Hub 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 update_with_http_info(resource_group_name, account_name, sku = nil, tags = nil, custom_headers = nil) - update_async(resource_group_name, account_name, sku, tags, custom_headers).value! + def update_with_http_info(resource_group_name, hub_name, parameters, custom_headers = nil) + update_async(resource_group_name, hub_name, parameters, custom_headers).value! end # - # Updates a Cognitive Services account + # Updates a Hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param sku [Sku] Gets or sets the SKU of the resource. - # @param tags [Hash{String => String}] Gets or sets a list of key value pairs - # that describe the resource. These tags can be used in viewing and grouping - # this resource (across resource groups). A maximum of 15 tags can be provided - # for a resource. Each tag must have a key no greater than 128 characters and - # value no greater than 256 characters. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the Hub. + # @param parameters [Hub] Parameters supplied to the Update Hub 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 update_async(resource_group_name, account_name, sku = nil, tags = nil, custom_headers = nil) + def update_async(resource_group_name, hub_name, parameters, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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? - parameters = CognitiveServicesAccountUpdateParameters.new - unless sku.nil? && tags.nil? - parameters.sku = sku - parameters.tags = tags - end request_headers = {} @@ -228,17 +200,17 @@ def update_async(resource_group_name, account_name, sku = nil, tags = nil, custo request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountUpdateParameters.mapper() + request_mapper = Azure::ARM::CustomerInsights::Models::Hub.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.CognitiveServices/accounts/{accountName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -252,7 +224,7 @@ def update_async(resource_group_name, account_name, sku = nil, tags = nil, custo 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) + 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? @@ -260,7 +232,7 @@ def update_async(resource_group_name, account_name, sku = nil, tags = nil, custo if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result_mapper = Azure::ARM::CustomerInsights::Models::Hub.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -274,49 +246,85 @@ def update_async(resource_group_name, account_name, sku = nil, tags = nil, custo end # - # Deletes a Cognitive Services account from the resource group. + # Deletes the specified hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # - def delete(resource_group_name, account_name, custom_headers = nil) - response = delete_async(resource_group_name, account_name, custom_headers).value! + def delete(resource_group_name, hub_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, custom_headers).value! nil end # - # Deletes a Cognitive Services account from the resource group. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, hub_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, hub_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets information about the specified hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Hub] operation results. + # + def get(resource_group_name, hub_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets information about the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. # @param custom_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, account_name, custom_headers = nil) - delete_async(resource_group_name, account_name, custom_headers).value! + def get_with_http_info(resource_group_name, hub_name, custom_headers = nil) + get_async(resource_group_name, hub_name, custom_headers).value! end # - # Deletes a Cognitive Services account from the resource group. + # Gets information about the specified hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. # @param [Hash{String => String}] 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, account_name, custom_headers = nil) + def get_async(resource_group_name, hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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? @@ -326,29 +334,39 @@ def delete_async(resource_group_name, account_name, custom_headers = nil) # Set Headers request_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.CognitiveServices/accounts/{accountName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_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 = @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 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) - fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::Hub.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -357,50 +375,43 @@ def delete_async(resource_group_name, account_name, custom_headers = nil) end # - # Returns a Cognitive Services account specified by the parameters. + # Gets all the hubs in a resource group. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @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 [CognitiveServicesAccount] operation results. + # @return [Array] operation results. # - def get_properties(resource_group_name, account_name, custom_headers = nil) - response = get_properties_async(resource_group_name, account_name, custom_headers).value! - response.body unless response.nil? + 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 # - # Returns a Cognitive Services account specified by the parameters. + # Gets all the hubs in a resource group. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @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 get_properties_with_http_info(resource_group_name, account_name, custom_headers = nil) - get_properties_async(resource_group_name, account_name, 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 # - # Returns a Cognitive Services account specified by the parameters. + # Gets all the hubs in a resource group. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @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 get_properties_async(resource_group_name, account_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, 'account_name is nil' if account_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -410,13 +421,13 @@ def get_properties_async(resource_group_name, account_name, custom_headers = nil # Set Headers request_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.CognitiveServices/accounts/{accountName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + 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 @@ -429,7 +440,7 @@ def get_properties_async(resource_group_name, account_name, custom_headers = nil 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) + 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? @@ -437,7 +448,7 @@ def get_properties_async(resource_group_name, account_name, custom_headers = nil if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccount.mapper() + result_mapper = Azure::ARM::CustomerInsights::Models::HubListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -451,50 +462,39 @@ def get_properties_async(resource_group_name, account_name, custom_headers = nil end # - # Lists the account keys for the specified Cognitive Services account. + # Gets all hubs in the specified subscription. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CognitiveServicesAccountKeys] operation results. + # @return [Array] operation results. # - def list_keys(resource_group_name, account_name, custom_headers = nil) - response = list_keys_async(resource_group_name, account_name, custom_headers).value! - response.body unless response.nil? + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items end # - # Lists the account keys for the specified Cognitive Services account. + # Gets all hubs in the specified subscription. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_keys_with_http_info(resource_group_name, account_name, custom_headers = nil) - list_keys_async(resource_group_name, account_name, custom_headers).value! + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! end # - # Lists the account keys for the specified Cognitive Services account. + # Gets all hubs in the specified subscription. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_keys_async(resource_group_name, account_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'account_name is nil' if account_name.nil? + 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? @@ -504,18 +504,18 @@ def list_keys_async(resource_group_name, account_name, custom_headers = nil) # Set Headers request_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.CognitiveServices/accounts/{accountName}/listKeys' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.CustomerInsights/hubs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + 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(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -523,7 +523,7 @@ def list_keys_async(resource_group_name, account_name, custom_headers = nil) 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) + 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? @@ -531,7 +531,7 @@ def list_keys_async(resource_group_name, account_name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountKeys.mapper() + result_mapper = Azure::ARM::CustomerInsights::Models::HubListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -545,94 +545,144 @@ def list_keys_async(resource_group_name, account_name, custom_headers = nil) end # - # Regenerates the specified account key for the specified Cognitive Services - # account. + # Deletes the specified hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param key_name [KeyName] key name to generate (Key1|Key2). Possible values - # include: 'Key1', 'Key2' + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CognitiveServicesAccountKeys] operation results. # - def regenerate_key(resource_group_name, account_name, key_name, custom_headers = nil) - response = regenerate_key_async(resource_group_name, account_name, key_name, custom_headers).value! - response.body unless response.nil? + def begin_delete(resource_group_name, hub_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, hub_name, custom_headers).value! + nil end # - # Regenerates the specified account key for the specified Cognitive Services - # account. + # Deletes the specified hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param key_name [KeyName] key name to generate (Key1|Key2). Possible values - # include: 'Key1', 'Key2' + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. # @param custom_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_key_with_http_info(resource_group_name, account_name, key_name, custom_headers = nil) - regenerate_key_async(resource_group_name, account_name, key_name, custom_headers).value! + def begin_delete_with_http_info(resource_group_name, hub_name, custom_headers = nil) + begin_delete_async(resource_group_name, hub_name, custom_headers).value! end # - # Regenerates the specified account key for the specified Cognitive Services - # account. + # Deletes the specified hub. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. - # @param key_name [KeyName] key name to generate (Key1|Key2). Possible values - # include: 'Key1', 'Key2' + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. # @param [Hash{String => String}] 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_key_async(resource_group_name, account_name, key_name, custom_headers = nil) + def begin_delete_async(resource_group_name, hub_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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, 'key_name is nil' if key_name.nil? - parameters = RegenerateKeyParameters.new - unless key_name.nil? - parameters.key_name = key_name - end request_headers = {} # Set Headers request_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.CustomerInsights/hubs/{hubName}' - request_headers['Content-Type'] = 'application/json; charset=utf-8' + request_url = @base_url || @client.base_url - # Serialize Request - request_mapper = Azure::ARM::CognitiveServices::Models::RegenerateKeyParameters.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_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) - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey' + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the hubs in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HubListResult] operation results. + # + def list_by_resource_group_next(next_page_link, custom_headers = nil) + response = list_by_resource_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the hubs in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_resource_group_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the hubs in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, - body: request_content, + skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -640,7 +690,7 @@ def regenerate_key_async(resource_group_name, account_name, key_name, custom_hea 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) + 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? @@ -648,7 +698,7 @@ def regenerate_key_async(resource_group_name, account_name, key_name, custom_hea if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountKeys.mapper() + result_mapper = Azure::ARM::CustomerInsights::Models::HubListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -662,52 +712,46 @@ def regenerate_key_async(resource_group_name, account_name, key_name, custom_hea end # - # List available SKUs for the requested Cognitive Services account + # Gets all hubs in the specified subscription. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CognitiveServicesAccountEnumerateSkusResult] operation results. + # @return [HubListResult] operation results. # - def list_skus(resource_group_name, account_name, custom_headers = nil) - response = list_skus_async(resource_group_name, account_name, 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 # - # List available SKUs for the requested Cognitive Services account + # Gets all hubs in the specified subscription. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_skus_with_http_info(resource_group_name, account_name, custom_headers = nil) - list_skus_async(resource_group_name, account_name, 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 # - # List available SKUs for the requested Cognitive Services account + # Gets all hubs in the specified subscription. # - # @param resource_group_name [String] The name of the resource group within the - # user's subscription. - # @param account_name [String] The name of Cognitive Services account. + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_skus_async(resource_group_name, account_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'account_name is nil' if account_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} @@ -715,14 +759,13 @@ def list_skus_async(resource_group_name, account_name, custom_headers = nil) # Set Headers request_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.CognitiveServices/accounts/{accountName}/skus' + path_template = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -734,7 +777,7 @@ def list_skus_async(resource_group_name, account_name, custom_headers = nil) 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) + 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? @@ -742,7 +785,7 @@ def list_skus_async(resource_group_name, account_name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::CognitiveServices::Models::CognitiveServicesAccountEnumerateSkusResult.mapper() + result_mapper = Azure::ARM::CustomerInsights::Models::HubListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -755,5 +798,44 @@ def list_skus_async(resource_group_name, account_name, custom_headers = nil) promise.execute end + # + # Gets all the hubs in 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 [HubListResult] 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 + + # + # Gets all hubs in the specified subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HubListResult] 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_customer_insights/lib/generated/azure_mgmt_customer_insights/images.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/images.rb new file mode 100644 index 0000000000..4ab9a80eb3 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/images.rb @@ -0,0 +1,242 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Images + include MsRestAzure + + # + # Creates and initializes a new instance of the Images class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Gets entity type (profile or interaction) image upload URL. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param parameters [GetImageUploadUrlInput] Parameters supplied to the + # GetUploadUrlForEntityType operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ImageDefinition] operation results. + # + def get_upload_url_for_entity_type(resource_group_name, hub_name, parameters, custom_headers = nil) + response = get_upload_url_for_entity_type_async(resource_group_name, hub_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets entity type (profile or interaction) image upload URL. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param parameters [GetImageUploadUrlInput] Parameters supplied to the + # GetUploadUrlForEntityType 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 get_upload_url_for_entity_type_with_http_info(resource_group_name, hub_name, parameters, custom_headers = nil) + get_upload_url_for_entity_type_async(resource_group_name, hub_name, parameters, custom_headers).value! + end + + # + # Gets entity type (profile or interaction) image upload URL. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param parameters [GetImageUploadUrlInput] Parameters supplied to the + # GetUploadUrlForEntityType 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 get_upload_url_for_entity_type_async(resource_group_name, hub_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::GetImageUploadUrlInput.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.CustomerInsights/hubs/{hubName}/images/getEntityTypeImageUploadUrl' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_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::ARM::CustomerInsights::Models::ImageDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 data image upload URL. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param parameters [GetImageUploadUrlInput] Parameters supplied to the + # GetUploadUrlForData operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ImageDefinition] operation results. + # + def get_upload_url_for_data(resource_group_name, hub_name, parameters, custom_headers = nil) + response = get_upload_url_for_data_async(resource_group_name, hub_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets data image upload URL. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param parameters [GetImageUploadUrlInput] Parameters supplied to the + # GetUploadUrlForData 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 get_upload_url_for_data_with_http_info(resource_group_name, hub_name, parameters, custom_headers = nil) + get_upload_url_for_data_async(resource_group_name, hub_name, parameters, custom_headers).value! + end + + # + # Gets data image upload URL. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param parameters [GetImageUploadUrlInput] Parameters supplied to the + # GetUploadUrlForData 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 get_upload_url_for_data_async(resource_group_name, hub_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::GetImageUploadUrlInput.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.CustomerInsights/hubs/{hubName}/images/getDataImageUploadUrl' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_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::ARM::CustomerInsights::Models::ImageDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_customer_insights/lib/generated/azure_mgmt_customer_insights/interactions.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/interactions.rb new file mode 100644 index 0000000000..c82dfc1d2b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/interactions.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::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Interactions + include MsRestAzure + + # + # Creates and initializes a new instance of the Interactions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates an interaction or updates an existing interaction within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param parameters [InteractionResourceFormat] Parameters supplied to the + # CreateOrUpdate Interaction operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InteractionResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, interaction_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, interaction_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param parameters [InteractionResourceFormat] Parameters supplied to the + # CreateOrUpdate Interaction 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, hub_name, interaction_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, interaction_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::InteractionResourceFormat.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 information about the specified interaction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param locale_code [String] Locale of interaction to retrieve, default is + # en-us. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InteractionResourceFormat] operation results. + # + def get(resource_group_name, hub_name, interaction_name, locale_code = 'en-us', custom_headers = nil) + response = get_async(resource_group_name, hub_name, interaction_name, locale_code, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets information about the specified interaction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param locale_code [String] Locale of interaction to retrieve, default is + # en-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 get_with_http_info(resource_group_name, hub_name, interaction_name, locale_code = 'en-us', custom_headers = nil) + get_async(resource_group_name, hub_name, interaction_name, locale_code, custom_headers).value! + end + + # + # Gets information about the specified interaction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param locale_code [String] Locale of interaction to retrieve, default is + # en-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 get_async(resource_group_name, hub_name, interaction_name, locale_code = 'en-us', custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'interaction_name is nil' if interaction_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.CustomerInsights/hubs/{hubName}/interactions/{interactionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'interactionName' => interaction_name,'subscriptionId' => @client.subscription_id}, + query_params: {'locale-code' => locale_code,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::InteractionResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all interactions in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of interaction to retrieve, default is + # en-us. + # @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_hub(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, locale_code, custom_headers) + first_page.get_all_items + end + + # + # Gets all interactions in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of interaction to retrieve, default is + # en-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_hub_with_http_info(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, locale_code, custom_headers).value! + end + + # + # Gets all interactions in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of interaction to retrieve, default is + # en-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_hub_async(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/interactions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'locale-code' => locale_code,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::InteractionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Suggests relationships to create relationship links. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SuggestRelationshipLinksResponse] operation results. + # + def suggest_relationship_links(resource_group_name, hub_name, interaction_name, custom_headers = nil) + response = suggest_relationship_links_async(resource_group_name, hub_name, interaction_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Suggests relationships to create relationship links. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def suggest_relationship_links_with_http_info(resource_group_name, hub_name, interaction_name, custom_headers = nil) + suggest_relationship_links_async(resource_group_name, hub_name, interaction_name, custom_headers).value! + end + + # + # Suggests relationships to create relationship links. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def suggest_relationship_links_async(resource_group_name, hub_name, interaction_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'interaction_name is nil' if interaction_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.CustomerInsights/hubs/{hubName}/interactions/{interactionName}/suggestRelationshipLinks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'interactionName' => interaction_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::ARM::CustomerInsights::Models::SuggestRelationshipLinksResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an interaction or updates an existing interaction within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param parameters [InteractionResourceFormat] Parameters supplied to the + # CreateOrUpdate Interaction operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InteractionResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, interaction_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, interaction_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates an interaction or updates an existing interaction within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param parameters [InteractionResourceFormat] Parameters supplied to the + # CreateOrUpdate Interaction 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, hub_name, interaction_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, interaction_name, parameters, custom_headers).value! + end + + # + # Creates an interaction or updates an existing interaction within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param interaction_name [String] The name of the interaction. + # @param parameters [InteractionResourceFormat] Parameters supplied to the + # CreateOrUpdate Interaction 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, hub_name, interaction_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'interaction_name is nil' if interaction_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::InteractionResourceFormat.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.CustomerInsights/hubs/{hubName}/interactions/{interactionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'interactionName' => interaction_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::InteractionResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all interactions in the hub. + # + # @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 [InteractionListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all interactions in the hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all interactions in the hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::InteractionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all interactions in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of interaction to retrieve, default is + # en-us. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InteractionListResult] which provide lazy access to pages of the + # response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, locale_code, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/kpi.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/kpi.rb new file mode 100644 index 0000000000..90849f30d0 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/kpi.rb @@ -0,0 +1,689 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Kpi + include MsRestAzure + + # + # Creates and initializes a new instance of the Kpi class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a KPI or updates an existing KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param parameters [KpiResourceFormat] Parameters supplied to the + # create/update KPI operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [KpiResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, kpi_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, kpi_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param parameters [KpiResourceFormat] Parameters supplied to the + # create/update KPI 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, hub_name, kpi_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, kpi_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::KpiResourceFormat.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [KpiResourceFormat] operation results. + # + def get(resource_group_name, hub_name, kpi_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, kpi_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_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, hub_name, kpi_name, custom_headers = nil) + get_async(resource_group_name, hub_name, kpi_name, custom_headers).value! + end + + # + # Gets a KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param [Hash{String => String}] 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, hub_name, kpi_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'kpi_name is nil' if kpi_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.CustomerInsights/hubs/{hubName}/kpi/{kpiName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'kpiName' => kpi_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::KpiResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, hub_name, kpi_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, kpi_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, hub_name, kpi_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, hub_name, kpi_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Reprocesses the Kpi values of the specified KPI. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def reprocess(resource_group_name, hub_name, kpi_name, custom_headers = nil) + response = reprocess_async(resource_group_name, hub_name, kpi_name, custom_headers).value! + nil + end + + # + # Reprocesses the Kpi values of the specified KPI. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def reprocess_with_http_info(resource_group_name, hub_name, kpi_name, custom_headers = nil) + reprocess_async(resource_group_name, hub_name, kpi_name, custom_headers).value! + end + + # + # Reprocesses the Kpi values of the specified KPI. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def reprocess_async(resource_group_name, hub_name, kpi_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'kpi_name is nil' if kpi_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.CustomerInsights/hubs/{hubName}/kpi/{kpiName}/reprocess' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'kpiName' => kpi_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 == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the KPIs in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the KPIs in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all the KPIs in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/kpi' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::KpiListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 KPI or updates an existing KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param parameters [KpiResourceFormat] Parameters supplied to the + # create/update KPI operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [KpiResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, kpi_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, kpi_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a KPI or updates an existing KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param parameters [KpiResourceFormat] Parameters supplied to the + # create/update KPI 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, hub_name, kpi_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, kpi_name, parameters, custom_headers).value! + end + + # + # Creates a KPI or updates an existing KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param parameters [KpiResourceFormat] Parameters supplied to the + # create/update KPI 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, hub_name, kpi_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'kpi_name is nil' if kpi_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::KpiResourceFormat.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.CustomerInsights/hubs/{hubName}/kpi/{kpiName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'kpiName' => kpi_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::KpiResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, hub_name, kpi_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, hub_name, kpi_name, custom_headers).value! + nil + end + + # + # Deletes a KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, hub_name, kpi_name, custom_headers = nil) + begin_delete_async(resource_group_name, hub_name, kpi_name, custom_headers).value! + end + + # + # Deletes a KPI in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param kpi_name [String] The name of the KPI. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, hub_name, kpi_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'kpi_name is nil' if kpi_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.CustomerInsights/hubs/{hubName}/kpi/{kpiName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'kpiName' => kpi_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the KPIs in the specified hub. + # + # @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 [KpiListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the KPIs in the specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the KPIs in the specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::KpiListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the KPIs in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [KpiListResult] which provide lazy access to pages of the response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/links.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/links.rb new file mode 100644 index 0000000000..1b02766bdc --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/links.rb @@ -0,0 +1,565 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Links + include MsRestAzure + + # + # Creates and initializes a new instance of the Links class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a link or updates an existing link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param parameters [LinkResourceFormat] Parameters supplied to the + # CreateOrUpdate Link operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LinkResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, link_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, link_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param parameters [LinkResourceFormat] Parameters supplied to the + # CreateOrUpdate Link 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, hub_name, link_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, link_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::LinkResourceFormat.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LinkResourceFormat] operation results. + # + def get(resource_group_name, hub_name, link_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, link_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param custom_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, hub_name, link_name, custom_headers = nil) + get_async(resource_group_name, hub_name, link_name, custom_headers).value! + end + + # + # Gets a link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param [Hash{String => String}] 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, hub_name, link_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'link_name is nil' if link_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.CustomerInsights/hubs/{hubName}/links/{linkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'linkName' => link_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::LinkResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, hub_name, link_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, link_name, custom_headers).value! + nil + end + + # + # Deletes a link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param custom_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, hub_name, link_name, custom_headers = nil) + delete_async(resource_group_name, hub_name, link_name, custom_headers).value! + end + + # + # Deletes a link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param [Hash{String => String}] 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, hub_name, link_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'link_name is nil' if link_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.CustomerInsights/hubs/{hubName}/links/{linkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'linkName' => link_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the links in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the links in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all the links in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/links' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::LinkListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 link or updates an existing link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param parameters [LinkResourceFormat] Parameters supplied to the + # CreateOrUpdate Link operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LinkResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, link_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, link_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a link or updates an existing link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param parameters [LinkResourceFormat] Parameters supplied to the + # CreateOrUpdate Link 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, hub_name, link_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, link_name, parameters, custom_headers).value! + end + + # + # Creates a link or updates an existing link in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param link_name [String] The name of the link. + # @param parameters [LinkResourceFormat] Parameters supplied to the + # CreateOrUpdate Link 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, hub_name, link_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'link_name is nil' if link_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::LinkResourceFormat.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.CustomerInsights/hubs/{hubName}/links/{linkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'linkName' => link_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::LinkResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the links in the specified hub. + # + # @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 [LinkListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the links in the specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the links in the specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::LinkListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the links in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LinkListResult] which provide lazy access to pages of the response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/assignment_principal.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/assignment_principal.rb new file mode 100644 index 0000000000..1f1a8c6ab7 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/assignment_principal.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::ARM::CustomerInsights + module Models + # + # The AssignmentPrincipal + # + class AssignmentPrincipal + + include MsRestAzure + + # @return [String] The principal id being assigned to. + attr_accessor :principal_id + + # @return [String] The Type of the principal ID. + attr_accessor :principal_type + + # @return [Hash{String => String}] Other metadata for the principal. + attr_accessor :principal_metadata + + + # + # Mapper for AssignmentPrincipal class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AssignmentPrincipal', + type: { + name: 'Composite', + class_name: 'AssignmentPrincipal', + model_properties: { + principal_id: { + required: true, + serialized_name: 'principalId', + type: { + name: 'String' + } + }, + principal_type: { + required: true, + serialized_name: 'principalType', + type: { + name: 'String' + } + }, + principal_metadata: { + required: false, + serialized_name: 'principalMetadata', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy.rb new file mode 100644 index 0000000000..be374ab6fd --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy.rb @@ -0,0 +1,87 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The authorization policy. + # + class AuthorizationPolicy + + include MsRestAzure + + # @return [String] Name of the policy. + attr_accessor :policy_name + + # @return [Array] The permissions associated with the + # policy. + attr_accessor :permissions + + # @return [String] Primary key assiciated with the policy. + attr_accessor :primary_key + + # @return [String] Secondary key assiciated with the policy. + attr_accessor :secondary_key + + + # + # Mapper for AuthorizationPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationPolicy', + type: { + name: 'Composite', + class_name: 'AuthorizationPolicy', + model_properties: { + policy_name: { + required: false, + read_only: true, + serialized_name: 'policyName', + type: { + name: 'String' + } + }, + permissions: { + required: true, + serialized_name: 'permissions', + constraints: { + UniqueItems: true + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PermissionTypesElementType', + type: { + name: 'Enum', + module: 'PermissionTypes' + } + } + } + }, + primary_key: { + required: false, + serialized_name: 'primaryKey', + type: { + name: 'String' + } + }, + secondary_key: { + required: false, + serialized_name: 'secondaryKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy_list_result.rb new file mode 100644 index 0000000000..729bfefe8d --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list authorization policy operation. + # + class AuthorizationPolicyListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [AuthorizationPolicyListResult] 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 AuthorizationPolicyListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationPolicyListResult', + type: { + name: 'Composite', + class_name: 'AuthorizationPolicyListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AuthorizationPolicyResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'AuthorizationPolicyResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy_resource_format.rb new file mode 100644 index 0000000000..93765c2d39 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/authorization_policy_resource_format.rb @@ -0,0 +1,111 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The authorization policy resource format. + # + class AuthorizationPolicyResourceFormat < ProxyResource + + include MsRestAzure + + # @return [String] Name of the policy. + attr_accessor :policy_name + + # @return [Array] The permissions associated with the + # policy. + attr_accessor :permissions + + # @return [String] Primary key assiciated with the policy. + attr_accessor :primary_key + + # @return [String] Secondary key assiciated with the policy. + attr_accessor :secondary_key + + + # + # Mapper for AuthorizationPolicyResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationPolicyResourceFormat', + type: { + name: 'Composite', + class_name: 'AuthorizationPolicyResourceFormat', + 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_name: { + required: false, + read_only: true, + serialized_name: 'properties.policyName', + type: { + name: 'String' + } + }, + permissions: { + required: true, + serialized_name: 'properties.permissions', + constraints: { + UniqueItems: true + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PermissionTypesElementType', + type: { + name: 'Enum', + module: 'PermissionTypes' + } + } + } + }, + primary_key: { + required: false, + serialized_name: 'properties.primaryKey', + type: { + name: 'String' + } + }, + secondary_key: { + required: false, + serialized_name: 'properties.secondaryKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/azure_blob_connector_properties.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/azure_blob_connector_properties.rb new file mode 100644 index 0000000000..86f4151b73 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/azure_blob_connector_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::ARM::CustomerInsights + module Models + # + # The Azure Blob connector properties. + # + class AzureBlobConnectorProperties + + include MsRestAzure + + # @return [String] The connection KeyVault URL. + attr_accessor :connection_key_vault_url + + + # + # Mapper for AzureBlobConnectorProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureBlobConnectorProperties', + type: { + name: 'Composite', + class_name: 'AzureBlobConnectorProperties', + model_properties: { + connection_key_vault_url: { + required: true, + serialized_name: 'connectionKeyVaultUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/calculation_window_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/calculation_window_types.rb new file mode 100644 index 0000000000..8442d4e7f5 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/calculation_window_types.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::ARM::CustomerInsights + module Models + # + # Defines values for CalculationWindowTypes + # + module CalculationWindowTypes + Lifetime = "Lifetime" + Hour = "Hour" + Day = "Day" + Week = "Week" + Month = "Month" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_profile_definition.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_profile_definition.rb new file mode 100644 index 0000000000..cc8f01f43b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_profile_definition.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # Definition of canonical profile. + # + class CanonicalProfileDefinition + + include MsRestAzure + + # @return [Integer] Canonical profile ID. + attr_accessor :canonical_profile_id + + # @return [Array] Properties of + # the canonical profile. + attr_accessor :properties + + + # + # Mapper for CanonicalProfileDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CanonicalProfileDefinition', + type: { + name: 'Composite', + class_name: 'CanonicalProfileDefinition', + model_properties: { + canonical_profile_id: { + required: false, + serialized_name: 'canonicalProfileId', + type: { + name: 'Number' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CanonicalProfileDefinitionPropertiesItemElementType', + type: { + name: 'Composite', + class_name: 'CanonicalProfileDefinitionPropertiesItem' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_profile_definition_properties_item.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_profile_definition_properties_item.rb new file mode 100644 index 0000000000..9f0d752ecd --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_profile_definition_properties_item.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The definition of a canonical profile property. + # + class CanonicalProfileDefinitionPropertiesItem + + include MsRestAzure + + # @return [String] Profile name. + attr_accessor :profile_name + + # @return [String] Property name of profile. + attr_accessor :profile_property_name + + # @return [Integer] The rank. + attr_accessor :rank + + # @return [CanonicalPropertyValueType] Type of canonical property value. + # Possible values include: 'Numeric', 'Categorical', + # 'DerivedCategorical', 'DerivedNumeric' + attr_accessor :type + + # @return [String] Value of the canonical property. + attr_accessor :value + + + # + # Mapper for CanonicalProfileDefinitionPropertiesItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CanonicalProfileDefinition_propertiesItem', + type: { + name: 'Composite', + class_name: 'CanonicalProfileDefinitionPropertiesItem', + model_properties: { + profile_name: { + required: false, + serialized_name: 'profileName', + type: { + name: 'String' + } + }, + profile_property_name: { + required: false, + serialized_name: 'profilePropertyName', + type: { + name: 'String' + } + }, + rank: { + required: false, + serialized_name: 'rank', + type: { + name: 'Number' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_property_value_type.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_property_value_type.rb new file mode 100644 index 0000000000..12612100d9 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/canonical_property_value_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::ARM::CustomerInsights + module Models + # + # Defines values for CanonicalPropertyValueType + # + module CanonicalPropertyValueType + Numeric = "Numeric" + Categorical = "Categorical" + DerivedCategorical = "DerivedCategorical" + DerivedNumeric = "DerivedNumeric" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/cardinality_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/cardinality_types.rb new file mode 100644 index 0000000000..053c9915dc --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/cardinality_types.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::ARM::CustomerInsights + module Models + # + # Defines values for CardinalityTypes + # + module CardinalityTypes + OneToOne = "OneToOne" + OneToMany = "OneToMany" + ManyToMany = "ManyToMany" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/completion_operation_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/completion_operation_types.rb new file mode 100644 index 0000000000..a28993bf99 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/completion_operation_types.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::ARM::CustomerInsights + module Models + # + # Defines values for CompletionOperationTypes + # + module CompletionOperationTypes + DoNothing = "DoNothing" + DeleteFile = "DeleteFile" + MoveFile = "MoveFile" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_list_result.rb new file mode 100644 index 0000000000..13d3d2bab0 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list connector operation. + # + class ConnectorListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ConnectorListResult] 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 ConnectorListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorListResult', + type: { + name: 'Composite', + class_name: 'ConnectorListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ConnectorResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'ConnectorResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_availability.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_availability.rb new file mode 100644 index 0000000000..40c191a6ca --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_availability.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::ARM::CustomerInsights + module Models + # + # Connector mapping property availability. + # + class ConnectorMappingAvailability + + include MsRestAzure + + # @return [FrequencyTypes] The frequency to update. Possible values + # include: 'Minute', 'Hour', 'Day', 'Week', 'Month' + attr_accessor :frequency + + # @return [Integer] The interval of the given frequency to use. + attr_accessor :interval + + + # + # Mapper for ConnectorMappingAvailability class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingAvailability', + type: { + name: 'Composite', + class_name: 'ConnectorMappingAvailability', + model_properties: { + frequency: { + required: false, + serialized_name: 'frequency', + type: { + name: 'Enum', + module: 'FrequencyTypes' + } + }, + interval: { + required: true, + serialized_name: 'interval', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_complete_operation.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_complete_operation.rb new file mode 100644 index 0000000000..050e3c2b3e --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_complete_operation.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::ARM::CustomerInsights + module Models + # + # The complete operation. + # + class ConnectorMappingCompleteOperation + + include MsRestAzure + + # @return [CompletionOperationTypes] The type of completion operation. + # Possible values include: 'DoNothing', 'DeleteFile', 'MoveFile' + attr_accessor :completion_operation_type + + # @return [String] The destination folder where files will be moved to + # once the import is done. + attr_accessor :destination_folder + + + # + # Mapper for ConnectorMappingCompleteOperation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingCompleteOperation', + type: { + name: 'Composite', + class_name: 'ConnectorMappingCompleteOperation', + model_properties: { + completion_operation_type: { + required: false, + serialized_name: 'completionOperationType', + type: { + name: 'Enum', + module: 'CompletionOperationTypes' + } + }, + destination_folder: { + required: false, + serialized_name: 'destinationFolder', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_error_management.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_error_management.rb new file mode 100644 index 0000000000..1a27e8d582 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_error_management.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::ARM::CustomerInsights + module Models + # + # The error mangement. + # + class ConnectorMappingErrorManagement + + include MsRestAzure + + # @return [ErrorManagementTypes] The type of error management to use for + # the mapping. Possible values include: 'RejectAndContinue', + # 'StopImport', 'RejectUntilLimit' + attr_accessor :error_management_type + + # @return [Integer] The error limit allowed while importing data. + attr_accessor :error_limit + + + # + # Mapper for ConnectorMappingErrorManagement class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingErrorManagement', + type: { + name: 'Composite', + class_name: 'ConnectorMappingErrorManagement', + model_properties: { + error_management_type: { + required: true, + serialized_name: 'errorManagementType', + type: { + name: 'Enum', + module: 'ErrorManagementTypes' + } + }, + error_limit: { + required: false, + serialized_name: 'errorLimit', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_format.rb new file mode 100644 index 0000000000..1ed8712225 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_format.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::ARM::CustomerInsights + module Models + # + # Connector mapping property format. + # + class ConnectorMappingFormat + + include MsRestAzure + + # @return [String] The type mapping format. Default value: 'TextFormat' . + attr_accessor :format_type + + # @return [String] The character that signifies a break between columns. + attr_accessor :column_delimiter + + # @return [String] The oData language. + attr_accessor :accept_language + + # @return [String] Quote character, used to indicate enquoted fields. + attr_accessor :quote_character + + # @return [String] Escape character for quotes, can be the same as the + # quoteCharacter. + attr_accessor :quote_escape_character + + # @return [String] Character separating array elements. + attr_accessor :array_separator + + + # + # Mapper for ConnectorMappingFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingFormat', + type: { + name: 'Composite', + class_name: 'ConnectorMappingFormat', + model_properties: { + format_type: { + required: true, + is_constant: true, + serialized_name: 'formatType', + default_value: 'TextFormat', + type: { + name: 'String' + } + }, + column_delimiter: { + required: false, + serialized_name: 'columnDelimiter', + type: { + name: 'String' + } + }, + accept_language: { + required: false, + serialized_name: 'acceptLanguage', + type: { + name: 'String' + } + }, + quote_character: { + required: false, + serialized_name: 'quoteCharacter', + type: { + name: 'String' + } + }, + quote_escape_character: { + required: false, + serialized_name: 'quoteEscapeCharacter', + type: { + name: 'String' + } + }, + array_separator: { + required: false, + serialized_name: 'arraySeparator', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_list_result.rb new file mode 100644 index 0000000000..fc8535c07d --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list connector mapping operation. + # + class ConnectorMappingListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ConnectorMappingListResult] 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 ConnectorMappingListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingListResult', + type: { + name: 'Composite', + class_name: 'ConnectorMappingListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ConnectorMappingResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'ConnectorMappingResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_properties.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_properties.rb new file mode 100644 index 0000000000..8c9301b284 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_properties.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::ARM::CustomerInsights + module Models + # + # The connector mapping properties. + # + class ConnectorMappingProperties + + include MsRestAzure + + # @return [String] The folder path for the mapping. + attr_accessor :folder_path + + # @return [String] The file filter for the mapping. + attr_accessor :file_filter + + # @return [Boolean] If the file contains a header or not. + attr_accessor :has_header + + # @return [ConnectorMappingErrorManagement] The error management setting + # for the mapping. + attr_accessor :error_management + + # @return [ConnectorMappingFormat] The format of mapping property. + attr_accessor :format + + # @return [ConnectorMappingAvailability] The availability of mapping + # property. + attr_accessor :availability + + # @return [Array] Ingestion mapping + # information at property level. + attr_accessor :structure + + # @return [ConnectorMappingCompleteOperation] The operation after import + # is done. + attr_accessor :complete_operation + + + # + # Mapper for ConnectorMappingProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingProperties', + type: { + name: 'Composite', + class_name: 'ConnectorMappingProperties', + model_properties: { + folder_path: { + required: false, + serialized_name: 'folderPath', + type: { + name: 'String' + } + }, + file_filter: { + required: false, + serialized_name: 'fileFilter', + type: { + name: 'String' + } + }, + has_header: { + required: false, + serialized_name: 'hasHeader', + type: { + name: 'Boolean' + } + }, + error_management: { + required: true, + serialized_name: 'errorManagement', + type: { + name: 'Composite', + class_name: 'ConnectorMappingErrorManagement' + } + }, + format: { + required: true, + serialized_name: 'format', + default_value: {}, + type: { + name: 'Composite', + class_name: 'ConnectorMappingFormat' + } + }, + availability: { + required: true, + serialized_name: 'availability', + type: { + name: 'Composite', + class_name: 'ConnectorMappingAvailability' + } + }, + structure: { + required: true, + serialized_name: 'structure', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ConnectorMappingStructureElementType', + type: { + name: 'Composite', + class_name: 'ConnectorMappingStructure' + } + } + } + }, + complete_operation: { + required: true, + serialized_name: 'completeOperation', + type: { + name: 'Composite', + class_name: 'ConnectorMappingCompleteOperation' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_resource_format.rb new file mode 100644 index 0000000000..bafc49b55f --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_resource_format.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::ARM::CustomerInsights + module Models + # + # The c onnector mapping resource format. + # + class ConnectorMappingResourceFormat < ProxyResource + + include MsRestAzure + + # @return [String] The connector name. + attr_accessor :connector_name + + # @return [ConnectorTypes] Type of connector. Possible values include: + # 'None', 'CRM', 'AzureBlob', 'Salesforce', 'ExchangeOnline', 'Outbound' + attr_accessor :connector_type + + # @return [DateTime] The created time. + attr_accessor :created + + # @return [DateTime] The last monified time. + attr_accessor :last_modified + + # @return [EntityTypes] Defines which entity type the file should map to. + # Possible values include: 'None', 'Profile', 'Interaction', + # 'Relationship' + attr_accessor :entity_type + + # @return [String] The mapping entity name. + attr_accessor :entity_type_name + + # @return [String] The connector mapping name + attr_accessor :connector_mapping_name + + # @return [String] Display name for the connector mapping. + attr_accessor :display_name + + # @return [String] The description of the connector mapping. + attr_accessor :description + + # @return [String] The DataFormat ID. + attr_accessor :data_format_id + + # @return [ConnectorMappingProperties] The properties of the mapping. + attr_accessor :mapping_properties + + # @return [DateTime] The next run time based on customer's settings. + attr_accessor :next_run_time + + # @return [String] The RunId. + attr_accessor :run_id + + # @return [ConnectorMappingStates] State of connector mapping. Possible + # values include: 'Creating', 'Created', 'Failed', 'Ready', 'Running', + # 'Stopped', 'Expiring' + attr_accessor :state + + # @return [String] The hub name. + attr_accessor :tenant_id + + + # + # Mapper for ConnectorMappingResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingResourceFormat', + type: { + name: 'Composite', + class_name: 'ConnectorMappingResourceFormat', + 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' + } + }, + connector_name: { + required: false, + read_only: true, + serialized_name: 'properties.connectorName', + type: { + name: 'String' + } + }, + connector_type: { + required: false, + serialized_name: 'properties.connectorType', + type: { + name: 'String' + } + }, + created: { + required: false, + read_only: true, + serialized_name: 'properties.created', + type: { + name: 'DateTime' + } + }, + last_modified: { + required: false, + read_only: true, + serialized_name: 'properties.lastModified', + type: { + name: 'DateTime' + } + }, + entity_type: { + required: true, + serialized_name: 'properties.entityType', + type: { + name: 'Enum', + module: 'EntityTypes' + } + }, + entity_type_name: { + required: true, + serialized_name: 'properties.entityTypeName', + type: { + name: 'String' + } + }, + connector_mapping_name: { + required: false, + read_only: true, + serialized_name: 'properties.connectorMappingName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + data_format_id: { + required: false, + read_only: true, + serialized_name: 'properties.dataFormatId', + type: { + name: 'String' + } + }, + mapping_properties: { + required: true, + serialized_name: 'properties.mappingProperties', + default_value: {}, + type: { + name: 'Composite', + class_name: 'ConnectorMappingProperties' + } + }, + next_run_time: { + required: false, + read_only: true, + serialized_name: 'properties.nextRunTime', + type: { + name: 'DateTime' + } + }, + run_id: { + required: false, + read_only: true, + serialized_name: 'properties.runId', + type: { + name: 'String' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'ConnectorMappingStates' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_states.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_states.rb new file mode 100644 index 0000000000..729b184552 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_states.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::ARM::CustomerInsights + module Models + # + # Defines values for ConnectorMappingStates + # + module ConnectorMappingStates + Creating = "Creating" + Created = "Created" + Failed = "Failed" + Ready = "Ready" + Running = "Running" + Stopped = "Stopped" + Expiring = "Expiring" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_structure.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_structure.rb new file mode 100644 index 0000000000..1cd380ac1b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_mapping_structure.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::ARM::CustomerInsights + module Models + # + # Connector mapping property structure. + # + class ConnectorMappingStructure + + include MsRestAzure + + # @return [String] The property name of the mapping entity. + attr_accessor :property_name + + # @return [String] The column name of the import file. + attr_accessor :column_name + + # @return [String] Custom format specifier for input parsing. + attr_accessor :custom_format_specifier + + # @return [Boolean] Indicates if the column is encrypted. + attr_accessor :is_encrypted + + + # + # Mapper for ConnectorMappingStructure class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorMappingStructure', + type: { + name: 'Composite', + class_name: 'ConnectorMappingStructure', + model_properties: { + property_name: { + required: true, + serialized_name: 'propertyName', + type: { + name: 'String' + } + }, + column_name: { + required: true, + serialized_name: 'columnName', + type: { + name: 'String' + } + }, + custom_format_specifier: { + required: false, + serialized_name: 'customFormatSpecifier', + type: { + name: 'String' + } + }, + is_encrypted: { + required: false, + serialized_name: 'isEncrypted', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_resource_format.rb new file mode 100644 index 0000000000..1e7a1ae8c7 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_resource_format.rb @@ -0,0 +1,183 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The connector resource format. + # + class ConnectorResourceFormat < ProxyResource + + include MsRestAzure + + # @return [Integer] ID of the connector. + attr_accessor :connector_id + + # @return [String] Name of the connector. + attr_accessor :connector_name + + # @return [ConnectorTypes] Type of connector. Possible values include: + # 'None', 'CRM', 'AzureBlob', 'Salesforce', 'ExchangeOnline', 'Outbound' + attr_accessor :connector_type + + # @return [String] Display name of the connector. + attr_accessor :display_name + + # @return [String] Description of the connector. + attr_accessor :description + + # @return The connector properties. + attr_accessor :connector_properties + + # @return [DateTime] The created time. + attr_accessor :created + + # @return [DateTime] The last monified time. + attr_accessor :last_modified + + # @return [ConnectorStates] State of connector. Possible values include: + # 'Creating', 'Created', 'Ready', 'Expiring', 'Deleting', 'Failed' + attr_accessor :state + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [Boolean] If this is an internal connector. + attr_accessor :is_internal + + + # + # Mapper for ConnectorResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConnectorResourceFormat', + type: { + name: 'Composite', + class_name: 'ConnectorResourceFormat', + 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' + } + }, + connector_id: { + required: false, + read_only: true, + serialized_name: 'properties.connectorId', + type: { + name: 'Number' + } + }, + connector_name: { + required: false, + serialized_name: 'properties.connectorName', + type: { + name: 'String' + } + }, + connector_type: { + required: true, + serialized_name: 'properties.connectorType', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + connector_properties: { + required: true, + serialized_name: 'properties.connectorProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + created: { + required: false, + read_only: true, + serialized_name: 'properties.created', + type: { + name: 'DateTime' + } + }, + last_modified: { + required: false, + read_only: true, + serialized_name: 'properties.lastModified', + type: { + name: 'DateTime' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'Enum', + module: 'ConnectorStates' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + is_internal: { + required: false, + serialized_name: 'properties.isInternal', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_states.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_states.rb new file mode 100644 index 0000000000..c1bfdc30fd --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_states.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::ARM::CustomerInsights + module Models + # + # Defines values for ConnectorStates + # + module ConnectorStates + Creating = "Creating" + Created = "Created" + Ready = "Ready" + Expiring = "Expiring" + Deleting = "Deleting" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_types.rb new file mode 100644 index 0000000000..d7d7dcb9cc --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/connector_types.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::ARM::CustomerInsights + module Models + # + # Defines values for ConnectorTypes + # + module ConnectorTypes + None = "None" + CRM = "CRM" + AzureBlob = "AzureBlob" + Salesforce = "Salesforce" + ExchangeOnline = "ExchangeOnline" + Outbound = "Outbound" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/crm_connector_entities.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/crm_connector_entities.rb new file mode 100644 index 0000000000..2501cddbf9 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/crm_connector_entities.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::ARM::CustomerInsights + module Models + # + # The CRM connector entities. + # + class CrmConnectorEntities + + include MsRestAzure + + # @return [String] The logical name. + attr_accessor :logical_name + + # @return [String] The display name. + attr_accessor :display_name + + # @return [Boolean] Indicating whether this is profile. + attr_accessor :is_profile + + + # + # Mapper for CrmConnectorEntities class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CrmConnectorEntities', + type: { + name: 'Composite', + class_name: 'CrmConnectorEntities', + model_properties: { + logical_name: { + required: true, + serialized_name: 'logicalName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + is_profile: { + required: false, + serialized_name: 'isProfile', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/crm_connector_properties.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/crm_connector_properties.rb new file mode 100644 index 0000000000..209cdb0d94 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/crm_connector_properties.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::ARM::CustomerInsights + module Models + # + # The CRM connector properties. + # + class CrmConnectorProperties + + include MsRestAzure + + # @return [String] The connection string. + attr_accessor :connection_string + + # @return [String] The organization ID. + attr_accessor :organization_id + + # @return [String] The organization URL. + attr_accessor :organization_url + + # @return [Array] The entities like account, + # contact, opportunity. + attr_accessor :entities + + # @return [String] The access token. + attr_accessor :access_token + + + # + # Mapper for CrmConnectorProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CrmConnectorProperties', + type: { + name: 'Composite', + class_name: 'CrmConnectorProperties', + model_properties: { + connection_string: { + required: false, + serialized_name: 'connectionString', + type: { + name: 'String' + } + }, + organization_id: { + required: true, + serialized_name: 'organizationId', + type: { + name: 'String' + } + }, + organization_url: { + required: true, + serialized_name: 'organizationUrl', + type: { + name: 'String' + } + }, + entities: { + required: true, + serialized_name: 'entities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CrmConnectorEntitiesElementType', + type: { + name: 'Composite', + class_name: 'CrmConnectorEntities' + } + } + } + }, + access_token: { + required: false, + serialized_name: 'accessToken', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/data_source_precedence.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/data_source_precedence.rb new file mode 100644 index 0000000000..992c1384bf --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/data_source_precedence.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::ARM::CustomerInsights + module Models + # + # The data source precedence is a way to know the precedence of each data + # source. + # + class DataSourcePrecedence + + include MsRestAzure + + # @return [String] The data source name + attr_accessor :name + + # @return [DataSourceType] The data source type. Possible values include: + # 'Connector', 'LinkInteraction', 'SystemDefault' + attr_accessor :data_source_type + + # @return [Status] The data source status. Possible values include: + # 'None', 'Active', 'Deleted' + attr_accessor :status + + # @return [Integer] The data source ID. + attr_accessor :id + + # @return [String] The data source reference id. + attr_accessor :data_source_reference_id + + # @return [Integer] the precedence value. + attr_accessor :precedence + + + # + # Mapper for DataSourcePrecedence class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataSourcePrecedence', + type: { + name: 'Composite', + class_name: 'DataSourcePrecedence', + model_properties: { + name: { + required: false, + read_only: true, + serialized_name: 'dataSource.name', + type: { + name: 'String' + } + }, + data_source_type: { + required: false, + read_only: true, + serialized_name: 'dataSource.dataSourceType', + type: { + name: 'String' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'dataSource.status', + type: { + name: 'String' + } + }, + id: { + required: false, + read_only: true, + serialized_name: 'dataSource.id', + type: { + name: 'Number' + } + }, + data_source_reference_id: { + required: false, + read_only: true, + serialized_name: 'dataSource.dataSourceReferenceId', + type: { + name: 'String' + } + }, + precedence: { + required: false, + serialized_name: 'precedence', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/data_source_type.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/data_source_type.rb new file mode 100644 index 0000000000..e89fc1287d --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/data_source_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::ARM::CustomerInsights + module Models + # + # Defines values for DataSourceType + # + module DataSourceType + Connector = "Connector" + LinkInteraction = "LinkInteraction" + SystemDefault = "SystemDefault" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/enriching_kpi.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/enriching_kpi.rb new file mode 100644 index 0000000000..38b4b45ee7 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/enriching_kpi.rb @@ -0,0 +1,229 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The enriching KPI definition. + # + class EnrichingKpi < KpiDefinition + + include MsRestAzure + + + # + # Mapper for EnrichingKpi class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EnrichingKpi', + type: { + name: 'Composite', + class_name: 'EnrichingKpi', + model_properties: { + entity_type: { + required: true, + serialized_name: 'entityType', + type: { + name: 'Enum', + module: 'EntityTypes' + } + }, + entity_type_name: { + required: true, + serialized_name: 'entityTypeName', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + kpi_name: { + required: false, + read_only: true, + serialized_name: 'kpiName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + calculation_window: { + required: true, + serialized_name: 'calculationWindow', + type: { + name: 'Enum', + module: 'CalculationWindowTypes' + } + }, + calculation_window_field_name: { + required: false, + serialized_name: 'calculationWindowFieldName', + type: { + name: 'String' + } + }, + function: { + required: true, + serialized_name: 'function', + type: { + name: 'Enum', + module: 'KpiFunctions' + } + }, + expression: { + required: true, + serialized_name: 'expression', + type: { + name: 'String' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + filter: { + required: false, + serialized_name: 'filter', + type: { + name: 'String' + } + }, + group_by: { + required: false, + serialized_name: 'groupBy', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + group_by_metadata: { + required: false, + read_only: true, + serialized_name: 'groupByMetadata', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiGroupByMetadataElementType', + type: { + name: 'Composite', + class_name: 'KpiGroupByMetadata' + } + } + } + }, + participant_profiles_metadata: { + required: false, + read_only: true, + serialized_name: 'participantProfilesMetadata', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiParticipantProfilesMetadataElementType', + type: { + name: 'Composite', + class_name: 'KpiParticipantProfilesMetadata' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'provisioningState', + type: { + name: 'String' + } + }, + thres_holds: { + required: false, + serialized_name: 'thresHolds', + type: { + name: 'Composite', + class_name: 'KpiThresholds' + } + }, + aliases: { + required: false, + serialized_name: 'aliases', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiAliasElementType', + type: { + name: 'Composite', + class_name: 'KpiAlias' + } + } + } + }, + extracts: { + required: false, + serialized_name: 'extracts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiExtractElementType', + type: { + name: 'Composite', + class_name: 'KpiExtract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_type.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_type.rb new file mode 100644 index 0000000000..d06508dcca --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_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::ARM::CustomerInsights + module Models + # + # Defines values for EntityType + # + module EntityType + None = "None" + Profile = "Profile" + Interaction = "Interaction" + Relationship = "Relationship" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_type_definition.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_type_definition.rb new file mode 100644 index 0000000000..4ccc20c6d8 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_type_definition.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::ARM::CustomerInsights + module Models + # + # Describes an entity. + # + class EntityTypeDefinition < MetadataDefinitionBase + + include MsRestAzure + + # @return [String] The api entity set name. This becomes the odata entity + # set name for the entity Type being refered in this object. + attr_accessor :api_entity_set_name + + # @return [EntityTypes] Type of entity. Possible values include: 'None', + # 'Profile', 'Interaction', 'Relationship' + attr_accessor :entity_type + + # @return [Array] The properties of the Profile. + attr_accessor :fields + + # @return [Integer] The instance count. + attr_accessor :instances_count + + # @return [DateTime] The last changed time for the type definition. + attr_accessor :last_changed_utc + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [String] The schema org link. This helps ACI identify and + # suggest semantic models. + attr_accessor :schema_item_type_link + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The timestamp property name. Represents the time when + # the interaction or profile update happened. + attr_accessor :timestamp_field_name + + # @return [String] The name of the entity. + attr_accessor :type_name + + + # + # Mapper for EntityTypeDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EntityTypeDefinition', + type: { + name: 'Composite', + class_name: 'EntityTypeDefinition', + model_properties: { + attributes: { + required: false, + serialized_name: 'attributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ArrayElementType', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + localized_attributes: { + required: false, + serialized_name: 'localizedAttributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'HashElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + small_image: { + required: false, + serialized_name: 'smallImage', + type: { + name: 'String' + } + }, + medium_image: { + required: false, + serialized_name: 'mediumImage', + type: { + name: 'String' + } + }, + large_image: { + required: false, + serialized_name: 'largeImage', + type: { + name: 'String' + } + }, + api_entity_set_name: { + required: false, + serialized_name: 'apiEntitySetName', + type: { + name: 'String' + } + }, + entity_type: { + required: false, + serialized_name: 'entityType', + type: { + name: 'Enum', + module: 'EntityTypes' + } + }, + fields: { + required: false, + serialized_name: 'fields', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PropertyDefinitionElementType', + type: { + name: 'Composite', + class_name: 'PropertyDefinition' + } + } + } + }, + instances_count: { + required: false, + serialized_name: 'instancesCount', + type: { + name: 'Number' + } + }, + last_changed_utc: { + required: false, + read_only: true, + serialized_name: 'lastChangedUtc', + type: { + name: 'DateTime' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'provisioningState', + type: { + name: 'String' + } + }, + schema_item_type_link: { + required: false, + serialized_name: 'schemaItemTypeLink', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + timestamp_field_name: { + required: false, + serialized_name: 'timestampFieldName', + type: { + name: 'String' + } + }, + type_name: { + required: false, + serialized_name: 'typeName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_types.rb new file mode 100644 index 0000000000..26489b0231 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/entity_types.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::ARM::CustomerInsights + module Models + # + # Defines values for EntityTypes + # + module EntityTypes + None = "None" + Profile = "Profile" + Interaction = "Interaction" + Relationship = "Relationship" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/error_management_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/error_management_types.rb new file mode 100644 index 0000000000..db0be5f61a --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/error_management_types.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::ARM::CustomerInsights + module Models + # + # Defines values for ErrorManagementTypes + # + module ErrorManagementTypes + RejectAndContinue = "RejectAndContinue" + StopImport = "StopImport" + RejectUntilLimit = "RejectUntilLimit" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/frequency_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/frequency_types.rb new file mode 100644 index 0000000000..db84f66cb6 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/frequency_types.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::ARM::CustomerInsights + module Models + # + # Defines values for FrequencyTypes + # + module FrequencyTypes + Minute = "Minute" + Hour = "Hour" + Day = "Day" + Week = "Week" + Month = "Month" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/get_image_upload_url_input.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/get_image_upload_url_input.rb new file mode 100644 index 0000000000..43a9640253 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/get_image_upload_url_input.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::ARM::CustomerInsights + module Models + # + # Input type for getting image upload url. + # + class GetImageUploadUrlInput + + include MsRestAzure + + # @return [String] Type of entity. Can be Profile or Interaction. + attr_accessor :entity_type + + # @return [String] Name of the entity type. + attr_accessor :entity_type_name + + # @return [String] Relative path of the image. + attr_accessor :relative_path + + + # + # Mapper for GetImageUploadUrlInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GetImageUploadUrlInput', + type: { + name: 'Composite', + class_name: 'GetImageUploadUrlInput', + model_properties: { + entity_type: { + required: false, + serialized_name: 'entityType', + type: { + name: 'String' + } + }, + entity_type_name: { + required: false, + serialized_name: 'entityTypeName', + type: { + name: 'String' + } + }, + relative_path: { + required: false, + serialized_name: 'relativePath', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub.rb new file mode 100644 index 0000000000..43a9d643e1 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub.rb @@ -0,0 +1,135 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # Hub resource. + # + class Hub < Resource + + include MsRestAzure + + # @return [String] API endpoint URL of the hub. + attr_accessor :api_endpoint + + # @return [String] Web endpoint URL of the hub. + attr_accessor :web_endpoint + + # @return [String] Provisioning state of the hub. + attr_accessor :provisioning_state + + # @return [Integer] The bit flags for enabled hub features. Bit 0 is set + # to 1 indicates graph is enabled, or disabled if set to 0. Bit 1 is set + # to 1 indicates the hub is disabled, or enabled if set to 0. + attr_accessor :tenant_features + + # @return [HubBillingInfoFormat] Billing settings of the hub. + attr_accessor :hub_billing_info + + + # + # Mapper for Hub class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Hub', + type: { + name: 'Composite', + class_name: 'Hub', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + api_endpoint: { + required: false, + read_only: true, + serialized_name: 'properties.apiEndpoint', + type: { + name: 'String' + } + }, + web_endpoint: { + required: false, + read_only: true, + serialized_name: 'properties.webEndpoint', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + tenant_features: { + required: false, + serialized_name: 'properties.tenantFeatures', + type: { + name: 'Number' + } + }, + hub_billing_info: { + required: false, + serialized_name: 'properties.hubBillingInfo', + type: { + name: 'Composite', + class_name: 'HubBillingInfoFormat' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub_billing_info_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub_billing_info_format.rb new file mode 100644 index 0000000000..138bb55121 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub_billing_info_format.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::ARM::CustomerInsights + module Models + # + # Hub billing info. + # + class HubBillingInfoFormat + + include MsRestAzure + + # @return [String] The sku name. + attr_accessor :sku_name + + # @return [Integer] The minimum number of units will be billed. One unit + # is 10,000 Profiles and 100,000 Interactions. + attr_accessor :min_units + + # @return [Integer] The maximum number of units can be used. One unit is + # 10,000 Profiles and 100,000 Interactions. + attr_accessor :max_units + + + # + # Mapper for HubBillingInfoFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HubBillingInfoFormat', + type: { + name: 'Composite', + class_name: 'HubBillingInfoFormat', + model_properties: { + sku_name: { + required: false, + serialized_name: 'skuName', + type: { + name: 'String' + } + }, + min_units: { + required: false, + serialized_name: 'minUnits', + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + max_units: { + required: false, + serialized_name: 'maxUnits', + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub_list_result.rb new file mode 100644 index 0000000000..d6ba0bfe03 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/hub_list_result.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::ARM::CustomerInsights + module Models + # + # Response of list hub operation. + # + class HubListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list operation. + attr_accessor :value + + # @return [String] Link for next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [HubListResult] 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 HubListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HubListResult', + type: { + name: 'Composite', + class_name: 'HubListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HubElementType', + type: { + name: 'Composite', + class_name: 'Hub' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/image_definition.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/image_definition.rb new file mode 100644 index 0000000000..c216879379 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/image_definition.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::ARM::CustomerInsights + module Models + # + # The image definition. + # + class ImageDefinition + + include MsRestAzure + + # @return [Boolean] Whether image exists already. + attr_accessor :image_exists + + # @return [String] Content URL for the image blob. + attr_accessor :content_url + + # @return [String] Relative path of the image. + attr_accessor :relative_path + + + # + # Mapper for ImageDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ImageDefinition', + type: { + name: 'Composite', + class_name: 'ImageDefinition', + model_properties: { + image_exists: { + required: false, + serialized_name: 'imageExists', + type: { + name: 'Boolean' + } + }, + content_url: { + required: false, + serialized_name: 'contentUrl', + type: { + name: 'String' + } + }, + relative_path: { + required: false, + serialized_name: 'relativePath', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/instance_operation_type.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/instance_operation_type.rb new file mode 100644 index 0000000000..4c8c35f7a1 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/instance_operation_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::ARM::CustomerInsights + module Models + # + # Defines values for InstanceOperationType + # + module InstanceOperationType + Upsert = "Upsert" + Delete = "Delete" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/interaction_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/interaction_list_result.rb new file mode 100644 index 0000000000..884305975b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/interaction_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list interaction operation. + # + class InteractionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [InteractionListResult] 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 InteractionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InteractionListResult', + type: { + name: 'Composite', + class_name: 'InteractionListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InteractionResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'InteractionResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/interaction_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/interaction_resource_format.rb new file mode 100644 index 0000000000..6e6fdf0791 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/interaction_resource_format.rb @@ -0,0 +1,434 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The interaction resource format. + # + class InteractionResourceFormat < ProxyResource + + include MsRestAzure + + # @return [Hash{String => Array}] The attributes for the Type. + attr_accessor :attributes + + # @return [Hash{String => String}] Localized descriptions for the + # property. + attr_accessor :description + + # @return [Hash{String => String}] Localized display names for the + # property. + attr_accessor :display_name + + # @return [Hash{String => Hash{String => String}}] Any custom localized + # attributes for the Type. + attr_accessor :localized_attributes + + # @return [String] Small Image associated with the Property or + # EntityType. + attr_accessor :small_image + + # @return [String] Medium Image associated with the Property or + # EntityType. + attr_accessor :medium_image + + # @return [String] Large Image associated with the Property or + # EntityType. + attr_accessor :large_image + + # @return [String] The api entity set name. This becomes the odata entity + # set name for the entity Type being refered in this object. + attr_accessor :api_entity_set_name + + # @return [EntityTypes] Type of entity. Possible values include: 'None', + # 'Profile', 'Interaction', 'Relationship' + attr_accessor :entity_type + + # @return [Array] The properties of the Profile. + attr_accessor :fields + + # @return [Integer] The instance count. + attr_accessor :instances_count + + # @return [DateTime] The last changed time for the type definition. + attr_accessor :last_changed_utc + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [String] The schema org link. This helps ACI identify and + # suggest semantic models. + attr_accessor :schema_item_type_link + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The timestamp property name. Represents the time when + # the interaction or profile update happened. + attr_accessor :timestamp_field_name + + # @return [String] The name of the entity. + attr_accessor :type_name + + # @return [Array] The id property names. Properties which + # uniquely identify an interaction instance. + attr_accessor :id_property_names + + # @return [Array] Profiles that participated in the + # interaction. + attr_accessor :participant_profiles + + # @return [String] The primary participant property name for an + # interaction ,This is used to logically represent the agent of the + # interaction, Specify the participant name here from ParticipantName. + attr_accessor :primary_participant_profile_property_name + + # @return [Array] This is specific to interactions + # modeled as activities. Data sources are used to determine where data is + # stored and also in precedence rules. + attr_accessor :data_source_precedence_rules + + # @return [String] The data source name + attr_accessor :interaction_resource_format_name + + # @return [DataSourceType] The data source type. Possible values include: + # 'Connector', 'LinkInteraction', 'SystemDefault' + attr_accessor :data_source_type + + # @return [Status] The data source status. Possible values include: + # 'None', 'Active', 'Deleted' + attr_accessor :status + + # @return [Integer] The data source ID. + attr_accessor :interaction_resource_format_id + + # @return [String] The data source reference id. + attr_accessor :data_source_reference_id + + # @return [Boolean] An interaction can be tagged as an activity only + # during create. This enables the interaction to be editable and can + # enable merging of properties from multiple data sources based on + # precedence, which is defined at a link level. + attr_accessor :is_activity + + + # + # Mapper for InteractionResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InteractionResourceFormat', + type: { + name: 'Composite', + class_name: 'InteractionResourceFormat', + 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' + } + }, + attributes: { + required: false, + serialized_name: 'properties.attributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ArrayElementType', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + localized_attributes: { + required: false, + serialized_name: 'properties.localizedAttributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'HashElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + small_image: { + required: false, + serialized_name: 'properties.smallImage', + type: { + name: 'String' + } + }, + medium_image: { + required: false, + serialized_name: 'properties.mediumImage', + type: { + name: 'String' + } + }, + large_image: { + required: false, + serialized_name: 'properties.largeImage', + type: { + name: 'String' + } + }, + api_entity_set_name: { + required: false, + serialized_name: 'properties.apiEntitySetName', + type: { + name: 'String' + } + }, + entity_type: { + required: false, + serialized_name: 'properties.entityType', + type: { + name: 'Enum', + module: 'EntityTypes' + } + }, + fields: { + required: false, + serialized_name: 'properties.fields', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PropertyDefinitionElementType', + type: { + name: 'Composite', + class_name: 'PropertyDefinition' + } + } + } + }, + instances_count: { + required: false, + serialized_name: 'properties.instancesCount', + type: { + name: 'Number' + } + }, + last_changed_utc: { + required: false, + read_only: true, + serialized_name: 'properties.lastChangedUtc', + type: { + name: 'DateTime' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + schema_item_type_link: { + required: false, + serialized_name: 'properties.schemaItemTypeLink', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + timestamp_field_name: { + required: false, + serialized_name: 'properties.timestampFieldName', + type: { + name: 'String' + } + }, + type_name: { + required: false, + serialized_name: 'properties.typeName', + type: { + name: 'String' + } + }, + id_property_names: { + required: false, + serialized_name: 'properties.idPropertyNames', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + participant_profiles: { + required: false, + serialized_name: 'properties.participantProfiles', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParticipantElementType', + type: { + name: 'Composite', + class_name: 'Participant' + } + } + } + }, + primary_participant_profile_property_name: { + required: false, + serialized_name: 'properties.primaryParticipantProfilePropertyName', + type: { + name: 'String' + } + }, + data_source_precedence_rules: { + required: false, + read_only: true, + serialized_name: 'properties.dataSourcePrecedenceRules', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DataSourcePrecedenceElementType', + type: { + name: 'Composite', + class_name: 'DataSourcePrecedence' + } + } + } + }, + interaction_resource_format_name: { + required: false, + read_only: true, + serialized_name: 'properties.defaultDataSource.name', + type: { + name: 'String' + } + }, + data_source_type: { + required: false, + read_only: true, + serialized_name: 'properties.defaultDataSource.dataSourceType', + type: { + name: 'String' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'properties.defaultDataSource.status', + type: { + name: 'String' + } + }, + interaction_resource_format_id: { + required: false, + read_only: true, + serialized_name: 'properties.defaultDataSource.id', + type: { + name: 'Number' + } + }, + data_source_reference_id: { + required: false, + read_only: true, + serialized_name: 'properties.defaultDataSource.dataSourceReferenceId', + type: { + name: 'String' + } + }, + is_activity: { + required: false, + serialized_name: 'properties.isActivity', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_alias.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_alias.rb new file mode 100644 index 0000000000..8f887a2e4c --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_alias.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::ARM::CustomerInsights + module Models + # + # The KPI alias. + # + class KpiAlias + + include MsRestAzure + + # @return [String] KPI alias name. + attr_accessor :alias_name + + # @return [String] The expression. + attr_accessor :expression + + + # + # Mapper for KpiAlias class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiAlias', + type: { + name: 'Composite', + class_name: 'KpiAlias', + model_properties: { + alias_name: { + required: true, + serialized_name: 'aliasName', + type: { + name: 'String' + } + }, + expression: { + required: true, + serialized_name: 'expression', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_definition.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_definition.rb new file mode 100644 index 0000000000..aeda5e76a4 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_definition.rb @@ -0,0 +1,293 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # Defines the KPI Threshold limits. + # + class KpiDefinition + + include MsRestAzure + + # @return [EntityTypes] The mapping entity type. Possible values include: + # 'None', 'Profile', 'Interaction', 'Relationship' + attr_accessor :entity_type + + # @return [String] The mapping entity name. + attr_accessor :entity_type_name + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The KPI name. + attr_accessor :kpi_name + + # @return [Hash{String => String}] Localized display name for the KPI. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized description for the KPI. + attr_accessor :description + + # @return [CalculationWindowTypes] The calculation window. Possible + # values include: 'Lifetime', 'Hour', 'Day', 'Week', 'Month' + attr_accessor :calculation_window + + # @return [String] Name of calculation window field. + attr_accessor :calculation_window_field_name + + # @return [KpiFunctions] The computation function for the KPI. Possible + # values include: 'Sum', 'Avg', 'Min', 'Max', 'Last', 'Count', 'None', + # 'CountDistinct' + attr_accessor :function + + # @return [String] The computation expression for the KPI. + attr_accessor :expression + + # @return [String] The unit of measurement for the KPI. + attr_accessor :unit + + # @return [String] The filter expression for the KPI. + attr_accessor :filter + + # @return [Array] the group by properties for the KPI. + attr_accessor :group_by + + # @return [Array] The KPI GroupByMetadata. + attr_accessor :group_by_metadata + + # @return [Array] The participant + # profiles. + attr_accessor :participant_profiles_metadata + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [KpiThresholds] The KPI thresholds. + attr_accessor :thres_holds + + # @return [Array] The aliases. + attr_accessor :aliases + + # @return [Array] The KPI extracts. + attr_accessor :extracts + + + # + # Mapper for KpiDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiDefinition', + type: { + name: 'Composite', + class_name: 'KpiDefinition', + model_properties: { + entity_type: { + required: true, + serialized_name: 'entityType', + type: { + name: 'Enum', + module: 'EntityTypes' + } + }, + entity_type_name: { + required: true, + serialized_name: 'entityTypeName', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + kpi_name: { + required: false, + read_only: true, + serialized_name: 'kpiName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + calculation_window: { + required: true, + serialized_name: 'calculationWindow', + type: { + name: 'Enum', + module: 'CalculationWindowTypes' + } + }, + calculation_window_field_name: { + required: false, + serialized_name: 'calculationWindowFieldName', + type: { + name: 'String' + } + }, + function: { + required: true, + serialized_name: 'function', + type: { + name: 'Enum', + module: 'KpiFunctions' + } + }, + expression: { + required: true, + serialized_name: 'expression', + type: { + name: 'String' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + filter: { + required: false, + serialized_name: 'filter', + type: { + name: 'String' + } + }, + group_by: { + required: false, + serialized_name: 'groupBy', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + group_by_metadata: { + required: false, + read_only: true, + serialized_name: 'groupByMetadata', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiGroupByMetadataElementType', + type: { + name: 'Composite', + class_name: 'KpiGroupByMetadata' + } + } + } + }, + participant_profiles_metadata: { + required: false, + read_only: true, + serialized_name: 'participantProfilesMetadata', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiParticipantProfilesMetadataElementType', + type: { + name: 'Composite', + class_name: 'KpiParticipantProfilesMetadata' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'provisioningState', + type: { + name: 'String' + } + }, + thres_holds: { + required: false, + serialized_name: 'thresHolds', + type: { + name: 'Composite', + class_name: 'KpiThresholds' + } + }, + aliases: { + required: false, + serialized_name: 'aliases', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiAliasElementType', + type: { + name: 'Composite', + class_name: 'KpiAlias' + } + } + } + }, + extracts: { + required: false, + serialized_name: 'extracts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiExtractElementType', + type: { + name: 'Composite', + class_name: 'KpiExtract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_extract.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_extract.rb new file mode 100644 index 0000000000..dcefcb5396 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_extract.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::ARM::CustomerInsights + module Models + # + # The KPI extract. + # + class KpiExtract + + include MsRestAzure + + # @return [String] KPI extract name. + attr_accessor :extract_name + + # @return [String] The expression. + attr_accessor :expression + + + # + # Mapper for KpiExtract class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiExtract', + type: { + name: 'Composite', + class_name: 'KpiExtract', + model_properties: { + extract_name: { + required: true, + serialized_name: 'extractName', + type: { + name: 'String' + } + }, + expression: { + required: true, + serialized_name: 'expression', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_functions.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_functions.rb new file mode 100644 index 0000000000..4edf707e64 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_functions.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::ARM::CustomerInsights + module Models + # + # Defines values for KpiFunctions + # + module KpiFunctions + Sum = "Sum" + Avg = "Avg" + Min = "Min" + Max = "Max" + Last = "Last" + Count = "Count" + None = "None" + CountDistinct = "CountDistinct" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_group_by_metadata.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_group_by_metadata.rb new file mode 100644 index 0000000000..195b33075e --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_group_by_metadata.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::ARM::CustomerInsights + module Models + # + # The KPI GroupBy field metadata. + # + class KpiGroupByMetadata + + include MsRestAzure + + # @return [Hash{String => String}] The display name. + attr_accessor :display_name + + # @return [String] The name of the field. + attr_accessor :field_name + + # @return [String] The type of the field. + attr_accessor :field_type + + + # + # Mapper for KpiGroupByMetadata class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiGroupByMetadata', + type: { + name: 'Composite', + class_name: 'KpiGroupByMetadata', + model_properties: { + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + field_name: { + required: false, + serialized_name: 'fieldName', + type: { + name: 'String' + } + }, + field_type: { + required: false, + serialized_name: 'fieldType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_list_result.rb new file mode 100644 index 0000000000..9cc9eab0ac --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list KPI operation. + # + class KpiListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [KpiListResult] 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 KpiListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiListResult', + type: { + name: 'Composite', + class_name: 'KpiListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'KpiResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_participant_profiles_metadata.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_participant_profiles_metadata.rb new file mode 100644 index 0000000000..fd11996d7b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_participant_profiles_metadata.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::ARM::CustomerInsights + module Models + # + # The KPI participant profile metadata. + # + class KpiParticipantProfilesMetadata + + include MsRestAzure + + # @return [String] Name of the type. + attr_accessor :type_name + + + # + # Mapper for KpiParticipantProfilesMetadata class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiParticipantProfilesMetadata', + type: { + name: 'Composite', + class_name: 'KpiParticipantProfilesMetadata', + model_properties: { + type_name: { + required: true, + serialized_name: 'typeName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_resource_format.rb new file mode 100644 index 0000000000..1f5571fabd --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_resource_format.rb @@ -0,0 +1,317 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The KPI resource format. + # + class KpiResourceFormat < ProxyResource + + include MsRestAzure + + # @return [EntityTypes] The mapping entity type. Possible values include: + # 'None', 'Profile', 'Interaction', 'Relationship' + attr_accessor :entity_type + + # @return [String] The mapping entity name. + attr_accessor :entity_type_name + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The KPI name. + attr_accessor :kpi_name + + # @return [Hash{String => String}] Localized display name for the KPI. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized description for the KPI. + attr_accessor :description + + # @return [CalculationWindowTypes] The calculation window. Possible + # values include: 'Lifetime', 'Hour', 'Day', 'Week', 'Month' + attr_accessor :calculation_window + + # @return [String] Name of calculation window field. + attr_accessor :calculation_window_field_name + + # @return [KpiFunctions] The computation function for the KPI. Possible + # values include: 'Sum', 'Avg', 'Min', 'Max', 'Last', 'Count', 'None', + # 'CountDistinct' + attr_accessor :function + + # @return [String] The computation expression for the KPI. + attr_accessor :expression + + # @return [String] The unit of measurement for the KPI. + attr_accessor :unit + + # @return [String] The filter expression for the KPI. + attr_accessor :filter + + # @return [Array] the group by properties for the KPI. + attr_accessor :group_by + + # @return [Array] The KPI GroupByMetadata. + attr_accessor :group_by_metadata + + # @return [Array] The participant + # profiles. + attr_accessor :participant_profiles_metadata + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [KpiThresholds] The KPI thresholds. + attr_accessor :thres_holds + + # @return [Array] The aliases. + attr_accessor :aliases + + # @return [Array] The KPI extracts. + attr_accessor :extracts + + + # + # Mapper for KpiResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiResourceFormat', + type: { + name: 'Composite', + class_name: 'KpiResourceFormat', + 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' + } + }, + entity_type: { + required: true, + serialized_name: 'properties.entityType', + type: { + name: 'Enum', + module: 'EntityTypes' + } + }, + entity_type_name: { + required: true, + serialized_name: 'properties.entityTypeName', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + kpi_name: { + required: false, + read_only: true, + serialized_name: 'properties.kpiName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + calculation_window: { + required: true, + serialized_name: 'properties.calculationWindow', + type: { + name: 'Enum', + module: 'CalculationWindowTypes' + } + }, + calculation_window_field_name: { + required: false, + serialized_name: 'properties.calculationWindowFieldName', + type: { + name: 'String' + } + }, + function: { + required: true, + serialized_name: 'properties.function', + type: { + name: 'Enum', + module: 'KpiFunctions' + } + }, + expression: { + required: true, + serialized_name: 'properties.expression', + type: { + name: 'String' + } + }, + unit: { + required: false, + serialized_name: 'properties.unit', + type: { + name: 'String' + } + }, + filter: { + required: false, + serialized_name: 'properties.filter', + type: { + name: 'String' + } + }, + group_by: { + required: false, + serialized_name: 'properties.groupBy', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + group_by_metadata: { + required: false, + read_only: true, + serialized_name: 'properties.groupByMetadata', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiGroupByMetadataElementType', + type: { + name: 'Composite', + class_name: 'KpiGroupByMetadata' + } + } + } + }, + participant_profiles_metadata: { + required: false, + read_only: true, + serialized_name: 'properties.participantProfilesMetadata', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiParticipantProfilesMetadataElementType', + type: { + name: 'Composite', + class_name: 'KpiParticipantProfilesMetadata' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + thres_holds: { + required: false, + serialized_name: 'properties.thresHolds', + type: { + name: 'Composite', + class_name: 'KpiThresholds' + } + }, + aliases: { + required: false, + serialized_name: 'properties.aliases', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiAliasElementType', + type: { + name: 'Composite', + class_name: 'KpiAlias' + } + } + } + }, + extracts: { + required: false, + serialized_name: 'properties.extracts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiExtractElementType', + type: { + name: 'Composite', + class_name: 'KpiExtract' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_thresholds.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_thresholds.rb new file mode 100644 index 0000000000..fafb8de7b2 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/kpi_thresholds.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::ARM::CustomerInsights + module Models + # + # Defines the KPI Threshold limits. + # + class KpiThresholds + + include MsRestAzure + + # @return The lower threshold limit. + attr_accessor :lower_limit + + # @return The upper threshold limit. + attr_accessor :upper_limit + + # @return [Boolean] Whether or not the KPI is an increasing KPI. + attr_accessor :increasing_kpi + + + # + # Mapper for KpiThresholds class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'KpiThresholds', + type: { + name: 'Composite', + class_name: 'KpiThresholds', + model_properties: { + lower_limit: { + required: true, + serialized_name: 'lowerLimit', + type: { + name: 'Number' + } + }, + upper_limit: { + required: true, + serialized_name: 'upperLimit', + type: { + name: 'Number' + } + }, + increasing_kpi: { + required: true, + serialized_name: 'increasingKpi', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_list_result.rb new file mode 100644 index 0000000000..f71035156d --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list link operation. + # + class LinkListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LinkListResult] 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 LinkListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LinkListResult', + type: { + name: 'Composite', + class_name: 'LinkListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LinkResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'LinkResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_resource_format.rb new file mode 100644 index 0000000000..5b140f97f5 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_resource_format.rb @@ -0,0 +1,235 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The link resource format. + # + class LinkResourceFormat < ProxyResource + + include MsRestAzure + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The link name. + attr_accessor :link_name + + # @return [EntityType] Type of source entity. Possible values include: + # 'None', 'Profile', 'Interaction', 'Relationship' + attr_accessor :source_entity_type + + # @return [EntityType] Type of target entity. Possible values include: + # 'None', 'Profile', 'Interaction', 'Relationship' + attr_accessor :target_entity_type + + # @return [String] Name of the source Entity Type. + attr_accessor :source_entity_type_name + + # @return [String] Name of the target Entity Type. + attr_accessor :target_entity_type_name + + # @return [Hash{String => String}] Localized display name for the Link. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized descriptions for the Link. + attr_accessor :description + + # @return [Array] The set of properties mappings + # between the source and target Types. + attr_accessor :mappings + + # @return [Array] The properties that + # represent the participating profile. + attr_accessor :participant_property_references + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [Boolean] Indicating whether the link is reference only link. + # This flag is ingored if the Mappings are defined. If the mappings are + # not defined and it is set to true, links processing will not create or + # update profiles. + attr_accessor :reference_only + + # @return [InstanceOperationType] Determines whether this link is + # supposed to create or delete instances if Link is NOT Reference Only. + # Possible values include: 'Upsert', 'Delete' + attr_accessor :operation_type + + + # + # Mapper for LinkResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LinkResourceFormat', + type: { + name: 'Composite', + class_name: 'LinkResourceFormat', + 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' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + link_name: { + required: false, + read_only: true, + serialized_name: 'properties.linkName', + type: { + name: 'String' + } + }, + source_entity_type: { + required: true, + serialized_name: 'properties.sourceEntityType', + type: { + name: 'Enum', + module: 'EntityType' + } + }, + target_entity_type: { + required: true, + serialized_name: 'properties.targetEntityType', + type: { + name: 'Enum', + module: 'EntityType' + } + }, + source_entity_type_name: { + required: true, + serialized_name: 'properties.sourceEntityTypeName', + type: { + name: 'String' + } + }, + target_entity_type_name: { + required: true, + serialized_name: 'properties.targetEntityTypeName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + mappings: { + required: false, + serialized_name: 'properties.mappings', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TypePropertiesMappingElementType', + type: { + name: 'Composite', + class_name: 'TypePropertiesMapping' + } + } + } + }, + participant_property_references: { + required: true, + serialized_name: 'properties.participantPropertyReferences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParticipantPropertyReferenceElementType', + type: { + name: 'Composite', + class_name: 'ParticipantPropertyReference' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + reference_only: { + required: false, + serialized_name: 'properties.referenceOnly', + type: { + name: 'Boolean' + } + }, + operation_type: { + required: false, + serialized_name: 'properties.operationType', + type: { + name: 'Enum', + module: 'InstanceOperationType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_types.rb new file mode 100644 index 0000000000..53a3bd9cbf --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/link_types.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::ARM::CustomerInsights + module Models + # + # Defines values for LinkTypes + # + module LinkTypes + UpdateAlways = "UpdateAlways" + CopyIfNull = "CopyIfNull" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/metadata_definition_base.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/metadata_definition_base.rb new file mode 100644 index 0000000000..a5d473979e --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/metadata_definition_base.rb @@ -0,0 +1,152 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The Metadata definition base. + # + class MetadataDefinitionBase + + include MsRestAzure + + # @return [Hash{String => Array}] The attributes for the Type. + attr_accessor :attributes + + # @return [Hash{String => String}] Localized descriptions for the + # property. + attr_accessor :description + + # @return [Hash{String => String}] Localized display names for the + # property. + attr_accessor :display_name + + # @return [Hash{String => Hash{String => String}}] Any custom localized + # attributes for the Type. + attr_accessor :localized_attributes + + # @return [String] Small Image associated with the Property or + # EntityType. + attr_accessor :small_image + + # @return [String] Medium Image associated with the Property or + # EntityType. + attr_accessor :medium_image + + # @return [String] Large Image associated with the Property or + # EntityType. + attr_accessor :large_image + + + # + # Mapper for MetadataDefinitionBase class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetadataDefinitionBase', + type: { + name: 'Composite', + class_name: 'MetadataDefinitionBase', + model_properties: { + attributes: { + required: false, + serialized_name: 'attributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ArrayElementType', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + localized_attributes: { + required: false, + serialized_name: 'localizedAttributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'HashElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + small_image: { + required: false, + serialized_name: 'smallImage', + type: { + name: 'String' + } + }, + medium_image: { + required: false, + serialized_name: 'mediumImage', + type: { + name: 'String' + } + }, + large_image: { + required: false, + serialized_name: 'largeImage', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant.rb new file mode 100644 index 0000000000..c2f96168a3 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant.rb @@ -0,0 +1,117 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # Describes a profile type participating in an interaction. + # + class Participant + + include MsRestAzure + + # @return [String] Profile type name. + attr_accessor :profile_type_name + + # @return [Array] The property references. + attr_accessor :participant_property_references + + # @return [String] Participant name. + attr_accessor :participant_name + + # @return [Hash{String => String}] Localized display name. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized descriptions. + attr_accessor :description + + # @return [String] The role that the participant is playing in the + # interaction. + attr_accessor :role + + + # + # Mapper for Participant class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Participant', + type: { + name: 'Composite', + class_name: 'Participant', + model_properties: { + profile_type_name: { + required: true, + serialized_name: 'profileTypeName', + type: { + name: 'String' + } + }, + participant_property_references: { + required: true, + serialized_name: 'participantPropertyReferences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParticipantPropertyReferenceElementType', + type: { + name: 'Composite', + class_name: 'ParticipantPropertyReference' + } + } + } + }, + participant_name: { + required: true, + serialized_name: 'participantName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + role: { + required: false, + serialized_name: 'role', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant_profile_property_reference.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant_profile_property_reference.rb new file mode 100644 index 0000000000..be98c89e11 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant_profile_property_reference.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::ARM::CustomerInsights + module Models + # + # The participant profile property reference. + # + class ParticipantProfilePropertyReference + + include MsRestAzure + + # @return [String] The source interaction property that maps to the + # target profile property. + attr_accessor :interaction_property_name + + # @return [String] The target profile property that maps to the source + # interaction property. + attr_accessor :profile_property_name + + + # + # Mapper for ParticipantProfilePropertyReference class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ParticipantProfilePropertyReference', + type: { + name: 'Composite', + class_name: 'ParticipantProfilePropertyReference', + model_properties: { + interaction_property_name: { + required: true, + serialized_name: 'interactionPropertyName', + type: { + name: 'String' + } + }, + profile_property_name: { + required: true, + serialized_name: 'profilePropertyName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant_property_reference.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant_property_reference.rb new file mode 100644 index 0000000000..111de9279a --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/participant_property_reference.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::ARM::CustomerInsights + module Models + # + # The participant property reference. + # + class ParticipantPropertyReference + + include MsRestAzure + + # @return [String] The source property that maps to the target property. + attr_accessor :source_property_name + + # @return [String] The target property that maps to the source property. + attr_accessor :target_property_name + + + # + # Mapper for ParticipantPropertyReference class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ParticipantPropertyReference', + type: { + name: 'Composite', + class_name: 'ParticipantPropertyReference', + model_properties: { + source_property_name: { + required: true, + serialized_name: 'sourcePropertyName', + type: { + name: 'String' + } + }, + target_property_name: { + required: true, + serialized_name: 'targetPropertyName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/permission_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/permission_types.rb new file mode 100644 index 0000000000..c93038818e --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/permission_types.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::ARM::CustomerInsights + module Models + # + # Defines values for PermissionTypes + # + module PermissionTypes + Read = "Read" + Write = "Write" + Manage = "Manage" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_distribution_definition.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_distribution_definition.rb new file mode 100644 index 0000000000..de51f5554d --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_distribution_definition.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The definition of the prediction distribution. + # + class PredictionDistributionDefinition + + include MsRestAzure + + # @return [Integer] Total positive in the distribution. + attr_accessor :total_positives + + # @return [Integer] Total negatives in the distribution. + attr_accessor :total_negatives + + # @return [Array] + # Distributions of the prediction. + attr_accessor :distributions + + + # + # Mapper for PredictionDistributionDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PredictionDistributionDefinition', + type: { + name: 'Composite', + class_name: 'PredictionDistributionDefinition', + model_properties: { + total_positives: { + required: false, + serialized_name: 'totalPositives', + type: { + name: 'Number' + } + }, + total_negatives: { + required: false, + serialized_name: 'totalNegatives', + type: { + name: 'Number' + } + }, + distributions: { + required: false, + serialized_name: 'distributions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PredictionDistributionDefinitionDistributionsItemElementType', + type: { + name: 'Composite', + class_name: 'PredictionDistributionDefinitionDistributionsItem' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_distribution_definition_distributions_item.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_distribution_definition_distributions_item.rb new file mode 100644 index 0000000000..3166c60df0 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_distribution_definition_distributions_item.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::ARM::CustomerInsights + module Models + # + # The definition of a prediction distribution. + # + class PredictionDistributionDefinitionDistributionsItem + + include MsRestAzure + + # @return [Integer] Score threshold. + attr_accessor :score_threshold + + # @return [Integer] Number of positives. + attr_accessor :positives + + # @return [Integer] Number of negatives. + attr_accessor :negatives + + # @return [Integer] Number of positives above threshold. + attr_accessor :positives_above_threshold + + # @return [Integer] Number of negatives above threshold. + attr_accessor :negatives_above_threshold + + + # + # Mapper for PredictionDistributionDefinitionDistributionsItem class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PredictionDistributionDefinition_distributionsItem', + type: { + name: 'Composite', + class_name: 'PredictionDistributionDefinitionDistributionsItem', + model_properties: { + score_threshold: { + required: false, + serialized_name: 'scoreThreshold', + type: { + name: 'Number' + } + }, + positives: { + required: false, + serialized_name: 'positives', + type: { + name: 'Number' + } + }, + negatives: { + required: false, + serialized_name: 'negatives', + type: { + name: 'Number' + } + }, + positives_above_threshold: { + required: false, + serialized_name: 'positivesAboveThreshold', + type: { + name: 'Number' + } + }, + negatives_above_threshold: { + required: false, + serialized_name: 'negativesAboveThreshold', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_grades_item.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_grades_item.rb new file mode 100644 index 0000000000..1c767b25bd --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_grades_item.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::ARM::CustomerInsights + module Models + # + # The definition of a prediction grade. + # + class PredictionGradesItem + + include MsRestAzure + + # @return [String] Name of the grade. + attr_accessor :grade_name + + # @return [Integer] Minimum score threshold. + attr_accessor :min_score_threshold + + # @return [Integer] Maximum score threshold. + attr_accessor :max_score_threshold + + + # + # Mapper for PredictionGradesItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Prediction_gradesItem', + type: { + name: 'Composite', + class_name: 'PredictionGradesItem', + model_properties: { + grade_name: { + required: false, + serialized_name: 'gradeName', + type: { + name: 'String' + } + }, + min_score_threshold: { + required: false, + serialized_name: 'minScoreThreshold', + type: { + name: 'Number' + } + }, + max_score_threshold: { + required: false, + serialized_name: 'maxScoreThreshold', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_list_result.rb new file mode 100644 index 0000000000..559d4ca3c4 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list predictions operation. + # + class PredictionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [PredictionListResult] 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 PredictionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PredictionListResult', + type: { + name: 'Composite', + class_name: 'PredictionListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PredictionResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'PredictionResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_mappings.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_mappings.rb new file mode 100644 index 0000000000..c5f47df989 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_mappings.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::ARM::CustomerInsights + module Models + # + # Definition of the link mapping of prediction. + # + class PredictionMappings + + include MsRestAzure + + # @return [String] The score of the link mapping. + attr_accessor :score + + # @return [String] The grade of the link mapping. + attr_accessor :grade + + # @return [String] The reason of the link mapping. + attr_accessor :reason + + + # + # Mapper for PredictionMappings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Prediction_mappings', + type: { + name: 'Composite', + class_name: 'PredictionMappings', + model_properties: { + score: { + required: false, + serialized_name: 'score', + type: { + name: 'String' + } + }, + grade: { + required: false, + serialized_name: 'grade', + type: { + name: 'String' + } + }, + reason: { + required: false, + serialized_name: 'reason', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_model_life_cycle.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_model_life_cycle.rb new file mode 100644 index 0000000000..59d96698e1 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_model_life_cycle.rb @@ -0,0 +1,32 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # Defines values for PredictionModelLifeCycle + # + module PredictionModelLifeCycle + New = "New" + Provisioning = "Provisioning" + ProvisioningFailed = "ProvisioningFailed" + PendingDiscovering = "PendingDiscovering" + Discovering = "Discovering" + PendingFeaturing = "PendingFeaturing" + Featuring = "Featuring" + FeaturingFailed = "FeaturingFailed" + PendingTraining = "PendingTraining" + Training = "Training" + TrainingFailed = "TrainingFailed" + Evaluating = "Evaluating" + EvaluatingFailed = "EvaluatingFailed" + PendingModelConfirmation = "PendingModelConfirmation" + Active = "Active" + Deleted = "Deleted" + HumanIntervention = "HumanIntervention" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_model_status.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_model_status.rb new file mode 100644 index 0000000000..035b268c64 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_model_status.rb @@ -0,0 +1,161 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The prediction model status. + # + class PredictionModelStatus + + include MsRestAzure + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The prediction name. + attr_accessor :prediction_name + + # @return [String] The prediction GUID ID. + attr_accessor :prediction_guid_id + + # @return [PredictionModelLifeCycle] Prediction model life cycle. When + # prediction is in PendingModelConfirmation status, it is allowed to + # update the status to PendingFeaturing or Active through API. Possible + # values include: 'New', 'Provisioning', 'ProvisioningFailed', + # 'PendingDiscovering', 'Discovering', 'PendingFeaturing', 'Featuring', + # 'FeaturingFailed', 'PendingTraining', 'Training', 'TrainingFailed', + # 'Evaluating', 'EvaluatingFailed', 'PendingModelConfirmation', 'Active', + # 'Deleted', 'HumanIntervention', 'Failed' + attr_accessor :status + + # @return [String] The model status message. + attr_accessor :message + + # @return [Integer] Count of the training set. + attr_accessor :training_set_count + + # @return [Integer] Count of the test set. + attr_accessor :test_set_count + + # @return [Integer] Count of the validation set. + attr_accessor :validation_set_count + + # @return [Integer] The training accuracy. + attr_accessor :training_accuracy + + # @return [Integer] The singnas used. + attr_accessor :signals_used + + # @return [String] Version of the model. + attr_accessor :model_version + + + # + # Mapper for PredictionModelStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PredictionModelStatus', + type: { + name: 'Composite', + class_name: 'PredictionModelStatus', + model_properties: { + tenant_id: { + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + prediction_name: { + required: false, + read_only: true, + serialized_name: 'predictionName', + type: { + name: 'String' + } + }, + prediction_guid_id: { + required: false, + read_only: true, + serialized_name: 'predictionGuidId', + type: { + name: 'String' + } + }, + status: { + required: true, + serialized_name: 'status', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + }, + training_set_count: { + required: false, + read_only: true, + serialized_name: 'trainingSetCount', + type: { + name: 'Number' + } + }, + test_set_count: { + required: false, + read_only: true, + serialized_name: 'testSetCount', + type: { + name: 'Number' + } + }, + validation_set_count: { + required: false, + read_only: true, + serialized_name: 'validationSetCount', + type: { + name: 'Number' + } + }, + training_accuracy: { + required: false, + read_only: true, + serialized_name: 'trainingAccuracy', + type: { + name: 'Number' + } + }, + signals_used: { + required: false, + read_only: true, + serialized_name: 'signalsUsed', + type: { + name: 'Number' + } + }, + model_version: { + required: false, + read_only: true, + serialized_name: 'modelVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_resource_format.rb new file mode 100644 index 0000000000..5309981afb --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_resource_format.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::ARM::CustomerInsights + module Models + # + # The prediction resource format. + # + class PredictionResourceFormat < ProxyResource + + include MsRestAzure + + # @return [Hash{String => String}] Description of the prediction. + attr_accessor :description + + # @return [Hash{String => String}] Display name of the prediction. + attr_accessor :display_name + + # @return [Array] Interaction types involved in the prediction. + attr_accessor :involved_interaction_types + + # @return [Array] KPI types involved in the prediction. + attr_accessor :involved_kpi_types + + # @return [Array] Relationships involved in the prediction. + attr_accessor :involved_relationships + + # @return [String] Negative outcome expression. + attr_accessor :negative_outcome_expression + + # @return [String] Positive outcome expression. + attr_accessor :positive_outcome_expression + + # @return [String] Primary profile type. + attr_accessor :primary_profile_type + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [String] Name of the prediction. + attr_accessor :prediction_name + + # @return [String] Scope expression. + attr_accessor :scope_expression + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [Boolean] Whether do auto analyze. + attr_accessor :auto_analyze + + # @return [PredictionMappings] Definition of the link mapping of + # prediction. + attr_accessor :mappings + + # @return [String] Score label. + attr_accessor :score_label + + # @return [Array] The prediction grades. + attr_accessor :grades + + # @return [PredictionSystemGeneratedEntities] System generated entities. + attr_accessor :system_generated_entities + + + # + # Mapper for PredictionResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PredictionResourceFormat', + type: { + name: 'Composite', + class_name: 'PredictionResourceFormat', + 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: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + involved_interaction_types: { + required: false, + serialized_name: 'properties.involvedInteractionTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + involved_kpi_types: { + required: false, + serialized_name: 'properties.involvedKpiTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + involved_relationships: { + required: false, + serialized_name: 'properties.involvedRelationships', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + negative_outcome_expression: { + required: true, + serialized_name: 'properties.negativeOutcomeExpression', + type: { + name: 'String' + } + }, + positive_outcome_expression: { + required: true, + serialized_name: 'properties.positiveOutcomeExpression', + type: { + name: 'String' + } + }, + primary_profile_type: { + required: true, + serialized_name: 'properties.primaryProfileType', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + prediction_name: { + required: false, + serialized_name: 'properties.predictionName', + type: { + name: 'String' + } + }, + scope_expression: { + required: true, + serialized_name: 'properties.scopeExpression', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + auto_analyze: { + required: true, + serialized_name: 'properties.autoAnalyze', + type: { + name: 'Boolean' + } + }, + mappings: { + required: true, + serialized_name: 'properties.mappings', + type: { + name: 'Composite', + class_name: 'PredictionMappings' + } + }, + score_label: { + required: true, + serialized_name: 'properties.scoreLabel', + type: { + name: 'String' + } + }, + grades: { + required: false, + serialized_name: 'properties.grades', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PredictionGradesItemElementType', + type: { + name: 'Composite', + class_name: 'PredictionGradesItem' + } + } + } + }, + system_generated_entities: { + required: false, + read_only: true, + serialized_name: 'properties.systemGeneratedEntities', + type: { + name: 'Composite', + class_name: 'PredictionSystemGeneratedEntities' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_system_generated_entities.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_system_generated_entities.rb new file mode 100644 index 0000000000..d08cdbdc7f --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_system_generated_entities.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::ARM::CustomerInsights + module Models + # + # System generated entities. + # + class PredictionSystemGeneratedEntities + + include MsRestAzure + + # @return [Array] Generated interaction types. + attr_accessor :generated_interaction_types + + # @return [Array] Generated links. + attr_accessor :generated_links + + # @return [Hash{String => String}] Generated KPIs. + attr_accessor :generated_kpis + + + # + # Mapper for PredictionSystemGeneratedEntities class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Prediction_systemGeneratedEntities', + type: { + name: 'Composite', + class_name: 'PredictionSystemGeneratedEntities', + model_properties: { + generated_interaction_types: { + required: false, + serialized_name: 'generatedInteractionTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + generated_links: { + required: false, + serialized_name: 'generatedLinks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + generated_kpis: { + required: false, + serialized_name: 'generatedKpis', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_training_results.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_training_results.rb new file mode 100644 index 0000000000..9ad33e1580 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/prediction_training_results.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::ARM::CustomerInsights + module Models + # + # The training results of the prediction. + # + class PredictionTrainingResults + + include MsRestAzure + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] Score name. + attr_accessor :score_name + + # @return [PredictionDistributionDefinition] Prediction distribution. + attr_accessor :prediction_distribution + + # @return [Array] Canonical profiles. + attr_accessor :canonical_profiles + + # @return [Integer] Instance count of the primary profile. + attr_accessor :primary_profile_instance_count + + + # + # Mapper for PredictionTrainingResults class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PredictionTrainingResults', + type: { + name: 'Composite', + class_name: 'PredictionTrainingResults', + model_properties: { + tenant_id: { + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + score_name: { + required: false, + read_only: true, + serialized_name: 'scoreName', + type: { + name: 'String' + } + }, + prediction_distribution: { + required: false, + read_only: true, + serialized_name: 'predictionDistribution', + type: { + name: 'Composite', + class_name: 'PredictionDistributionDefinition' + } + }, + canonical_profiles: { + required: false, + read_only: true, + serialized_name: 'canonicalProfiles', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CanonicalProfileDefinitionElementType', + type: { + name: 'Composite', + class_name: 'CanonicalProfileDefinition' + } + } + } + }, + primary_profile_instance_count: { + required: false, + read_only: true, + serialized_name: 'primaryProfileInstanceCount', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_enum_valid_values_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_enum_valid_values_format.rb new file mode 100644 index 0000000000..f7658b8fac --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_enum_valid_values_format.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::ARM::CustomerInsights + module Models + # + # Valid enum values in case of an enum property. + # + class ProfileEnumValidValuesFormat + + include MsRestAzure + + # @return [Integer] The integer value of the enum member. + attr_accessor :value + + # @return [Hash{String => String}] Localized names of the enum member. + attr_accessor :localized_value_names + + + # + # Mapper for ProfileEnumValidValuesFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProfileEnumValidValuesFormat', + type: { + name: 'Composite', + class_name: 'ProfileEnumValidValuesFormat', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Number' + } + }, + localized_value_names: { + required: false, + serialized_name: 'localizedValueNames', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_list_result.rb new file mode 100644 index 0000000000..56c2340bb2 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list profile operation. + # + class ProfileListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ProfileListResult] 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 ProfileListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProfileListResult', + type: { + name: 'Composite', + class_name: 'ProfileListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProfileResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'ProfileResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_resource_format.rb new file mode 100644 index 0000000000..1d22c8c0d9 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/profile_resource_format.rb @@ -0,0 +1,312 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The profile resource format. + # + class ProfileResourceFormat < ProxyResource + + include MsRestAzure + + # @return [Hash{String => Array}] The attributes for the Type. + attr_accessor :attributes + + # @return [Hash{String => String}] Localized descriptions for the + # property. + attr_accessor :description + + # @return [Hash{String => String}] Localized display names for the + # property. + attr_accessor :display_name + + # @return [Hash{String => Hash{String => String}}] Any custom localized + # attributes for the Type. + attr_accessor :localized_attributes + + # @return [String] Small Image associated with the Property or + # EntityType. + attr_accessor :small_image + + # @return [String] Medium Image associated with the Property or + # EntityType. + attr_accessor :medium_image + + # @return [String] Large Image associated with the Property or + # EntityType. + attr_accessor :large_image + + # @return [String] The api entity set name. This becomes the odata entity + # set name for the entity Type being refered in this object. + attr_accessor :api_entity_set_name + + # @return [EntityTypes] Type of entity. Possible values include: 'None', + # 'Profile', 'Interaction', 'Relationship' + attr_accessor :entity_type + + # @return [Array] The properties of the Profile. + attr_accessor :fields + + # @return [Integer] The instance count. + attr_accessor :instances_count + + # @return [DateTime] The last changed time for the type definition. + attr_accessor :last_changed_utc + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [String] The schema org link. This helps ACI identify and + # suggest semantic models. + attr_accessor :schema_item_type_link + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The timestamp property name. Represents the time when + # the interaction or profile update happened. + attr_accessor :timestamp_field_name + + # @return [String] The name of the entity. + attr_accessor :type_name + + # @return [Array] The strong IDs. + attr_accessor :strong_ids + + + # + # Mapper for ProfileResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProfileResourceFormat', + type: { + name: 'Composite', + class_name: 'ProfileResourceFormat', + 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' + } + }, + attributes: { + required: false, + serialized_name: 'properties.attributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ArrayElementType', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + localized_attributes: { + required: false, + serialized_name: 'properties.localizedAttributes', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'HashElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + }, + small_image: { + required: false, + serialized_name: 'properties.smallImage', + type: { + name: 'String' + } + }, + medium_image: { + required: false, + serialized_name: 'properties.mediumImage', + type: { + name: 'String' + } + }, + large_image: { + required: false, + serialized_name: 'properties.largeImage', + type: { + name: 'String' + } + }, + api_entity_set_name: { + required: false, + serialized_name: 'properties.apiEntitySetName', + type: { + name: 'String' + } + }, + entity_type: { + required: false, + serialized_name: 'properties.entityType', + type: { + name: 'Enum', + module: 'EntityTypes' + } + }, + fields: { + required: false, + serialized_name: 'properties.fields', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PropertyDefinitionElementType', + type: { + name: 'Composite', + class_name: 'PropertyDefinition' + } + } + } + }, + instances_count: { + required: false, + serialized_name: 'properties.instancesCount', + type: { + name: 'Number' + } + }, + last_changed_utc: { + required: false, + read_only: true, + serialized_name: 'properties.lastChangedUtc', + type: { + name: 'DateTime' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + schema_item_type_link: { + required: false, + serialized_name: 'properties.schemaItemTypeLink', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + timestamp_field_name: { + required: false, + serialized_name: 'properties.timestampFieldName', + type: { + name: 'String' + } + }, + type_name: { + required: false, + serialized_name: 'properties.typeName', + type: { + name: 'String' + } + }, + strong_ids: { + required: false, + serialized_name: 'properties.strongIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StrongIdElementType', + type: { + name: 'Composite', + class_name: 'StrongId' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/property_definition.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/property_definition.rb new file mode 100644 index 0000000000..2fac6c10d2 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/property_definition.rb @@ -0,0 +1,218 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # Property definition. + # + class PropertyDefinition + + include MsRestAzure + + # @return [String] Array value separator for properties with isArray set. + attr_accessor :array_value_separator + + # @return [Array] Describes valid values + # for an enum property. + attr_accessor :enum_valid_values + + # @return [String] Name of the property. + attr_accessor :field_name + + # @return [String] Type of the property. + attr_accessor :field_type + + # @return [Boolean] Indicates if the property is actually an array of the + # fieldType above on the data api. + attr_accessor :is_array + + # @return [Boolean] Indicates if the property is an enum. + attr_accessor :is_enum + + # @return [Boolean] Indicates if the property is an flag enum. + attr_accessor :is_flag_enum + + # @return [Boolean] Whether the property is an Image. + attr_accessor :is_image + + # @return [Boolean] Whether the property is a localized string. + attr_accessor :is_localized_string + + # @return [Boolean] Whether the property is a name or a part of name. + attr_accessor :is_name + + # @return [Boolean] Whether property value is required on instances, + # IsRequired field only for Intercation. Profile Instance will not check + # for required field. + attr_accessor :is_required + + # @return [String] The ID associated with the property. + attr_accessor :property_id + + # @return [String] URL encoded schema.org item prop link for the + # property. + attr_accessor :schema_item_prop_link + + # @return [Integer] Max length of string. Used only if type is string. + attr_accessor :max_length + + # @return [Boolean] Whether property is available in graph or not. + attr_accessor :is_available_in_graph + + # @return [Array] This is specific to interactions + # modeled as activities. Data sources are used to determine where data is + # stored and also in precedence rules. + attr_accessor :data_source_precedence_rules + + + # + # Mapper for PropertyDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PropertyDefinition', + type: { + name: 'Composite', + class_name: 'PropertyDefinition', + model_properties: { + array_value_separator: { + required: false, + serialized_name: 'arrayValueSeparator', + type: { + name: 'String' + } + }, + enum_valid_values: { + required: false, + serialized_name: 'enumValidValues', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProfileEnumValidValuesFormatElementType', + type: { + name: 'Composite', + class_name: 'ProfileEnumValidValuesFormat' + } + } + } + }, + field_name: { + required: true, + serialized_name: 'fieldName', + type: { + name: 'String' + } + }, + field_type: { + required: true, + serialized_name: 'fieldType', + type: { + name: 'String' + } + }, + is_array: { + required: false, + serialized_name: 'isArray', + type: { + name: 'Boolean' + } + }, + is_enum: { + required: false, + serialized_name: 'isEnum', + type: { + name: 'Boolean' + } + }, + is_flag_enum: { + required: false, + serialized_name: 'isFlagEnum', + type: { + name: 'Boolean' + } + }, + is_image: { + required: false, + serialized_name: 'isImage', + type: { + name: 'Boolean' + } + }, + is_localized_string: { + required: false, + serialized_name: 'isLocalizedString', + type: { + name: 'Boolean' + } + }, + is_name: { + required: false, + serialized_name: 'isName', + type: { + name: 'Boolean' + } + }, + is_required: { + required: false, + serialized_name: 'isRequired', + type: { + name: 'Boolean' + } + }, + property_id: { + required: false, + serialized_name: 'propertyId', + type: { + name: 'String' + } + }, + schema_item_prop_link: { + required: false, + serialized_name: 'schemaItemPropLink', + type: { + name: 'String' + } + }, + max_length: { + required: false, + serialized_name: 'maxLength', + type: { + name: 'Number' + } + }, + is_available_in_graph: { + required: false, + serialized_name: 'isAvailableInGraph', + type: { + name: 'Boolean' + } + }, + data_source_precedence_rules: { + required: false, + read_only: true, + serialized_name: 'dataSourcePrecedenceRules', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DataSourcePrecedenceElementType', + type: { + name: 'Composite', + class_name: 'DataSourcePrecedence' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/provisioning_states.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/provisioning_states.rb new file mode 100644 index 0000000000..e74c5bde2f --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/provisioning_states.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::ARM::CustomerInsights + module Models + # + # Defines values for ProvisioningStates + # + module ProvisioningStates + Provisioning = "Provisioning" + Succeeded = "Succeeded" + Expiring = "Expiring" + Deleting = "Deleting" + HumanIntervention = "HumanIntervention" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/proxy_resource.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/proxy_resource.rb new file mode 100644 index 0000000000..9ca9c83737 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/proxy_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::ARM::CustomerInsights + module Models + # + # Common properties of proxy resource. + # + class ProxyResource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + + # + # Mapper for ProxyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProxyResource', + type: { + name: 'Composite', + class_name: 'ProxyResource', + 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_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_field_mapping.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_field_mapping.rb new file mode 100644 index 0000000000..d0b92643f5 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_field_mapping.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::ARM::CustomerInsights + module Models + # + # The fields mapping for Relationships. + # + class RelationshipLinkFieldMapping + + include MsRestAzure + + # @return [String] The field name on the Interaction Type. + attr_accessor :interaction_field_name + + # @return [LinkTypes] Link type. Possible values include: 'UpdateAlways', + # 'CopyIfNull' + attr_accessor :link_type + + # @return [String] The field name on the Relationship metadata. + attr_accessor :relationship_field_name + + + # + # Mapper for RelationshipLinkFieldMapping class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipLinkFieldMapping', + type: { + name: 'Composite', + class_name: 'RelationshipLinkFieldMapping', + model_properties: { + interaction_field_name: { + required: true, + serialized_name: 'interactionFieldName', + type: { + name: 'String' + } + }, + link_type: { + required: false, + serialized_name: 'linkType', + type: { + name: 'Enum', + module: 'LinkTypes' + } + }, + relationship_field_name: { + required: true, + serialized_name: 'relationshipFieldName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_list_result.rb new file mode 100644 index 0000000000..5d639f914a --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list relationship link operation. + # + class RelationshipLinkListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [RelationshipLinkListResult] 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 RelationshipLinkListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipLinkListResult', + type: { + name: 'Composite', + class_name: 'RelationshipLinkListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RelationshipLinkResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'RelationshipLinkResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_resource_format.rb new file mode 100644 index 0000000000..ceffa48868 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_link_resource_format.rb @@ -0,0 +1,218 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The relationship link resource format. + # + class RelationshipLinkResourceFormat < ProxyResource + + include MsRestAzure + + # @return [Hash{String => String}] Localized display name for the + # Relationship Link. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized descriptions for the + # Relationship Link. + attr_accessor :description + + # @return [String] The InteractionType associated with the Relationship + # Link. + attr_accessor :interaction_type + + # @return [String] The name of the Relationship Link. + attr_accessor :link_name + + # @return [Array] The mappings between + # Interaction and Relationship fields. + attr_accessor :mappings + + # @return [Array] The property + # references for the Profile of the Relationship. + attr_accessor :profile_property_references + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [Array] The property + # references for the Related Profile of the Relationship. + attr_accessor :related_profile_property_references + + # @return [String] The Relationship associated with the Link. + attr_accessor :relationship_name + + # @return [String] The relationship guid id. + attr_accessor :relationship_guid_id + + # @return [String] The hub name. + attr_accessor :tenant_id + + + # + # Mapper for RelationshipLinkResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipLinkResourceFormat', + type: { + name: 'Composite', + class_name: 'RelationshipLinkResourceFormat', + 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: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + interaction_type: { + required: true, + serialized_name: 'properties.interactionType', + type: { + name: 'String' + } + }, + link_name: { + required: false, + read_only: true, + serialized_name: 'properties.linkName', + type: { + name: 'String' + } + }, + mappings: { + required: false, + serialized_name: 'properties.mappings', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RelationshipLinkFieldMappingElementType', + type: { + name: 'Composite', + class_name: 'RelationshipLinkFieldMapping' + } + } + } + }, + profile_property_references: { + required: true, + serialized_name: 'properties.profilePropertyReferences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParticipantProfilePropertyReferenceElementType', + type: { + name: 'Composite', + class_name: 'ParticipantProfilePropertyReference' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + related_profile_property_references: { + required: true, + serialized_name: 'properties.relatedProfilePropertyReferences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParticipantProfilePropertyReferenceElementType', + type: { + name: 'Composite', + class_name: 'ParticipantProfilePropertyReference' + } + } + } + }, + relationship_name: { + required: true, + serialized_name: 'properties.relationshipName', + type: { + name: 'String' + } + }, + relationship_guid_id: { + required: false, + read_only: true, + serialized_name: 'properties.relationshipGuidId', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_list_result.rb new file mode 100644 index 0000000000..7b45ba4771 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list relationship operation. + # + class RelationshipListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [RelationshipListResult] 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 RelationshipListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipListResult', + type: { + name: 'Composite', + class_name: 'RelationshipListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RelationshipResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'RelationshipResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_resource_format.rb new file mode 100644 index 0000000000..28b01c25d5 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_resource_format.rb @@ -0,0 +1,219 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The relationship resource format. + # + class RelationshipResourceFormat < ProxyResource + + include MsRestAzure + + # @return [CardinalityTypes] The Relationship Cardinality. Possible + # values include: 'OneToOne', 'OneToMany', 'ManyToMany' + attr_accessor :cardinality + + # @return [Hash{String => String}] Localized display name for the + # Relationship. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized descriptions for the + # Relationship. + attr_accessor :description + + # @return [DateTime] The expiry date time in UTC. + attr_accessor :expiry_date_time_utc + + # @return [Array] The properties of the Relationship. + attr_accessor :fields + + # @return [Array] Optional property to be used + # to map fields in profile to their strong ids in related profile. + attr_accessor :lookup_mappings + + # @return [String] Profile type. + attr_accessor :profile_type + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [String] The Relationship name. + attr_accessor :relationship_name + + # @return [String] Related profile being referenced. + attr_accessor :related_profile_type + + # @return [String] The relationship guid id. + attr_accessor :relationship_guid_id + + # @return [String] The hub name. + attr_accessor :tenant_id + + + # + # Mapper for RelationshipResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipResourceFormat', + type: { + name: 'Composite', + class_name: 'RelationshipResourceFormat', + 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' + } + }, + cardinality: { + required: false, + serialized_name: 'properties.cardinality', + type: { + name: 'Enum', + module: 'CardinalityTypes' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + expiry_date_time_utc: { + required: false, + serialized_name: 'properties.expiryDateTimeUtc', + type: { + name: 'DateTime' + } + }, + fields: { + required: false, + serialized_name: 'properties.fields', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PropertyDefinitionElementType', + type: { + name: 'Composite', + class_name: 'PropertyDefinition' + } + } + } + }, + lookup_mappings: { + required: false, + serialized_name: 'properties.lookupMappings', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RelationshipTypeMappingElementType', + type: { + name: 'Composite', + class_name: 'RelationshipTypeMapping' + } + } + } + }, + profile_type: { + required: true, + serialized_name: 'properties.profileType', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + relationship_name: { + required: false, + read_only: true, + serialized_name: 'properties.relationshipName', + type: { + name: 'String' + } + }, + related_profile_type: { + required: true, + serialized_name: 'properties.relatedProfileType', + type: { + name: 'String' + } + }, + relationship_guid_id: { + required: false, + read_only: true, + serialized_name: 'properties.relationshipGuidId', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_type_field_mapping.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_type_field_mapping.rb new file mode 100644 index 0000000000..8aaedb5430 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_type_field_mapping.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::ARM::CustomerInsights + module Models + # + # Map a field of profile to its corresponding StrongId in Related Profile. + # + class RelationshipTypeFieldMapping + + include MsRestAzure + + # @return [String] Specifies the fieldName in profile. + attr_accessor :profile_field_name + + # @return [String] Specifies the KeyProperty (from StrongId) of the + # related profile. + attr_accessor :related_profile_key_property + + + # + # Mapper for RelationshipTypeFieldMapping class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipTypeFieldMapping', + type: { + name: 'Composite', + class_name: 'RelationshipTypeFieldMapping', + model_properties: { + profile_field_name: { + required: true, + serialized_name: 'profileFieldName', + type: { + name: 'String' + } + }, + related_profile_key_property: { + required: true, + serialized_name: 'relatedProfileKeyProperty', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_type_mapping.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_type_mapping.rb new file mode 100644 index 0000000000..b1400771ed --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationship_type_mapping.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::ARM::CustomerInsights + module Models + # + # Maps fields in Profile to their corresponding StrongIds in Related + # Profile. + # + class RelationshipTypeMapping + + include MsRestAzure + + # @return [Array] Maps a profile property + # with the StrongId of related profile. This is an array to support + # StrongIds that are composite key as well. + attr_accessor :field_mappings + + + # + # Mapper for RelationshipTypeMapping class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipTypeMapping', + type: { + name: 'Composite', + class_name: 'RelationshipTypeMapping', + model_properties: { + field_mappings: { + required: true, + serialized_name: 'fieldMappings', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RelationshipTypeFieldMappingElementType', + type: { + name: 'Composite', + class_name: 'RelationshipTypeFieldMapping' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationships_lookup.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationships_lookup.rb new file mode 100644 index 0000000000..ac6b3c8fc1 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/relationships_lookup.rb @@ -0,0 +1,107 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The definition of suggested relationship for the type. + # + class RelationshipsLookup + + include MsRestAzure + + # @return [String] The relationship profile. + attr_accessor :profile_name + + # @return [Array] The property + # references for the profile type. + attr_accessor :profile_property_references + + # @return [String] The related profile. + attr_accessor :related_profile_name + + # @return [Array] The property + # references for the related profile type. + attr_accessor :related_profile_property_references + + # @return [String] The name of existing Relationship. + attr_accessor :existing_relationship_name + + + # + # Mapper for RelationshipsLookup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelationshipsLookup', + type: { + name: 'Composite', + class_name: 'RelationshipsLookup', + model_properties: { + profile_name: { + required: false, + read_only: true, + serialized_name: 'profileName', + type: { + name: 'String' + } + }, + profile_property_references: { + required: false, + read_only: true, + serialized_name: 'profilePropertyReferences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParticipantProfilePropertyReferenceElementType', + type: { + name: 'Composite', + class_name: 'ParticipantProfilePropertyReference' + } + } + } + }, + related_profile_name: { + required: false, + read_only: true, + serialized_name: 'relatedProfileName', + type: { + name: 'String' + } + }, + related_profile_property_references: { + required: false, + read_only: true, + serialized_name: 'relatedProfilePropertyReferences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ParticipantProfilePropertyReferenceElementType', + type: { + name: 'Composite', + class_name: 'ParticipantProfilePropertyReference' + } + } + } + }, + existing_relationship_name: { + required: false, + read_only: true, + serialized_name: 'existingRelationshipName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/resource.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/resource.rb new file mode 100644 index 0000000000..1f8cd0cca1 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/resource.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::ARM::CustomerInsights + module Models + # + # Common properties of Azure resource. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + # @return [String] Resource location. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/resource_set_description.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/resource_set_description.rb new file mode 100644 index 0000000000..c1f0938638 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/resource_set_description.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::ARM::CustomerInsights + module Models + # + # The resource set description. + # + class ResourceSetDescription + + include MsRestAzure + + # @return [Array] The elements included in the set. + attr_accessor :elements + + # @return [Array] The elements that are not included in the set, + # in case elements contains '*' indicating 'all'. + attr_accessor :exceptions + + + # + # Mapper for ResourceSetDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceSetDescription', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription', + model_properties: { + elements: { + required: false, + serialized_name: 'elements', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + exceptions: { + required: false, + serialized_name: 'exceptions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_assignment_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_assignment_list_result.rb new file mode 100644 index 0000000000..a7f97866aa --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_assignment_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list role assignment operation. + # + class RoleAssignmentListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [RoleAssignmentListResult] 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 RoleAssignmentListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RoleAssignmentListResult', + type: { + name: 'Composite', + class_name: 'RoleAssignmentListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RoleAssignmentResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'RoleAssignmentResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_assignment_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_assignment_resource_format.rb new file mode 100644 index 0000000000..1d9368540b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_assignment_resource_format.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::ARM::CustomerInsights + module Models + # + # The Role Assignment resource format. + # + class RoleAssignmentResourceFormat < ProxyResource + + include MsRestAzure + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The name of the metadata object. + attr_accessor :assignment_name + + # @return [Hash{String => String}] Localized display names for the + # metadata. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized description for the + # metadata. + attr_accessor :description + + # @return [ProvisioningStates] Provisioning state. Possible values + # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting', + # 'HumanIntervention', 'Failed' + attr_accessor :provisioning_state + + # @return [RoleTypes] Type of roles. Possible values include: 'Admin', + # 'Reader', 'ManageAdmin', 'ManageReader', 'DataAdmin', 'DataReader' + attr_accessor :role + + # @return [Array] The principals being assigned to. + attr_accessor :principals + + # @return [ResourceSetDescription] Profiles set for the assignment. + attr_accessor :profiles + + # @return [ResourceSetDescription] Interactions set for the assignment. + attr_accessor :interactions + + # @return [ResourceSetDescription] Links set for the assignment. + attr_accessor :links + + # @return [ResourceSetDescription] Kpis set for the assignment. + attr_accessor :kpis + + # @return [ResourceSetDescription] Sas Policies set for the assignment. + attr_accessor :sas_policies + + # @return [ResourceSetDescription] Connectors set for the assignment. + attr_accessor :connectors + + # @return [ResourceSetDescription] Views set for the assignment. + attr_accessor :views + + # @return [ResourceSetDescription] The Role assignments set for the + # relationship links. + attr_accessor :relationship_links + + # @return [ResourceSetDescription] The Role assignments set for the + # relationships. + attr_accessor :relationships + + # @return [ResourceSetDescription] Widget types set for the assignment. + attr_accessor :widget_types + + # @return [ResourceSetDescription] The Role assignments set for the + # assignment. + attr_accessor :role_assignments + + # @return [ResourceSetDescription] Widget types set for the assignment. + attr_accessor :conflation_policies + + # @return [ResourceSetDescription] The Role assignments set for the + # assignment. + attr_accessor :segments + + + # + # Mapper for RoleAssignmentResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RoleAssignmentResourceFormat', + type: { + name: 'Composite', + class_name: 'RoleAssignmentResourceFormat', + 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' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + assignment_name: { + required: false, + read_only: true, + serialized_name: 'properties.assignmentName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + role: { + required: true, + serialized_name: 'properties.role', + type: { + name: 'Enum', + module: 'RoleTypes' + } + }, + principals: { + required: true, + serialized_name: 'properties.principals', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AssignmentPrincipalElementType', + type: { + name: 'Composite', + class_name: 'AssignmentPrincipal' + } + } + } + }, + profiles: { + required: false, + serialized_name: 'properties.profiles', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + interactions: { + required: false, + serialized_name: 'properties.interactions', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + links: { + required: false, + serialized_name: 'properties.links', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + kpis: { + required: false, + serialized_name: 'properties.kpis', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + sas_policies: { + required: false, + serialized_name: 'properties.sasPolicies', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + connectors: { + required: false, + serialized_name: 'properties.connectors', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + views: { + required: false, + serialized_name: 'properties.views', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + relationship_links: { + required: false, + serialized_name: 'properties.relationshipLinks', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + relationships: { + required: false, + serialized_name: 'properties.relationships', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + widget_types: { + required: false, + serialized_name: 'properties.widgetTypes', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + role_assignments: { + required: false, + serialized_name: 'properties.roleAssignments', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + conflation_policies: { + required: false, + serialized_name: 'properties.conflationPolicies', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + }, + segments: { + required: false, + serialized_name: 'properties.segments', + type: { + name: 'Composite', + class_name: 'ResourceSetDescription' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_list_result.rb new file mode 100644 index 0000000000..93df203652 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list role assignment operation. + # + class RoleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [RoleListResult] 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 RoleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RoleListResult', + type: { + name: 'Composite', + class_name: 'RoleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RoleResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'RoleResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_resource_format.rb new file mode 100644 index 0000000000..35a1a4e7b7 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_resource_format.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::ARM::CustomerInsights + module Models + # + # The role resource format. + # + class RoleResourceFormat < ProxyResource + + include MsRestAzure + + # @return [String] The role name. + attr_accessor :role_name + + # @return [String] The description of the role. + attr_accessor :description + + + # + # Mapper for RoleResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RoleResourceFormat', + type: { + name: 'Composite', + class_name: 'RoleResourceFormat', + 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' + } + }, + role_name: { + required: false, + serialized_name: 'properties.roleName', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_types.rb new file mode 100644 index 0000000000..d3bc941c26 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/role_types.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::ARM::CustomerInsights + module Models + # + # Defines values for RoleTypes + # + module RoleTypes + Admin = "Admin" + Reader = "Reader" + ManageAdmin = "ManageAdmin" + ManageReader = "ManageReader" + DataAdmin = "DataAdmin" + DataReader = "DataReader" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_connector_properties.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_connector_properties.rb new file mode 100644 index 0000000000..07ac155140 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_connector_properties.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The Salesforce connector properties. + # + class SalesforceConnectorProperties + + include MsRestAzure + + # @return [SalesforceDiscoverSetting] The user settings. + attr_accessor :usersetting + + # @return [Array] The Salesforce tables. + attr_accessor :salesforcetables + + + # + # Mapper for SalesforceConnectorProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SalesforceConnectorProperties', + type: { + name: 'Composite', + class_name: 'SalesforceConnectorProperties', + model_properties: { + usersetting: { + required: true, + serialized_name: 'usersetting', + type: { + name: 'Composite', + class_name: 'SalesforceDiscoverSetting' + } + }, + salesforcetables: { + required: true, + serialized_name: 'salesforcetables', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SalesforceTableElementType', + type: { + name: 'Composite', + class_name: 'SalesforceTable' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_discover_setting.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_discover_setting.rb new file mode 100644 index 0000000000..c09bc7c3e3 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_discover_setting.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::ARM::CustomerInsights + module Models + # + # Salesforce discover setting. + # + class SalesforceDiscoverSetting + + include MsRestAzure + + # @return [String] The salesforce connection string secret URL. + attr_accessor :salesforce_connection_string_secret_url + + + # + # Mapper for SalesforceDiscoverSetting class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SalesforceDiscoverSetting', + type: { + name: 'Composite', + class_name: 'SalesforceDiscoverSetting', + model_properties: { + salesforce_connection_string_secret_url: { + required: true, + serialized_name: 'salesforceConnectionStringSecretUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_table.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_table.rb new file mode 100644 index 0000000000..b532d4cd1c --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/salesforce_table.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # Salesforce table. + # + class SalesforceTable + + include MsRestAzure + + # @return [String] Indicating whether this instance is profile. + attr_accessor :is_profile + + # @return [String] The table category. + attr_accessor :table_category + + # @return [String] The name of the table. + attr_accessor :table_name + + # @return [String] The table remarks. + attr_accessor :table_remarks + + # @return [String] The table schema. + attr_accessor :table_schema + + + # + # Mapper for SalesforceTable class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SalesforceTable', + type: { + name: 'Composite', + class_name: 'SalesforceTable', + model_properties: { + is_profile: { + required: false, + serialized_name: 'isProfile', + type: { + name: 'String' + } + }, + table_category: { + required: true, + serialized_name: 'tableCategory', + type: { + name: 'String' + } + }, + table_name: { + required: true, + serialized_name: 'tableName', + type: { + name: 'String' + } + }, + table_remarks: { + required: false, + serialized_name: 'tableRemarks', + type: { + name: 'String' + } + }, + table_schema: { + required: true, + serialized_name: 'tableSchema', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/status.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/status.rb new file mode 100644 index 0000000000..40d6daa09b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/status.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::ARM::CustomerInsights + module Models + # + # Defines values for Status + # + module Status + None = "None" + Active = "Active" + Deleted = "Deleted" + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/strong_id.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/strong_id.rb new file mode 100644 index 0000000000..6ad5f64c39 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/strong_id.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::ARM::CustomerInsights + module Models + # + # Property/Properties which represent a unique ID. + # + class StrongId + + include MsRestAzure + + # @return [Array] The properties which make up the unique ID. + attr_accessor :key_property_names + + # @return [String] The Name identifying the strong ID. + attr_accessor :strong_id_name + + # @return [Hash{String => String}] Localized display name. + attr_accessor :display_name + + # @return [Hash{String => String}] Localized descriptions. + attr_accessor :description + + + # + # Mapper for StrongId class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StrongId', + type: { + name: 'Composite', + class_name: 'StrongId', + model_properties: { + key_property_names: { + required: true, + serialized_name: 'keyPropertyNames', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + strong_id_name: { + required: true, + serialized_name: 'strongIdName', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/suggest_relationship_links_response.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/suggest_relationship_links_response.rb new file mode 100644 index 0000000000..b327a95351 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/suggest_relationship_links_response.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::ARM::CustomerInsights + module Models + # + # The response of suggest relationship links operation. + # + class SuggestRelationshipLinksResponse + + include MsRestAzure + + # @return [String] The interaction name. + attr_accessor :interaction_name + + # @return [Array] Suggested relationships for the + # type. + attr_accessor :suggested_relationships + + + # + # Mapper for SuggestRelationshipLinksResponse class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SuggestRelationshipLinksResponse', + type: { + name: 'Composite', + class_name: 'SuggestRelationshipLinksResponse', + model_properties: { + interaction_name: { + required: false, + read_only: true, + serialized_name: 'interactionName', + type: { + name: 'String' + } + }, + suggested_relationships: { + required: false, + read_only: true, + serialized_name: 'suggestedRelationships', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RelationshipsLookupElementType', + type: { + name: 'Composite', + class_name: 'RelationshipsLookup' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/type_properties_mapping.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/type_properties_mapping.rb new file mode 100644 index 0000000000..5b40b84009 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/type_properties_mapping.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::ARM::CustomerInsights + module Models + # + # Metadata for a Link's property mapping. + # + class TypePropertiesMapping + + include MsRestAzure + + # @return [String] Property name on the source Entity Type. + attr_accessor :source_property_name + + # @return [String] Property name on the target Entity Type. + attr_accessor :target_property_name + + # @return [LinkTypes] Link type. Possible values include: 'UpdateAlways', + # 'CopyIfNull' + attr_accessor :link_type + + + # + # Mapper for TypePropertiesMapping class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TypePropertiesMapping', + type: { + name: 'Composite', + class_name: 'TypePropertiesMapping', + model_properties: { + source_property_name: { + required: true, + serialized_name: 'sourcePropertyName', + type: { + name: 'String' + } + }, + target_property_name: { + required: true, + serialized_name: 'targetPropertyName', + type: { + name: 'String' + } + }, + link_type: { + required: false, + serialized_name: 'linkType', + type: { + name: 'Enum', + module: 'LinkTypes' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/view_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/view_list_result.rb new file mode 100644 index 0000000000..16f6784d49 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/view_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list view operation. + # + class ViewListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ViewListResult] 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 ViewListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ViewListResult', + type: { + name: 'Composite', + class_name: 'ViewListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ViewResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'ViewResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/view_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/view_resource_format.rb new file mode 100644 index 0000000000..6fe705193a --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/view_resource_format.rb @@ -0,0 +1,139 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The view resource format. + # + class ViewResourceFormat < ProxyResource + + include MsRestAzure + + # @return [String] Name of the view. + attr_accessor :view_name + + # @return [String] the user ID. + attr_accessor :user_id + + # @return [String] the hub name. + attr_accessor :tenant_id + + # @return [Hash{String => String}] Localized display name for the view. + attr_accessor :display_name + + # @return [String] View definition. + attr_accessor :definition + + # @return [DateTime] Date time when view was last modified. + attr_accessor :changed + + # @return [DateTime] Date time when view was created. + attr_accessor :created + + + # + # Mapper for ViewResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ViewResourceFormat', + type: { + name: 'Composite', + class_name: 'ViewResourceFormat', + 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' + } + }, + view_name: { + required: false, + read_only: true, + serialized_name: 'properties.viewName', + type: { + name: 'String' + } + }, + user_id: { + required: false, + serialized_name: 'properties.userId', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + definition: { + required: true, + serialized_name: 'properties.definition', + type: { + name: 'String' + } + }, + changed: { + required: false, + read_only: true, + serialized_name: 'properties.changed', + type: { + name: 'DateTime' + } + }, + created: { + required: false, + read_only: true, + serialized_name: 'properties.created', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/widget_type_list_result.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/widget_type_list_result.rb new file mode 100644 index 0000000000..1ef56bf8a1 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/widget_type_list_result.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::ARM::CustomerInsights + module Models + # + # The response of list widget type operation. + # + class WidgetTypeListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list + # operation. + attr_accessor :value + + # @return [String] Link to the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [WidgetTypeListResult] 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 WidgetTypeListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WidgetTypeListResult', + type: { + name: 'Composite', + class_name: 'WidgetTypeListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WidgetTypeResourceFormatElementType', + type: { + name: 'Composite', + class_name: 'WidgetTypeResourceFormat' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/widget_type_resource_format.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/widget_type_resource_format.rb new file mode 100644 index 0000000000..d922cc432d --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/models/widget_type_resource_format.rb @@ -0,0 +1,160 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + module Models + # + # The WidgetTypeResourceFormat + # + class WidgetTypeResourceFormat < ProxyResource + + include MsRestAzure + + # @return [String] Name of the widget type. + attr_accessor :widget_type_name + + # @return [String] Definition for widget type. + attr_accessor :definition + + # @return [String] Description for widget type. + attr_accessor :description + + # @return [Hash{String => String}] Localized display name for the widget + # type. + attr_accessor :display_name + + # @return [String] The image URL. + attr_accessor :image_url + + # @return [String] The hub name. + attr_accessor :tenant_id + + # @return [String] The widget version. + attr_accessor :widget_version + + # @return [DateTime] Date time when widget type was last modified. + attr_accessor :changed + + # @return [DateTime] Date time when widget type was created. + attr_accessor :created + + + # + # Mapper for WidgetTypeResourceFormat class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WidgetTypeResourceFormat', + type: { + name: 'Composite', + class_name: 'WidgetTypeResourceFormat', + 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' + } + }, + widget_type_name: { + required: false, + read_only: true, + serialized_name: 'properties.widgetTypeName', + type: { + name: 'String' + } + }, + definition: { + required: true, + serialized_name: 'properties.definition', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + image_url: { + required: false, + serialized_name: 'properties.imageUrl', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + read_only: true, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + widget_version: { + required: false, + serialized_name: 'properties.widgetVersion', + type: { + name: 'String' + } + }, + changed: { + required: false, + read_only: true, + serialized_name: 'properties.changed', + type: { + name: 'DateTime' + } + }, + created: { + required: false, + read_only: true, + serialized_name: 'properties.created', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/module_definition.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/module_definition.rb new file mode 100644 index 0000000000..a72d1309cb --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/module_definition.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 end +module Azure::ARM end +module Azure::ARM::CustomerInsights end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/predictions.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/predictions.rb new file mode 100644 index 0000000000..8626a48f47 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/predictions.rb @@ -0,0 +1,896 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Predictions + include MsRestAzure + + # + # Creates and initializes a new instance of the Predictions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a Prediction or updates an existing Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionResourceFormat] Parameters supplied to the + # create/update Prediction operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PredictionResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, prediction_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, prediction_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionResourceFormat] Parameters supplied to the + # create/update Prediction 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, hub_name, prediction_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, prediction_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::PredictionResourceFormat.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PredictionResourceFormat] operation results. + # + def get(resource_group_name, hub_name, prediction_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_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, hub_name, prediction_name, custom_headers = nil) + get_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + end + + # + # Gets a Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param [Hash{String => String}] 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, hub_name, prediction_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'prediction_name is nil' if prediction_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.CustomerInsights/hubs/{hubName}/predictions/{predictionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'predictionName' => prediction_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::PredictionResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, hub_name, prediction_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, hub_name, prediction_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, hub_name, prediction_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets training results. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PredictionTrainingResults] operation results. + # + def get_training_results(resource_group_name, hub_name, prediction_name, custom_headers = nil) + response = get_training_results_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets training results. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_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_training_results_with_http_info(resource_group_name, hub_name, prediction_name, custom_headers = nil) + get_training_results_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + end + + # + # Gets training results. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param [Hash{String => String}] 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_training_results_async(resource_group_name, hub_name, prediction_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'prediction_name is nil' if prediction_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.CustomerInsights/hubs/{hubName}/predictions/{predictionName}/getTrainingResults' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'predictionName' => prediction_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::ARM::CustomerInsights::Models::PredictionTrainingResults.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 model status of the prediction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PredictionModelStatus] operation results. + # + def get_model_status(resource_group_name, hub_name, prediction_name, custom_headers = nil) + response = get_model_status_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets model status of the prediction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_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_model_status_with_http_info(resource_group_name, hub_name, prediction_name, custom_headers = nil) + get_model_status_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + end + + # + # Gets model status of the prediction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param [Hash{String => String}] 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_model_status_async(resource_group_name, hub_name, prediction_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'prediction_name is nil' if prediction_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.CustomerInsights/hubs/{hubName}/predictions/{predictionName}/getModelStatus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'predictionName' => prediction_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::ARM::CustomerInsights::Models::PredictionModelStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 model status of prediction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionModelStatus] Parameters supplied to the + # create/update prediction model status operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def model_status(resource_group_name, hub_name, prediction_name, parameters, custom_headers = nil) + response = model_status_async(resource_group_name, hub_name, prediction_name, parameters, custom_headers).value! + nil + end + + # + # Creates or updates the model status of prediction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionModelStatus] Parameters supplied to the + # create/update prediction model status 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 model_status_with_http_info(resource_group_name, hub_name, prediction_name, parameters, custom_headers = nil) + model_status_async(resource_group_name, hub_name, prediction_name, parameters, custom_headers).value! + end + + # + # Creates or updates the model status of prediction. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionModelStatus] Parameters supplied to the + # create/update prediction model status 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 model_status_async(resource_group_name, hub_name, prediction_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'prediction_name is nil' if prediction_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::PredictionModelStatus.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.CustomerInsights/hubs/{hubName}/predictions/{predictionName}/modelStatus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'predictionName' => prediction_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? + + result + end + + promise.execute + end + + # + # Gets all the predictions in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the predictions in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all the predictions in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/predictions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::PredictionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Prediction or updates an existing Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionResourceFormat] Parameters supplied to the + # create/update Prediction operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PredictionResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, prediction_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, prediction_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a Prediction or updates an existing Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionResourceFormat] Parameters supplied to the + # create/update Prediction 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, hub_name, prediction_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, prediction_name, parameters, custom_headers).value! + end + + # + # Creates a Prediction or updates an existing Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param parameters [PredictionResourceFormat] Parameters supplied to the + # create/update Prediction 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, hub_name, prediction_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'prediction_name is nil' if prediction_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::PredictionResourceFormat.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.CustomerInsights/hubs/{hubName}/predictions/{predictionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'predictionName' => prediction_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::PredictionResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, hub_name, prediction_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + nil + end + + # + # Deletes a Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, hub_name, prediction_name, custom_headers = nil) + begin_delete_async(resource_group_name, hub_name, prediction_name, custom_headers).value! + end + + # + # Deletes a Prediction in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param prediction_name [String] The name of the Prediction. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, hub_name, prediction_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'prediction_name is nil' if prediction_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.CustomerInsights/hubs/{hubName}/predictions/{predictionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'predictionName' => prediction_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the predictions in the specified hub. + # + # @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 [PredictionListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the predictions in the specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the predictions in the specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::PredictionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the predictions in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PredictionListResult] which provide lazy access to pages of the + # response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/profiles.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/profiles.rb new file mode 100644 index 0000000000..806e026d2b --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/profiles.rb @@ -0,0 +1,733 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Profiles + include MsRestAzure + + # + # Creates and initializes a new instance of the Profiles class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a profile within a Hub, or updates an existing profile. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param parameters [ProfileResourceFormat] Parameters supplied to the + # create/delete Profile type operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProfileResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, profile_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, profile_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param parameters [ProfileResourceFormat] Parameters supplied to the + # create/delete Profile type 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, hub_name, profile_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, profile_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::ProfileResourceFormat.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 information about the specified profile. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-us. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProfileResourceFormat] operation results. + # + def get(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + response = get_async(resource_group_name, hub_name, profile_name, locale_code, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets information about the specified profile. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-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 get_with_http_info(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + get_async(resource_group_name, hub_name, profile_name, locale_code, custom_headers).value! + end + + # + # Gets information about the specified profile. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-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 get_async(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'profile_name is nil' if profile_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.CustomerInsights/hubs/{hubName}/profiles/{profileName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id}, + query_params: {'locale-code' => locale_code,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ProfileResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a profile within a hub + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-us. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + response = delete_async(resource_group_name, hub_name, profile_name, locale_code, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-us. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, hub_name, profile_name, locale_code, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets all profile in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of profile to retrieve, default is en-us. + # @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_hub(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, locale_code, custom_headers) + first_page.get_all_items + end + + # + # Gets all profile in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of profile to retrieve, default is en-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_hub_with_http_info(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, locale_code, custom_headers).value! + end + + # + # Gets all profile in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of profile to retrieve, default is en-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_hub_async(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/profiles' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'locale-code' => locale_code,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ProfileListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 KPIs that enrich the profile Type identified by the supplied name. + # Enrichment happens through participants of the Interaction on an Interaction + # KPI and through Relationships for Profile KPIs. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def get_enriching_kpis(resource_group_name, hub_name, profile_name, custom_headers = nil) + response = get_enriching_kpis_async(resource_group_name, hub_name, profile_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the KPIs that enrich the profile Type identified by the supplied name. + # Enrichment happens through participants of the Interaction on an Interaction + # KPI and through Relationships for Profile KPIs. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param custom_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_enriching_kpis_with_http_info(resource_group_name, hub_name, profile_name, custom_headers = nil) + get_enriching_kpis_async(resource_group_name, hub_name, profile_name, custom_headers).value! + end + + # + # Gets the KPIs that enrich the profile Type identified by the supplied name. + # Enrichment happens through participants of the Interaction on an Interaction + # KPI and through Relationships for Profile KPIs. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param [Hash{String => String}] 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_enriching_kpis_async(resource_group_name, hub_name, profile_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'profile_name is nil' if profile_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.CustomerInsights/hubs/{hubName}/profiles/{profileName}/getEnrichingKpis' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'profileName' => profile_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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'KpiDefinitionElementType', + type: { + name: 'Composite', + class_name: 'KpiDefinition' + } + } + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 profile within a Hub, or updates an existing profile. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param parameters [ProfileResourceFormat] Parameters supplied to the + # create/delete Profile type operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProfileResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, profile_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, profile_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a profile within a Hub, or updates an existing profile. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param parameters [ProfileResourceFormat] Parameters supplied to the + # create/delete Profile type 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, hub_name, profile_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, profile_name, parameters, custom_headers).value! + end + + # + # Creates a profile within a Hub, or updates an existing profile. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param parameters [ProfileResourceFormat] Parameters supplied to the + # create/delete Profile type 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, hub_name, profile_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'profile_name is nil' if profile_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::ProfileResourceFormat.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.CustomerInsights/hubs/{hubName}/profiles/{profileName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ProfileResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a profile within a hub + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-us. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + response = begin_delete_async(resource_group_name, hub_name, profile_name, locale_code, custom_headers).value! + nil + end + + # + # Deletes a profile within a hub + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-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 begin_delete_with_http_info(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + begin_delete_async(resource_group_name, hub_name, profile_name, locale_code, custom_headers).value! + end + + # + # Deletes a profile within a hub + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param profile_name [String] The name of the profile. + # @param locale_code [String] Locale of profile to retrieve, default is en-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 begin_delete_async(resource_group_name, hub_name, profile_name, locale_code = 'en-us', custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'profile_name is nil' if profile_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.CustomerInsights/hubs/{hubName}/profiles/{profileName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id}, + query_params: {'locale-code' => locale_code,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all profile in the hub. + # + # @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 [ProfileListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all profile in the hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all profile in the hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ProfileListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all profile in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param locale_code [String] Locale of profile to retrieve, default is en-us. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProfileListResult] which provide lazy access to pages of the + # response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, locale_code = 'en-us', custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, locale_code, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/relationship_links.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/relationship_links.rb new file mode 100644 index 0000000000..f01d4a2e29 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/relationship_links.rb @@ -0,0 +1,610 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class RelationshipLinks + include MsRestAzure + + # + # Creates and initializes a new instance of the RelationshipLinks class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a relationship link or updates an existing relationship link within a + # hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param parameters [RelationshipLinkResourceFormat] Parameters supplied to the + # CreateOrUpdate relationship link operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipLinkResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, relationship_link_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, relationship_link_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param parameters [RelationshipLinkResourceFormat] Parameters supplied to the + # CreateOrUpdate relationship link 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, hub_name, relationship_link_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, relationship_link_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipLinkResourceFormat.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 information about the specified relationship Link. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipLinkResourceFormat] operation results. + # + def get(resource_group_name, hub_name, relationship_link_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, relationship_link_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets information about the specified relationship Link. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param custom_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, hub_name, relationship_link_name, custom_headers = nil) + get_async(resource_group_name, hub_name, relationship_link_name, custom_headers).value! + end + + # + # Gets information about the specified relationship Link. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param [Hash{String => String}] 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, hub_name, relationship_link_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'relationship_link_name is nil' if relationship_link_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.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'relationshipLinkName' => relationship_link_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipLinkResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a relationship link within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, hub_name, relationship_link_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, relationship_link_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, hub_name, relationship_link_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, hub_name, relationship_link_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets all relationship links in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all relationship links in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all relationship links in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/relationshipLinks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipLinkListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 relationship link or updates an existing relationship link within a + # hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param parameters [RelationshipLinkResourceFormat] Parameters supplied to the + # CreateOrUpdate relationship link operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipLinkResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, relationship_link_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, relationship_link_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a relationship link or updates an existing relationship link within a + # hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param parameters [RelationshipLinkResourceFormat] Parameters supplied to the + # CreateOrUpdate relationship link 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, hub_name, relationship_link_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, relationship_link_name, parameters, custom_headers).value! + end + + # + # Creates a relationship link or updates an existing relationship link within a + # hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship link. + # @param parameters [RelationshipLinkResourceFormat] Parameters supplied to the + # CreateOrUpdate relationship link 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, hub_name, relationship_link_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'relationship_link_name is nil' if relationship_link_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::RelationshipLinkResourceFormat.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.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'relationshipLinkName' => relationship_link_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipLinkResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a relationship link within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, hub_name, relationship_link_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, hub_name, relationship_link_name, custom_headers).value! + nil + end + + # + # Deletes a relationship link within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, hub_name, relationship_link_name, custom_headers = nil) + begin_delete_async(resource_group_name, hub_name, relationship_link_name, custom_headers).value! + end + + # + # Deletes a relationship link within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_link_name [String] The name of the relationship. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, hub_name, relationship_link_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'relationship_link_name is nil' if relationship_link_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.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'relationshipLinkName' => relationship_link_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 == 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? + + result + end + + promise.execute + end + + # + # Gets all relationship links in the hub. + # + # @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 [RelationshipLinkListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all relationship links in the hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all relationship links in the hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipLinkListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all relationship links in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipLinkListResult] which provide lazy access to pages of + # the response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/relationships.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/relationships.rb new file mode 100644 index 0000000000..030c7df45c --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/relationships.rb @@ -0,0 +1,606 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Relationships + include MsRestAzure + + # + # Creates and initializes a new instance of the Relationships class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Creates a relationship or updates an existing relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the Relationship. + # @param parameters [RelationshipResourceFormat] Parameters supplied to the + # CreateOrUpdate Relationship operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, relationship_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, relationship_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the Relationship. + # @param parameters [RelationshipResourceFormat] Parameters supplied to the + # CreateOrUpdate Relationship 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, hub_name, relationship_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, relationship_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipResourceFormat.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 information about the specified relationship. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipResourceFormat] operation results. + # + def get(resource_group_name, hub_name, relationship_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, relationship_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets information about the specified relationship. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param custom_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, hub_name, relationship_name, custom_headers = nil) + get_async(resource_group_name, hub_name, relationship_name, custom_headers).value! + end + + # + # Gets information about the specified relationship. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param [Hash{String => String}] 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, hub_name, relationship_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'relationship_name is nil' if relationship_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.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'relationshipName' => relationship_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, hub_name, relationship_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, relationship_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, hub_name, relationship_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, hub_name, relationship_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets all relationships in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all relationships in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all relationships in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/relationships' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 relationship or updates an existing relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the Relationship. + # @param parameters [RelationshipResourceFormat] Parameters supplied to the + # CreateOrUpdate Relationship operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, relationship_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, relationship_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a relationship or updates an existing relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the Relationship. + # @param parameters [RelationshipResourceFormat] Parameters supplied to the + # CreateOrUpdate Relationship 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, hub_name, relationship_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, relationship_name, parameters, custom_headers).value! + end + + # + # Creates a relationship or updates an existing relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the Relationship. + # @param parameters [RelationshipResourceFormat] Parameters supplied to the + # CreateOrUpdate Relationship 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, hub_name, relationship_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'relationship_name is nil' if relationship_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::RelationshipResourceFormat.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.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'relationshipName' => relationship_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, hub_name, relationship_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, hub_name, relationship_name, custom_headers).value! + nil + end + + # + # Deletes a relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, hub_name, relationship_name, custom_headers = nil) + begin_delete_async(resource_group_name, hub_name, relationship_name, custom_headers).value! + end + + # + # Deletes a relationship within a hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param relationship_name [String] The name of the relationship. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, hub_name, relationship_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'relationship_name is nil' if relationship_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.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'relationshipName' => relationship_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 == 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? + + result + end + + promise.execute + end + + # + # Gets all relationships in the hub. + # + # @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 [RelationshipListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all relationships in the hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all relationships in the hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RelationshipListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all relationships in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelationshipListResult] which provide lazy access to pages of the + # response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/role_assignments.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/role_assignments.rb new file mode 100644 index 0000000000..35997935e4 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/role_assignments.rb @@ -0,0 +1,566 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class RoleAssignments + include MsRestAzure + + # + # Creates and initializes a new instance of the RoleAssignments class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Gets all the role assignments for the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the role assignments for the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all the role assignments for the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/roleAssignments' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RoleAssignmentListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The assignment name + # @param parameters [RoleAssignmentResourceFormat] Parameters supplied to the + # CreateOrUpdate RoleAssignment operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RoleAssignmentResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, assignment_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, assignment_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The assignment name + # @param parameters [RoleAssignmentResourceFormat] Parameters supplied to the + # CreateOrUpdate RoleAssignment 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, hub_name, assignment_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, hub_name, assignment_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::CustomerInsights::Models::RoleAssignmentResourceFormat.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 role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The name of the role assignment. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RoleAssignmentResourceFormat] operation results. + # + def get(resource_group_name, hub_name, assignment_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, assignment_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The name of the role assignment. + # @param custom_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, hub_name, assignment_name, custom_headers = nil) + get_async(resource_group_name, hub_name, assignment_name, custom_headers).value! + end + + # + # Gets the role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The name of the role assignment. + # @param [Hash{String => String}] 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, hub_name, assignment_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'assignment_name is nil' if assignment_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.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'assignmentName' => assignment_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RoleAssignmentResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The name of the role assignment. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, hub_name, assignment_name, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, assignment_name, custom_headers).value! + nil + end + + # + # Deletes the role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The name of the role assignment. + # @param custom_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, hub_name, assignment_name, custom_headers = nil) + delete_async(resource_group_name, hub_name, assignment_name, custom_headers).value! + end + + # + # Deletes the role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The name of the role assignment. + # @param [Hash{String => String}] 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, hub_name, assignment_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'assignment_name is nil' if assignment_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.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'assignmentName' => assignment_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates or updates a role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The assignment name + # @param parameters [RoleAssignmentResourceFormat] Parameters supplied to the + # CreateOrUpdate RoleAssignment operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RoleAssignmentResourceFormat] operation results. + # + def begin_create_or_update(resource_group_name, hub_name, assignment_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, hub_name, assignment_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The assignment name + # @param parameters [RoleAssignmentResourceFormat] Parameters supplied to the + # CreateOrUpdate RoleAssignment 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, hub_name, assignment_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, hub_name, assignment_name, parameters, custom_headers).value! + end + + # + # Creates or updates a role assignment in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param assignment_name [String] The assignment name + # @param parameters [RoleAssignmentResourceFormat] Parameters supplied to the + # CreateOrUpdate RoleAssignment 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, hub_name, assignment_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'assignment_name is nil' if assignment_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::RoleAssignmentResourceFormat.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.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'assignmentName' => assignment_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RoleAssignmentResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the role assignments for the specified hub. + # + # @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 [RoleAssignmentListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the role assignments for the specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the role assignments for the specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RoleAssignmentListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the role assignments for the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RoleAssignmentListResult] which provide lazy access to pages of the + # response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/roles.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/roles.rb new file mode 100644 index 0000000000..5e36153795 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/roles.rb @@ -0,0 +1,227 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Roles + include MsRestAzure + + # + # Creates and initializes a new instance of the Roles class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Gets all the roles for the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the roles for the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all the roles for the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/roles' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RoleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the roles for the hub. + # + # @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 [RoleListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the roles for the hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the roles for the hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::RoleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the roles for the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RoleListResult] which provide lazy access to pages of the response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/version.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/version.rb new file mode 100644 index 0000000000..fc9a5b28c3 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/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::ARM::CustomerInsights + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/views.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/views.rb new file mode 100644 index 0000000000..2ace74d862 --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/views.rb @@ -0,0 +1,530 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class Views + include MsRestAzure + + # + # Creates and initializes a new instance of the Views class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Gets all available views for given user in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param user_id [String] The user ID. Use * to retreive hub level views. + # @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_hub(resource_group_name, hub_name, user_id, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, user_id, custom_headers) + first_page.get_all_items + end + + # + # Gets all available views for given user in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param user_id [String] The user ID. Use * to retreive hub level views. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, user_id, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, user_id, custom_headers).value! + end + + # + # Gets all available views for given user in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param user_id [String] The user ID. Use * to retreive hub level views. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, user_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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, 'user_id is nil' if user_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.CustomerInsights/hubs/{hubName}/views' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'userId' => user_id}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ViewListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 view or updates an exisiting view in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param parameters [ViewResourceFormat] Parameters supplied to the + # CreateOrUpdate View operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ViewResourceFormat] operation results. + # + def create_or_update(resource_group_name, hub_name, view_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, hub_name, view_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a view or updates an exisiting view in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param parameters [ViewResourceFormat] Parameters supplied to the + # CreateOrUpdate View 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 create_or_update_with_http_info(resource_group_name, hub_name, view_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, hub_name, view_name, parameters, custom_headers).value! + end + + # + # Creates a view or updates an exisiting view in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param parameters [ViewResourceFormat] Parameters supplied to the + # CreateOrUpdate View 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 create_or_update_async(resource_group_name, hub_name, view_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'view_name is nil' if view_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::CustomerInsights::Models::ViewResourceFormat.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.CustomerInsights/hubs/{hubName}/views/{viewName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'viewName' => view_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ViewResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a view in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param user_id [String] The user ID. Use * to retreive hub level view. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ViewResourceFormat] operation results. + # + def get(resource_group_name, hub_name, view_name, user_id, custom_headers = nil) + response = get_async(resource_group_name, hub_name, view_name, user_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a view in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param user_id [String] The user ID. Use * to retreive hub level view. + # @param custom_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, hub_name, view_name, user_id, custom_headers = nil) + get_async(resource_group_name, hub_name, view_name, user_id, custom_headers).value! + end + + # + # Gets a view in the hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param user_id [String] The user ID. Use * to retreive hub level view. + # @param [Hash{String => String}] 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, hub_name, view_name, user_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'view_name is nil' if view_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, 'user_id is nil' if user_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.CustomerInsights/hubs/{hubName}/views/{viewName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'viewName' => view_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'userId' => user_id}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ViewResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a view in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param user_id [String] The user ID. Use * to retreive hub level view. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, hub_name, view_name, user_id, custom_headers = nil) + response = delete_async(resource_group_name, hub_name, view_name, user_id, custom_headers).value! + nil + end + + # + # Deletes a view in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param user_id [String] The user ID. Use * to retreive hub level view. + # @param custom_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, hub_name, view_name, user_id, custom_headers = nil) + delete_async(resource_group_name, hub_name, view_name, user_id, custom_headers).value! + end + + # + # Deletes a view in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param view_name [String] The name of the view. + # @param user_id [String] The user ID. Use * to retreive hub level view. + # @param [Hash{String => String}] 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, hub_name, view_name, user_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'view_name is nil' if view_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, 'user_id is nil' if user_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.CustomerInsights/hubs/{hubName}/views/{viewName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'viewName' => view_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'userId' => user_id}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all available views for given user in the specified hub. + # + # @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 [ViewListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all available views for given user in the specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all available views for given user in the specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::ViewListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all available views for given user in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param user_id [String] The user ID. Use * to retreive hub level views. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ViewListResult] which provide lazy access to pages of the response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, user_id, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, user_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/widget_types.rb b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/widget_types.rb new file mode 100644 index 0000000000..db7765c18f --- /dev/null +++ b/management/azure_mgmt_customer_insights/lib/generated/azure_mgmt_customer_insights/widget_types.rb @@ -0,0 +1,323 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::CustomerInsights + # + # The Azure Customer Insights management API provides a RESTful set of web + # services that interact with Azure Customer Insights service to manage your + # resources. The API has entities that capture the relationship between an + # end user and the Azure Customer Insights service. + # + class WidgetTypes + include MsRestAzure + + # + # Creates and initializes a new instance of the WidgetTypes class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient + attr_reader :client + + # + # Gets all available widget types in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @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_hub(resource_group_name, hub_name, custom_headers = nil) + first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all available widget types in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_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_hub_with_http_info(resource_group_name, hub_name, custom_headers = nil) + list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + end + + # + # Gets all available widget types in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param [Hash{String => String}] 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_hub_async(resource_group_name, hub_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_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.CustomerInsights/hubs/{hubName}/widgetTypes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::WidgetTypeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a widget type in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param widget_type_name [String] The name of the widget type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WidgetTypeResourceFormat] operation results. + # + def get(resource_group_name, hub_name, widget_type_name, custom_headers = nil) + response = get_async(resource_group_name, hub_name, widget_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a widget type in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param widget_type_name [String] The name of the widget type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, hub_name, widget_type_name, custom_headers = nil) + get_async(resource_group_name, hub_name, widget_type_name, custom_headers).value! + end + + # + # Gets a widget type in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param widget_type_name [String] The name of the widget type. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, hub_name, widget_type_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'hub_name is nil' if hub_name.nil? + fail ArgumentError, 'widget_type_name is nil' if widget_type_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.CustomerInsights/hubs/{hubName}/widgetTypes/{widgetTypeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'widgetTypeName' => widget_type_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::WidgetTypeResourceFormat.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all available widget types in the specified hub. + # + # @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 [WidgetTypeListResult] operation results. + # + def list_by_hub_next(next_page_link, custom_headers = nil) + response = list_by_hub_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all available widget types in the specified hub. + # + # @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_hub_next_with_http_info(next_page_link, custom_headers = nil) + list_by_hub_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all available widget types in the specified hub. + # + # @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_hub_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::CustomerInsights::Models::WidgetTypeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all available widget types in the specified hub. + # + # @param resource_group_name [String] The name of the resource group. + # @param hub_name [String] The name of the hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WidgetTypeListResult] which provide lazy access to pages of the + # response. + # + def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers = nil) + response = list_by_hub_async(resource_group_name, hub_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_hub_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_customer_insights/spec/spec_helper.rb b/management/azure_mgmt_customer_insights/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_customer_insights/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_datalake_analytics/azure_mgmt_datalake_analytics.gemspec b/management/azure_mgmt_datalake_analytics/azure_mgmt_datalake_analytics.gemspec index 4555f34865..e9228a337e 100644 --- a/management/azure_mgmt_datalake_analytics/azure_mgmt_datalake_analytics.gemspec +++ b/management/azure_mgmt_datalake_analytics/azure_mgmt_datalake_analytics.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb old mode 100755 new mode 100644 index e548070e4e..568afbd69b --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -25,29 +25,38 @@ module Azure::ARM::DataLakeAnalytics autoload :StorageAccounts, 'generated/azure_mgmt_datalake_analytics/storage_accounts.rb' autoload :DataLakeStoreAccounts, 'generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb' autoload :Account, 'generated/azure_mgmt_datalake_analytics/account.rb' + autoload :Locations, 'generated/azure_mgmt_datalake_analytics/locations.rb' + autoload :Operations, 'generated/azure_mgmt_datalake_analytics/operations.rb' autoload :DataLakeAnalyticsAccountManagementClient, 'generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb' module Models - autoload :UpdateStorageAccountParameters, 'generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb' - autoload :AddDataLakeStoreParameters, 'generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb' + autoload :DataLakeAnalyticsAccountUpdateParameters, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb' + autoload :ComputePolicyCreateOrUpdateParameters, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb' autoload :StorageContainer, 'generated/azure_mgmt_datalake_analytics/models/storage_container.rb' - autoload :AddStorageAccountParameters, 'generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb' + autoload :ComputePolicyListResult, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb' autoload :SasTokenInfo, 'generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb' autoload :OptionalSubResource, 'generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb' - autoload :ComputePolicyCreateOrUpdateParameters, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb' + autoload :DataLakeAnalyticsAccountPropertiesBasic, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb' autoload :DataLakeAnalyticsAccountListDataLakeStoreResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb' - autoload :ComputePolicyListResult, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb' + autoload :Resource, 'generated/azure_mgmt_datalake_analytics/models/resource.rb' autoload :ComputePolicyAccountCreateParameters, 'generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb' - autoload :DataLakeAnalyticsAccountUpdateParameters, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb' - autoload :ListStorageContainersResult, 'generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb' - autoload :DataLakeAnalyticsAccountPropertiesBasic, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb' - autoload :DataLakeAnalyticsAccountListStorageAccountsResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb' - autoload :ComputePolicy, 'generated/azure_mgmt_datalake_analytics/models/compute_policy.rb' - autoload :UpdateFirewallRuleParameters, 'generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb' - autoload :SubResource, 'generated/azure_mgmt_datalake_analytics/models/sub_resource.rb' + autoload :OperationListResult, 'generated/azure_mgmt_datalake_analytics/models/operation_list_result.rb' + autoload :AddDataLakeStoreParameters, 'generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb' autoload :DataLakeAnalyticsAccountListResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb' - autoload :ListSasTokensResult, 'generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb' + autoload :UpdateStorageAccountParameters, 'generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb' autoload :DataLakeAnalyticsFirewallRuleListResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb' + autoload :ListSasTokensResult, 'generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb' + autoload :UpdateFirewallRuleParameters, 'generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb' + autoload :SubResource, 'generated/azure_mgmt_datalake_analytics/models/sub_resource.rb' + autoload :NameAvailabilityInformation, 'generated/azure_mgmt_datalake_analytics/models/name_availability_information.rb' + autoload :AddStorageAccountParameters, 'generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb' + autoload :CheckNameAvailabilityParameters, 'generated/azure_mgmt_datalake_analytics/models/check_name_availability_parameters.rb' + autoload :DataLakeAnalyticsAccountListStorageAccountsResult, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb' + autoload :CapabilityInformation, 'generated/azure_mgmt_datalake_analytics/models/capability_information.rb' + autoload :ListStorageContainersResult, 'generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_datalake_analytics/models/operation_display.rb' + autoload :ComputePolicy, 'generated/azure_mgmt_datalake_analytics/models/compute_policy.rb' + autoload :Operation, 'generated/azure_mgmt_datalake_analytics/models/operation.rb' autoload :StorageAccountInfo, 'generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb' autoload :DataLakeStoreAccountInfo, 'generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb' autoload :FirewallRule, 'generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb' @@ -59,5 +68,7 @@ module Models autoload :AADObjectType, 'generated/azure_mgmt_datalake_analytics/models/aadobject_type.rb' autoload :DataLakeAnalyticsAccountStatus, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb' autoload :DataLakeAnalyticsAccountState, 'generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb' + autoload :SubscriptionState, 'generated/azure_mgmt_datalake_analytics/models/subscription_state.rb' + autoload :OperationOrigin, 'generated/azure_mgmt_datalake_analytics/models/operation_origin.rb' end end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb old mode 100755 new mode 100644 index 54bc955677..4652454a90 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -526,6 +526,109 @@ def get_async(resource_group_name, account_name, custom_headers = nil) promise.execute end + # + # Checks whether the specified account name is available or taken. + # + # @param location [String] The Resource location without whitespace. + # @param parameters [CheckNameAvailabilityParameters] Parameters supplied to + # check the Data Lake Analytics account name availability. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NameAvailabilityInformation] operation results. + # + def check_name_availability(location, parameters, custom_headers = nil) + response = check_name_availability_async(location, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks whether the specified account name is available or taken. + # + # @param location [String] The Resource location without whitespace. + # @param parameters [CheckNameAvailabilityParameters] Parameters supplied to + # check the Data Lake Analytics account name availability. + # @param custom_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(location, parameters, custom_headers = nil) + check_name_availability_async(location, parameters, custom_headers).value! + end + + # + # Checks whether the specified account name is available or taken. + # + # @param location [String] The Resource location without whitespace. + # @param parameters [CheckNameAvailabilityParameters] Parameters supplied to + # check the Data Lake Analytics account name availability. + # @param [Hash{String => String}] 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(location, parameters, custom_headers = nil) + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::DataLakeAnalytics::Models::CheckNameAvailabilityParameters.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.DataLakeAnalytics/locations/{location}/checkNameAvailability' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'location' => location,'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::ARM::DataLakeAnalytics::Models::NameAvailabilityInformation.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Creates the specified Data Lake Analytics account. This supplies the user # with computation services for Data Lake Analytics workloads @@ -619,14 +722,14 @@ def begin_create_async(resource_group_name, account_name, parameters, custom_hea http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 201 || status_code == 200 + unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response - if status_code == 201 + if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() @@ -636,7 +739,7 @@ def begin_create_async(resource_group_name, account_name, parameters, custom_hea end end # Deserialize Response - if status_code == 200 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::DataLakeAnalytics::Models::DataLakeAnalyticsAccount.mapper() diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb index 27a294b640..624ca1b54e 100644 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/compute_policies.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb old mode 100755 new mode 100644 index fe8d612cb3..f9bacbdb5e --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -51,6 +51,12 @@ class DataLakeAnalyticsAccountManagementClient < MsRestAzure::AzureServiceClient # @return [Account] account attr_reader :account + # @return [Locations] locations + attr_reader :locations + + # @return [Operations] operations + attr_reader :operations + # # Creates initializes a new instance of the DataLakeAnalyticsAccountManagementClient class. # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @@ -69,6 +75,8 @@ def initialize(credentials = nil, base_url = nil, options = nil) @storage_accounts = StorageAccounts.new(self) @data_lake_store_accounts = DataLakeStoreAccounts.new(self) @account = Account.new(self) + @locations = Locations.new(self) + @operations = Operations.new(self) @api_version = '2016-11-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb old mode 100755 new mode 100644 index 257f9404be..a765db0af7 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -440,7 +440,7 @@ def list_by_account_async(resource_group_name, account_name, filter = nil, top = # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts' request_url = @base_url || @client.base_url diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb old mode 100755 new mode 100644 index 5e7bf31c51..289e43c1ab --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/firewall_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/locations.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/locations.rb new file mode 100644 index 0000000000..8f715982ad --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/locations.rb @@ -0,0 +1,115 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::DataLakeAnalytics + # + # Creates an Azure Data Lake Analytics account management client. + # + class Locations + include MsRestAzure + + # + # Creates and initializes a new instance of the Locations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [DataLakeAnalyticsAccountManagementClient] reference to the DataLakeAnalyticsAccountManagementClient + attr_reader :client + + # + # Gets subscription-level properties and limits for Data Lake Analytics + # specified by Resource location. + # + # @param location [String] The Resource location without whitespace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CapabilityInformation] operation results. + # + def get_capability(location, custom_headers = nil) + response = get_capability_async(location, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets subscription-level properties and limits for Data Lake Analytics + # specified by Resource location. + # + # @param location [String] The Resource location without whitespace. + # @param custom_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_capability_with_http_info(location, custom_headers = nil) + get_capability_async(location, custom_headers).value! + end + + # + # Gets subscription-level properties and limits for Data Lake Analytics + # specified by Resource location. + # + # @param location [String] The Resource location without whitespace. + # @param [Hash{String => String}] 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_capability_async(location, custom_headers = nil) + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, '@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.DataLakeAnalytics/locations/{location}/capability' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'location' => location,'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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::DataLakeAnalytics::Models::CapabilityInformation.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/aadobject_type.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/aadobject_type.rb old mode 100755 new mode 100644 index 8d62db82f9..34c1fcd00d --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/aadobject_type.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/aadobject_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb old mode 100755 new mode 100644 index 3230f508ae..5bda7b1b29 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AddDataLakeStoreParameters include MsRestAzure - include MsRest::JSONable # @return [String] the optional suffix for the Data Lake Store account. attr_accessor :suffix diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb old mode 100755 new mode 100644 index c25467c70a..c6a546d630 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AddStorageAccountParameters include MsRestAzure - include MsRest::JSONable # @return [String] the access key associated with this Azure Storage # account that will be used to connect to it. attr_accessor :access_key diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/capability_information.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/capability_information.rb new file mode 100644 index 0000000000..f1a9235601 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/capability_information.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::ARM::DataLakeAnalytics + module Models + # + # Subscription-level properties and limits for Data Lake Analytics + # + class CapabilityInformation + + include MsRestAzure + + # @return the subscription credentials that uniquely identifies the + # subscription. + attr_accessor :subscription_id + + # @return [SubscriptionState] the subscription state. Possible values + # include: 'Registered', 'Suspended', 'Deleted', 'Unregistered', 'Warned' + attr_accessor :state + + # @return [Integer] the maximum supported number of accounts under this + # subscription. + attr_accessor :max_account_count + + # @return [Integer] the current number of accounts under this + # subscription. + attr_accessor :account_count + + # @return [Boolean] the Boolean value of true or false to indicate the + # maintenance state. + attr_accessor :migration_state + + + # + # Mapper for CapabilityInformation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CapabilityInformation', + type: { + name: 'Composite', + class_name: 'CapabilityInformation', + model_properties: { + subscription_id: { + required: false, + read_only: true, + serialized_name: 'subscriptionId', + type: { + name: 'String' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'state', + type: { + name: 'String' + } + }, + max_account_count: { + required: false, + read_only: true, + serialized_name: 'maxAccountCount', + type: { + name: 'Number' + } + }, + account_count: { + required: false, + read_only: true, + serialized_name: 'accountCount', + type: { + name: 'Number' + } + }, + migration_state: { + required: false, + read_only: true, + serialized_name: 'migrationState', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/check_name_availability_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/check_name_availability_parameters.rb new file mode 100644 index 0000000000..a0dc7be455 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/check_name_availability_parameters.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::DataLakeAnalytics + module Models + # + # Data Lake Analytics account name availability check parameters + # + class CheckNameAvailabilityParameters + + include MsRestAzure + + # @return [String] the Data Lake Analytics name to check availability + # for. + attr_accessor :name + + # @return [String] the Resource type. Note: This should not be set by the + # user, as the constant value is Microsoft.DataLakeAnalytics/accounts. + # Default value: 'Microsoft.DataLakeAnalytics/accounts' . + attr_accessor :type + + + # + # Mapper for CheckNameAvailabilityParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CheckNameAvailabilityParameters', + type: { + name: 'Composite', + class_name: 'CheckNameAvailabilityParameters', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: true, + is_constant: true, + serialized_name: 'type', + default_value: 'Microsoft.DataLakeAnalytics/accounts', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb old mode 100755 new mode 100644 index 750a0e63e5..a9c720791f --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputePolicy include MsRestAzure - include MsRest::JSONable # @return [String] The name of the compute policy attr_accessor :name diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb old mode 100755 new mode 100644 index eb48dd895d..b777f49775 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_account_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputePolicyAccountCreateParameters include MsRestAzure - include MsRest::JSONable # @return [String] The unique name of the policy to create attr_accessor :name diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb old mode 100755 new mode 100644 index af1ba692bb..c41887faf1 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_create_or_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputePolicyCreateOrUpdateParameters include MsRestAzure - include MsRest::JSONable # @return The AAD object identifier for the entity to create a policy # for. attr_accessor :object_id diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb old mode 100755 new mode 100644 index e61353371c..c3731d029d --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb old mode 100755 new mode 100644 index 6a43971ed6..035fec45fe --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,15 +9,14 @@ module Models # A Data Lake Analytics account object, containing all information # associated with the named Data Lake Analytics account. # - class DataLakeAnalyticsAccount < MsRestAzure::Resource + class DataLakeAnalyticsAccount < Resource include MsRestAzure - include MsRest::JSONable # @return [DataLakeAnalyticsAccountStatus] the provisioning status of the # Data Lake Analytics account. Possible values include: 'Failed', # 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', - # 'Resuming', 'Deleting', 'Deleted' + # 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled' attr_accessor :provisioning_state # @return [DataLakeAnalyticsAccountState] the state of the Data Lake @@ -55,7 +54,7 @@ class DataLakeAnalyticsAccount < MsRestAzure::Resource # @return [Integer] the system defined maximum supported degree of # parallelism for this account, which restricts the maximum value of - # parallelism the user can set for the account.. + # parallelism the user can set for the account. attr_accessor :system_max_degree_of_parallelism # @return [Integer] the system defined maximum supported jobs running diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb index 71f2941535..edd1428a7c 100644 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,15 +9,14 @@ module Models # A Data Lake Analytics account object, containing all information # associated with the named Data Lake Analytics account. # - class DataLakeAnalyticsAccountBasic < MsRestAzure::Resource + class DataLakeAnalyticsAccountBasic < Resource include MsRestAzure - include MsRest::JSONable # @return [DataLakeAnalyticsAccountStatus] the provisioning status of the # Data Lake Analytics account. Possible values include: 'Failed', # 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', - # 'Resuming', 'Deleting', 'Deleted' + # 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled' attr_accessor :provisioning_state # @return [DataLakeAnalyticsAccountState] the state of the Data Lake diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb old mode 100755 new mode 100644 index 046e8ab9cb..f62c782b4b --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb old mode 100755 new mode 100644 index 21cc04223d..c15dce2044 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb old mode 100755 new mode 100644 index 7b0dedaa66..5c1c164334 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb index c8bbeaa302..329bd98c4c 100644 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ class DataLakeAnalyticsAccountPropertiesBasic include MsRestAzure - include MsRest::JSONable # @return [DataLakeAnalyticsAccountStatus] the provisioning status of the # Data Lake Analytics account. Possible values include: 'Failed', # 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', - # 'Resuming', 'Deleting', 'Deleted' + # 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled' attr_accessor :provisioning_state # @return [DataLakeAnalyticsAccountState] the state of the Data Lake diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb old mode 100755 new mode 100644 index e98716b5cc..2e483cc95e --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb old mode 100755 new mode 100644 index a416c9dd07..7607f338fe --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -18,6 +18,8 @@ module DataLakeAnalyticsAccountStatus Resuming = "Resuming" Deleting = "Deleting" Deleted = "Deleted" + Undeleting = "Undeleting" + Canceled = "Canceled" end end end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb old mode 100755 new mode 100644 index 01023b911a..27b0299542 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DataLakeAnalyticsAccountUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb old mode 100755 new mode 100644 index f75bad4a18..4c7d006bbb --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_firewall_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb old mode 100755 new mode 100644 index fb44ae4612..16b3f76a47 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DataLakeStoreAccountInfo < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] the optional suffix for the Data Lake Store account. attr_accessor :suffix diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_allow_azure_ips_state.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_allow_azure_ips_state.rb old mode 100755 new mode 100644 index 38ea7c7382..47ab71be87 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_allow_azure_ips_state.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_allow_azure_ips_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb old mode 100755 new mode 100644 index 9f03553573..9360878d5c --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FirewallRule < OptionalSubResource include MsRestAzure - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_state.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_state.rb old mode 100755 new mode 100644 index 916f28df2f..d37387f384 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_state.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/firewall_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb old mode 100755 new mode 100644 index ecf7336350..96b941dd38 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb old mode 100755 new mode 100644 index ddcbe0d505..ba0e295497 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/list_storage_containers_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/name_availability_information.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/name_availability_information.rb new file mode 100644 index 0000000000..e6f586b065 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/name_availability_information.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::ARM::DataLakeAnalytics + module Models + # + # Data Lake Analytics account name availability result information + # + class NameAvailabilityInformation + + include MsRestAzure + + # @return [Boolean] the Boolean value of true or false to indicate + # whether the Data Lake Analytics account name is available or not. + attr_accessor :name_available + + # @return [String] the reason why the Data Lake Analytics account name is + # not available, if nameAvailable is false. + attr_accessor :reason + + # @return [String] the message describing why the Data Lake Analytics + # account name is not available, if nameAvailable is false. + attr_accessor :message + + + # + # Mapper for NameAvailabilityInformation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NameAvailabilityInformation', + type: { + name: 'Composite', + class_name: 'NameAvailabilityInformation', + model_properties: { + name_available: { + required: false, + read_only: true, + serialized_name: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + reason: { + required: false, + read_only: true, + serialized_name: 'reason', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation.rb new file mode 100644 index 0000000000..efee9ccda2 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation.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::ARM::DataLakeAnalytics + module Models + # + # An available operation for Data Lake Analytics + # + class Operation + + include MsRestAzure + + # @return [String] the name of the operation. + attr_accessor :name + + # @return [OperationDisplay] the display information for the operation. + attr_accessor :display + + # @return [OperationOrigin] the intended executor of the operation. + # Possible values include: 'user', 'system', 'user,system' + attr_accessor :origin + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + }, + origin: { + required: false, + read_only: true, + serialized_name: 'origin', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_display.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_display.rb new file mode 100644 index 0000000000..22dfe97ce5 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_display.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::ARM::DataLakeAnalytics + module Models + # + # The display information for a particular operation + # + class OperationDisplay + + include MsRestAzure + + # @return [String] the Resource provider of the operation. + attr_accessor :provider + + # @return [String] the Resource type of the operation. + attr_accessor :resource + + # @return [String] a friendly name of the operation. + attr_accessor :operation + + # @return [String] a friendly description 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: 'OperationDisplay', + type: { + name: 'Composite', + class_name: 'OperationDisplay', + model_properties: { + provider: { + required: false, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + read_only: true, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_list_result.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_list_result.rb new file mode 100644 index 0000000000..3b80ab9693 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_list_result.rb @@ -0,0 +1,64 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::DataLakeAnalytics + module Models + # + # The list of available operations for Data Lake Analytics + # + class OperationListResult + + include MsRestAzure + + # @return [Array] the results of the list operation. + attr_accessor :value + + # @return [String] the link (url) to the next page of results. + attr_accessor :next_link + + + # + # 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_origin.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_origin.rb new file mode 100644 index 0000000000..3e05b2d57f --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/operation_origin.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::ARM::DataLakeAnalytics + module Models + # + # Defines values for OperationOrigin + # + module OperationOrigin + User = "user" + System = "system" + Usersystem = "user,system" + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb old mode 100755 new mode 100644 index 7b1e5c48da..607576ae99 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/optional_sub_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class OptionalSubResource include MsRestAzure - include MsRest::JSONable # @return [String] Resource Id attr_accessor :id diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/resource.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/resource.rb new file mode 100644 index 0000000000..35da5cddae --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/resource.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::ARM::DataLakeAnalytics + module Models + # + # The Resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb old mode 100755 new mode 100644 index 116672c1f3..7428d49bb3 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SasTokenInfo include MsRestAzure - include MsRest::JSONable # @return [String] the access token for the associated Azure Storage # Container. attr_accessor :access_token diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb old mode 100755 new mode 100644 index 2ab6fa4a2b..b1de2a16c2 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccountInfo < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] the access key associated with this Azure Storage # account that will be used to connect to it. attr_accessor :access_key diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb old mode 100755 new mode 100644 index ddf72c6567..8cbdd4860a --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/storage_container.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageContainer include MsRestAzure - include MsRest::JSONable # @return [String] the unique identifier of the blob container. attr_accessor :id diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb old mode 100755 new mode 100644 index 713572415d..a6294d5e08 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # The Sub Resource model definition. # - class SubResource < MsRestAzure::SubResource + class SubResource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id + attr_accessor :id + # @return [String] Resource name attr_accessor :name diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/subscription_state.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/subscription_state.rb new file mode 100644 index 0000000000..1891c22c41 --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/subscription_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::ARM::DataLakeAnalytics + module Models + # + # Defines values for SubscriptionState + # + module SubscriptionState + Registered = "Registered" + Suspended = "Suspended" + Deleted = "Deleted" + Unregistered = "Unregistered" + Warned = "Warned" + end + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/tier_type.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/tier_type.rb old mode 100755 new mode 100644 index f9b734421b..401a377063 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/tier_type.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/tier_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb old mode 100755 new mode 100644 index dc767f2476..ae722cae19 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UpdateFirewallRuleParameters include MsRestAzure - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb old mode 100755 new mode 100644 index 5454fe4492..5e9c69dc58 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class UpdateStorageAccountParameters include MsRestAzure - include MsRest::JSONable # @return [String] the updated access key associated with this Azure # Storage account that will be used to connect to it. attr_accessor :access_key diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/module_definition.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/module_definition.rb old mode 100755 new mode 100644 index e5b35d2fda..c12d8ddc1a --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/module_definition.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/operations.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/operations.rb new file mode 100644 index 0000000000..eae260f9af --- /dev/null +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/operations.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::ARM::DataLakeAnalytics + # + # Creates an Azure Data Lake Analytics account management client. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [DataLakeAnalyticsAccountManagementClient] reference to the DataLakeAnalyticsAccountManagementClient + attr_reader :client + + # + # Lists all of the available Data Lake Analytics REST API operations. + # + # @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(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all of the available Data Lake Analytics REST API operations. + # + # @param custom_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 Data Lake Analytics REST API operations. + # + # @param [Hash{String => String}] 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.DataLakeAnalytics/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::ARM::DataLakeAnalytics::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 + + end +end diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb old mode 100755 new mode 100644 index 169d31349e..ac1a5f9d60 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -890,7 +890,7 @@ def list_by_account_async(resource_group_name, account_name, filter = nil, top = # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts' request_url = @base_url || @client.base_url diff --git a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/version.rb b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/version.rb old mode 100755 new mode 100644 index faeeb0bd49..5f204f2628 --- a/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/version.rb +++ b/management/azure_mgmt_datalake_analytics/lib/generated/azure_mgmt_datalake_analytics/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::DataLakeAnalytics - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_datalake_store/azure_mgmt_datalake_store.gemspec b/management/azure_mgmt_datalake_store/azure_mgmt_datalake_store.gemspec index 764ea42ad3..78efd373e2 100644 --- a/management/azure_mgmt_datalake_store/azure_mgmt_datalake_store.gemspec +++ b/management/azure_mgmt_datalake_store/azure_mgmt_datalake_store.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb old mode 100755 new mode 100644 index 612c2b80e6..0c51b25b7a --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -36,6 +36,7 @@ module Models autoload :EncryptionIdentity, 'generated/azure_mgmt_datalake_store/models/encryption_identity.rb' autoload :EncryptionConfig, 'generated/azure_mgmt_datalake_store/models/encryption_config.rb' autoload :SubResource, 'generated/azure_mgmt_datalake_store/models/sub_resource.rb' + autoload :Resource, 'generated/azure_mgmt_datalake_store/models/resource.rb' autoload :KeyVaultMetaInfo, 'generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb' autoload :DataLakeStoreAccountListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb' autoload :ErrorDetails, 'generated/azure_mgmt_datalake_store/models/error_details.rb' diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb old mode 100755 new mode 100644 index 6641f9e895..7f56c61a0f --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -690,14 +690,14 @@ def begin_create_async(resource_group_name, name, parameters, custom_headers = n http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 201 || status_code == 200 + unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response - if status_code == 201 + if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() @@ -707,7 +707,7 @@ def begin_create_async(resource_group_name, name, parameters, custom_headers = n end end # Deserialize Response - if status_code == 200 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ARM::DataLakeStore::Models::DataLakeStoreAccount.mapper() diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb old mode 100755 new mode 100644 index a905495e29..7254d01c09 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb old mode 100755 new mode 100644 index c2add56c96..2ca7237cff --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb old mode 100755 new mode 100644 index 79f8670c6c..026a4101c5 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,18 +8,17 @@ module Models # # Data Lake Store account information # - class DataLakeStoreAccount < MsRestAzure::Resource + class DataLakeStoreAccount < Resource include MsRestAzure - include MsRest::JSONable # @return [EncryptionIdentity] The Key Vault encryption identity, if any. attr_accessor :identity # @return [DataLakeStoreAccountStatus] the provisioning status of the # Data Lake Store account. Possible values include: 'Failed', 'Creating', # 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', - # 'Deleting', 'Deleted' + # 'Deleting', 'Deleted', 'Undeleting', 'Canceled' attr_accessor :provisioning_state # @return [DataLakeStoreAccountState] the state of the Data Lake Store diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb index a66ec6ec40..8995173032 100644 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_basic.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,15 +8,14 @@ module Models # # Basic Data Lake Store account information, returned on list calls. # - class DataLakeStoreAccountBasic < MsRestAzure::Resource + class DataLakeStoreAccountBasic < Resource include MsRestAzure - include MsRest::JSONable # @return [DataLakeStoreAccountStatus] the provisioning status of the # Data Lake Store account. Possible values include: 'Failed', 'Creating', # 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', - # 'Deleting', 'Deleted' + # 'Deleting', 'Deleted', 'Undeleting', 'Canceled' attr_accessor :provisioning_state # @return [DataLakeStoreAccountState] the state of the Data Lake Store diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb old mode 100755 new mode 100644 index 6951b244a4..2176d3f101 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb old mode 100755 new mode 100644 index 37ae734c15..5944fd7c3b --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb old mode 100755 new mode 100644 index da87192971..9006e5704f --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -18,6 +18,8 @@ module DataLakeStoreAccountStatus Resuming = "Resuming" Deleting = "Deleting" Deleted = "Deleted" + Undeleting = "Undeleting" + Canceled = "Canceled" end end end diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb old mode 100755 new mode 100644 index 33c067b3d0..5a5837b312 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DataLakeStoreAccountUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb old mode 100755 new mode 100644 index 597649790d..0aaf273924 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb old mode 100755 new mode 100644 index 88d54248f5..e2b91534dc --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb old mode 100755 new mode 100644 index fef14f7e3e..5915ae210b --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EncryptionConfig include MsRestAzure - include MsRest::JSONable # @return [EncryptionConfigType] The type of encryption configuration # being used. Currently the only supported types are 'UserManaged' and # 'ServiceManaged'. Possible values include: 'UserManaged', diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb old mode 100755 new mode 100644 index 6d36b8c217..a3b764f5ae --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb old mode 100755 new mode 100644 index 18e545c5f7..d12c2f7b3f --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EncryptionIdentity include MsRestAzure - include MsRest::JSONable # @return [String] The type of encryption being used. Currently the only # supported type is 'SystemAssigned'. Default value: 'SystemAssigned' . attr_accessor :type diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb old mode 100755 new mode 100644 index b1c6f10f83..2e822084ac --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb old mode 100755 new mode 100644 index 69ae33bbae..6864f4772d --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb old mode 100755 new mode 100644 index edad98ac45..d9d7569799 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/error_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ErrorDetails include MsRestAzure - include MsRest::JSONable # @return [String] the HTTP status code or error code associated with # this error attr_accessor :code diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_allow_azure_ips_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_allow_azure_ips_state.rb old mode 100755 new mode 100644 index f30330ffc0..a36c547c6a --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_allow_azure_ips_state.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_allow_azure_ips_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb old mode 100755 new mode 100644 index c52e4aacc1..9dd7f3984d --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FirewallRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb old mode 100755 new mode 100644 index b624e92514..fd08d153e0 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb old mode 100755 new mode 100644 index ab178e303a..efc6fc66ea --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyVaultMetaInfo include MsRestAzure - include MsRest::JSONable # @return [String] The resource identifier for the user managed Key Vault # being used to encrypt. attr_accessor :key_vault_resource_id diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/resource.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/resource.rb new file mode 100644 index 0000000000..25a71c3266 --- /dev/null +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/resource.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::ARM::DataLakeStore + module Models + # + # The Resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb old mode 100755 new mode 100644 index d08f4047b8..dfc11e9be8 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/sub_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # The Resource model definition for a nested resource. # - class SubResource < MsRestAzure::SubResource + class SubResource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id + attr_accessor :id + # @return [String] Resource name attr_accessor :name diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/tier_type.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/tier_type.rb old mode 100755 new mode 100644 index 45fe3543a7..c33e4c88bb --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/tier_type.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/tier_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb old mode 100755 new mode 100644 index 8b375779a0..1a0ccce378 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TrustedIdProvider < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The URL of this trusted identity provider attr_accessor :id_provider diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb old mode 100755 new mode 100644 index e952673344..aa85ffeb0a --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb old mode 100755 new mode 100644 index 8c7a9323be..9aeea03ec5 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_encryption_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UpdateEncryptionConfig include MsRestAzure - include MsRest::JSONable # @return [UpdateKeyVaultMetaInfo] The updated Key Vault key to use in # user managed key rotation. attr_accessor :key_vault_meta_info diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb old mode 100755 new mode 100644 index 4238a3a2ee..5067bbd327 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_firewall_rule_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UpdateFirewallRuleParameters include MsRestAzure - include MsRest::JSONable # @return [String] the start IP address for the firewall rule. This can # be either ipv4 or ipv6. Start and End should be in the same protocol. attr_accessor :start_ip_address diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb old mode 100755 new mode 100644 index 0e12cebfd0..589f7f1b8f --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_key_vault_meta_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UpdateKeyVaultMetaInfo include MsRestAzure - include MsRest::JSONable # @return [String] The version of the user managed encryption key to # update through a key rotation. attr_accessor :encryption_key_version diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb old mode 100755 new mode 100644 index dc7d50ddbe..efd99c399c --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/models/update_trusted_id_provider_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UpdateTrustedIdProviderParameters include MsRestAzure - include MsRest::JSONable # @return [String] The URL of this trusted identity provider attr_accessor :id_provider diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/module_definition.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/module_definition.rb old mode 100755 new mode 100644 index 53b83079f7..13842e9c95 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/module_definition.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb old mode 100755 new mode 100644 index 459aa2dba2..7ae4a572f7 --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/version.rb b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/version.rb old mode 100755 new mode 100644 index d72b6dafdf..0ead30653f --- a/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/version.rb +++ b/management/azure_mgmt_datalake_store/lib/generated/azure_mgmt_datalake_store/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::DataLakeStore - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_devtestlabs/azure_mgmt_devtestlabs.gemspec b/management/azure_mgmt_devtestlabs/azure_mgmt_devtestlabs.gemspec index b547dea523..954338b417 100644 --- a/management/azure_mgmt_devtestlabs/azure_mgmt_devtestlabs.gemspec +++ b/management/azure_mgmt_devtestlabs/azure_mgmt_devtestlabs.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs.rb old mode 100755 new mode 100644 index 5e149bbcbc..b0da14ed37 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -129,6 +129,7 @@ module Models autoload :ResponseWithContinuationSchedule, 'generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb' autoload :PortFragment, 'generated/azure_mgmt_devtestlabs/models/port_fragment.rb' autoload :ComputeVmInstanceViewStatus, 'generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb' + autoload :Resource, 'generated/azure_mgmt_devtestlabs/models/resource.rb' autoload :CustomImagePropertiesFromVm, 'generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb' autoload :ResponseWithContinuationArmTemplate, 'generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb' autoload :ResponseWithContinuationLabVirtualMachine, 'generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb' diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/arm_templates.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/arm_templates.rb old mode 100755 new mode 100644 index aaf5ea770c..086775cee7 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/arm_templates.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/arm_templates.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifact_sources.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifact_sources.rb old mode 100755 new mode 100644 index e41a4fe3b5..dd5b1b1597 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifact_sources.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifact_sources.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifacts.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifacts.rb old mode 100755 new mode 100644 index 6beb88106d..90e0825b76 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifacts.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/artifacts.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/costs.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/costs.rb old mode 100755 new mode 100644 index ae5cdf9411..43d2e1155d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/costs.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/costs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/custom_images.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/custom_images.rb old mode 100755 new mode 100644 index 89da978808..ed342adbe8 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/custom_images.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/custom_images.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb old mode 100755 new mode 100644 index 4b665c145c..7619980a36 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/disks.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/disks.rb old mode 100755 new mode 100644 index 7279561011..0f7e8e27ab --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/disks.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/disks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/environments.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/environments.rb old mode 100755 new mode 100644 index dfed90a0ea..4beb3f1bed --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/environments.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/environments.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/formulas.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/formulas.rb old mode 100755 new mode 100644 index 649843e640..30c0681c72 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/formulas.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/formulas.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/gallery_images.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/gallery_images.rb old mode 100755 new mode 100644 index b0ac8148a4..3979807695 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/gallery_images.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/gallery_images.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/global_schedules.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/global_schedules.rb old mode 100755 new mode 100644 index 17def14254..48ea36d373 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/global_schedules.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/global_schedules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/labs.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/labs.rb old mode 100755 new mode 100644 index 739b251d04..b1d9fdcd84 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/labs.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/labs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb old mode 100755 new mode 100644 index 2fdd656bac..1fb3bb48db --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Schedules applicable to a virtual machine. The schedules may have been # defined on a VM or on lab level. # - class ApplicableSchedule < MsRestAzure::Resource + class ApplicableSchedule < Resource include MsRestAzure - include MsRest::JSONable # @return [Schedule] The auto-shutdown schedule, if one has been set at # the lab or lab resource level. attr_accessor :lab_vms_shutdown diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb old mode 100755 new mode 100644 index 2b2cbf5267..de302939a0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Schedules applicable to a virtual machine. The schedules may have been # defined on a VM or on lab level. # - class ApplicableScheduleFragment < MsRestAzure::Resource + class ApplicableScheduleFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [ScheduleFragment] The auto-shutdown schedule, if one has been # set at the lab or lab resource level. attr_accessor :lab_vms_shutdown diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb old mode 100755 new mode 100644 index c32d9ffa51..414a25db9b --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplyArtifactsRequest include MsRestAzure - include MsRest::JSONable # @return [Array] The list of artifacts to # apply. attr_accessor :artifacts diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template.rb old mode 100755 new mode 100644 index d5e7430844..10fe19ccf8 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # An Azure Resource Manager template. # - class ArmTemplate < MsRestAzure::Resource + class ArmTemplate < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The display name of the ARM template. attr_accessor :display_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb old mode 100755 new mode 100644 index b39b095d7f..35d95ae517 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArmTemplateInfo include MsRestAzure - include MsRest::JSONable # @return The template's contents. attr_accessor :template diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb old mode 100755 new mode 100644 index 3d55bbacdf..9ac12c27eb --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArmTemplateParameterProperties include MsRestAzure - include MsRest::JSONable # @return [String] The name of the template parameter. attr_accessor :name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact.rb old mode 100755 new mode 100644 index 486323b3df..e1c3518577 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # An artifact. # - class Artifact < MsRestAzure::Resource + class Artifact < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The artifact's title. attr_accessor :title diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb old mode 100755 new mode 100644 index c7121c0e7e..6ed1bb68b9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArtifactDeploymentStatusProperties include MsRestAzure - include MsRest::JSONable # @return [String] The deployment status of the artifact. attr_accessor :deployment_status diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb old mode 100755 new mode 100644 index 349fe32517..152f940881 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArtifactDeploymentStatusPropertiesFragment include MsRestAzure - include MsRest::JSONable # @return [String] The deployment status of the artifact. attr_accessor :deployment_status diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb old mode 100755 new mode 100644 index 882a591a1c..125877d0f3 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArtifactInstallProperties include MsRestAzure - include MsRest::JSONable # @return [String] The artifact's identifier. attr_accessor :artifact_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb old mode 100755 new mode 100644 index 95d9fa0e14..94be3b7e95 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArtifactInstallPropertiesFragment include MsRestAzure - include MsRest::JSONable # @return [String] The artifact's identifier. attr_accessor :artifact_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb old mode 100755 new mode 100644 index 8f553b00d9..f46654acf5 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArtifactParameterProperties include MsRestAzure - include MsRest::JSONable # @return [String] The name of the artifact parameter. attr_accessor :name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb old mode 100755 new mode 100644 index 482e4b44a3..0d84078167 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ArtifactParameterPropertiesFragment include MsRestAzure - include MsRest::JSONable # @return [String] The name of the artifact parameter. attr_accessor :name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source.rb old mode 100755 new mode 100644 index 4465aa5dcd..51a8f8a9bc --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Properties of an artifact source. # - class ArtifactSource < MsRestAzure::Resource + class ArtifactSource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The artifact source's display name. attr_accessor :display_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb old mode 100755 new mode 100644 index 9e84a29e23..43d39464e5 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Properties of an artifact source. # - class ArtifactSourceFragment < MsRestAzure::Resource + class ArtifactSourceFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The artifact source's display name. attr_accessor :display_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb old mode 100755 new mode 100644 index 255b7dae19..f9d61e1688 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AttachDiskProperties include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the Lab virtual machine to which # the disk is attached. attr_accessor :leased_by_lab_vm_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb old mode 100755 new mode 100644 index 6091aa6b9b..ee84c879a9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AttachNewDataDiskOptions include MsRestAzure - include MsRest::JSONable # @return [Integer] Size of the disk to be attached in GibiBytes. attr_accessor :disk_size_gi_b diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb old mode 100755 new mode 100644 index c6aae84426..d69a7426e0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BulkCreationParameters include MsRestAzure - include MsRest::JSONable # @return [Integer] The number of virtual machine instances to create. attr_accessor :instance_count diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb old mode 100755 new mode 100644 index 8576e55c5f..c0908e8d95 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputeDataDisk include MsRestAzure - include MsRest::JSONable # @return [String] Gets data disk name. attr_accessor :name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb old mode 100755 new mode 100644 index 38bfdeda6a..1ac082d738 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputeDataDiskFragment include MsRestAzure - include MsRest::JSONable # @return [String] Gets data disk name. attr_accessor :name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb old mode 100755 new mode 100644 index a16cece2c0..9a38bdeea1 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputeVmInstanceViewStatus include MsRestAzure - include MsRest::JSONable # @return [String] Gets the status Code. attr_accessor :code diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb old mode 100755 new mode 100644 index 44a82fd5ca..69dd12acab --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputeVmInstanceViewStatusFragment include MsRestAzure - include MsRest::JSONable # @return [String] Gets the status Code. attr_accessor :code diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb old mode 100755 new mode 100644 index 7c0e13fe78..10c0df0436 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputeVmProperties include MsRestAzure - include MsRest::JSONable # @return [Array] Gets the statuses of the # virtual machine. attr_accessor :statuses diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb old mode 100755 new mode 100644 index 4a6048de31..73230b0a36 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ComputeVmPropertiesFragment include MsRestAzure - include MsRest::JSONable # @return [Array] Gets the statuses # of the virtual machine. attr_accessor :statuses diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb old mode 100755 new mode 100644 index 04d6aba517..4324811396 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CostThresholdProperties include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the cost threshold item. attr_accessor :threshold_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb old mode 100755 new mode 100644 index 64369d9f57..cade1c8f28 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_type.rb old mode 100755 new mode 100644 index 9a7bf911ad..799908ecab --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/cost_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image.rb old mode 100755 new mode 100644 index 608567284f..506792e837 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A custom image. # - class CustomImage < MsRestAzure::Resource + class CustomImage < Resource include MsRestAzure - include MsRest::JSONable # @return [CustomImagePropertiesFromVm] The virtual machine from which # the image is to be created. attr_accessor :vm diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb old mode 100755 new mode 100644 index 4d9789b9e4..fdc4ae7a76 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb old mode 100755 new mode 100644 index 99cdde45aa..36191c9271 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CustomImagePropertiesCustom include MsRestAzure - include MsRest::JSONable # @return [String] The image name. attr_accessor :image_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb old mode 100755 new mode 100644 index 2658d8707f..336bf423a4 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CustomImagePropertiesFromVm include MsRestAzure - include MsRest::JSONable # @return [String] The source vm identifier. attr_accessor :source_vm_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb old mode 100755 new mode 100644 index 73f9fcecfc..c7648a9b2d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DataDiskProperties include MsRestAzure - include MsRest::JSONable # @return [AttachNewDataDiskOptions] Specifies options to attach a new # disk to the virtual machine. attr_accessor :attach_new_data_disk_options diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details.rb old mode 100755 new mode 100644 index 4fb25ce5f6..0b4272aabf --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DayDetails include MsRestAzure - include MsRest::JSONable # @return [String] The time of day the schedule will occur. attr_accessor :time diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details_fragment.rb old mode 100755 new mode 100644 index 9105246463..7cfc545da9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/day_details_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DayDetailsFragment include MsRestAzure - include MsRest::JSONable # @return [String] The time of day the schedule will occur. attr_accessor :time diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb old mode 100755 new mode 100644 index 15c3154b9b..daba42e908 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DetachDataDiskProperties include MsRestAzure - include MsRest::JSONable # @return [String] Specifies the disk resource ID to detach from virtual # machine. attr_accessor :existing_lab_disk_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb old mode 100755 new mode 100644 index 36cc237b4b..8041fd28cc --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DetachDiskProperties include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the Lab VM to which the disk is # attached. attr_accessor :leased_by_lab_vm_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/disk.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/disk.rb old mode 100755 new mode 100644 index 2b83aa1dfa..cf9bbc9fec --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/disk.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A Disk. # - class Disk < MsRestAzure::Resource + class Disk < Resource include MsRestAzure - include MsRest::JSONable # @return [StorageType] The storage type for the disk (i.e. Standard, # Premium). Possible values include: 'Standard', 'Premium' attr_accessor :disk_type diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb old mode 100755 new mode 100644 index 6ba643bb3e..cc8ae53363 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # An environment, which is essentially an ARM template deployment. # - class DtlEnvironment < MsRestAzure::Resource + class DtlEnvironment < Resource include MsRestAzure - include MsRest::JSONable # @return [EnvironmentDeploymentProperties] The deployment properties of # the environment. attr_accessor :deployment_properties diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/enable_status.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/enable_status.rb old mode 100755 new mode 100644 index e4ea81b58e..d52ed488b1 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/enable_status.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/enable_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb old mode 100755 new mode 100644 index 9124c66bd9..20df197172 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EnvironmentDeploymentProperties include MsRestAzure - include MsRest::JSONable # @return [String] The Azure Resource Manager template's identifier. attr_accessor :arm_template_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb old mode 100755 new mode 100644 index 812bd5aa7f..cf46d18026 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EvaluatePoliciesProperties include MsRestAzure - include MsRest::JSONable # @return [String] The fact name. attr_accessor :fact_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb old mode 100755 new mode 100644 index a2f8841241..1d30d39a10 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EvaluatePoliciesRequest include MsRestAzure - include MsRest::JSONable # @return [Array] Policies to evaluate. attr_accessor :policies diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb old mode 100755 new mode 100644 index 64eb91e8f1..9555a1311a --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EvaluatePoliciesResponse include MsRestAzure - include MsRest::JSONable # @return [Array] Results of evaluating a policy set. attr_accessor :results diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event.rb old mode 100755 new mode 100644 index d1793cecc3..472ac187ce --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Event include MsRestAzure - include MsRest::JSONable # @return [NotificationChannelEventType] The event type for which this # notification is enabled (i.e. AutoShutdown, Cost). Possible values # include: 'AutoShutdown', 'Cost' diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event_fragment.rb old mode 100755 new mode 100644 index 17e84f6f86..af3bed9b6c --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/event_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EventFragment include MsRestAzure - include MsRest::JSONable # @return [NotificationChannelEventType] The event type for which this # notification is enabled (i.e. AutoShutdown, Cost). Possible values # include: 'AutoShutdown', 'Cost' diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb old mode 100755 new mode 100644 index e3a174c887..ca848b6479 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExportResourceUsageParameters include MsRestAzure - include MsRest::JSONable # @return [String] The blob storage absolute sas uri with write # permission to the container which the usage data needs to be uploaded # to. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet.rb old mode 100755 new mode 100644 index 38bad89f09..cfb31f64ec --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExternalSubnet include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the identifier. attr_accessor :id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb old mode 100755 new mode 100644 index a842caf82b..9eb0576a5c --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExternalSubnetFragment include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the identifier. attr_accessor :id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb old mode 100755 new mode 100644 index faa6cdab5c..dc3991ab64 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula.rb old mode 100755 new mode 100644 index 185ce2be7e..573cd277ef --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # A formula for creating a VM, specifying an image base and other # parameters # - class Formula < MsRestAzure::Resource + class Formula < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The description of the formula. attr_accessor :description diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb old mode 100755 new mode 100644 index cb5a8bec16..3059ea4545 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FormulaPropertiesFromVm include MsRestAzure - include MsRest::JSONable # @return [String] The identifier of the VM from which a formula is to be # created. attr_accessor :lab_vm_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image.rb old mode 100755 new mode 100644 index 0bf46a004a..5a5abc1fb3 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A gallery image. # - class GalleryImage < MsRestAzure::Resource + class GalleryImage < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The author of the gallery image. attr_accessor :author diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb old mode 100755 new mode 100644 index a26f2e92c3..7b3149e735 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GalleryImageReference include MsRestAzure - include MsRest::JSONable # @return [String] The offer of the gallery image. attr_accessor :offer diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb old mode 100755 new mode 100644 index c0b8e48059..26878184ad --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GalleryImageReferenceFragment include MsRestAzure - include MsRest::JSONable # @return [String] The offer of the gallery image. attr_accessor :offer diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb old mode 100755 new mode 100644 index 8b39768c73..1a17eb0ea4 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GenerateArmTemplateRequest include MsRestAzure - include MsRest::JSONable # @return [String] The resource name of the virtual machine. attr_accessor :virtual_machine_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb old mode 100755 new mode 100644 index c3fd9eac77..55fcc92c50 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GenerateUploadUriParameter include MsRestAzure - include MsRest::JSONable # @return [String] The blob name of the upload URI. attr_accessor :blob_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb old mode 100755 new mode 100644 index 5a82367347..233f4c44f2 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GenerateUploadUriResponse include MsRestAzure - include MsRest::JSONable # @return [String] The upload URI for the VHD. attr_accessor :upload_uri diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb old mode 100755 new mode 100644 index 6ed82ad00a..4d36f2b5b4 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details.rb old mode 100755 new mode 100644 index cb7f5948f1..ba82ae9c22 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HourDetails include MsRestAzure - include MsRest::JSONable # @return [Integer] Minutes of the hour the schedule will run. attr_accessor :minute diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb old mode 100755 new mode 100644 index 1abbac20d7..a9034f73ee --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HourDetailsFragment include MsRestAzure - include MsRest::JSONable # @return [Integer] Minutes of the hour the schedule will run. attr_accessor :minute diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/identity_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/identity_properties.rb old mode 100755 new mode 100644 index ac5f9ac172..cda2d1ad31 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/identity_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/identity_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IdentityProperties include MsRestAzure - include MsRest::JSONable # @return [String] Managed identity. attr_accessor :type diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb old mode 100755 new mode 100644 index 508f4f726c..260d59451a --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class InboundNatRule include MsRestAzure - include MsRest::JSONable # @return [TransportProtocol] The transport protocol for the endpoint. # Possible values include: 'Tcp', 'Udp' attr_accessor :transport_protocol diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb old mode 100755 new mode 100644 index 6d66502c40..2598d7d0e0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class InboundNatRuleFragment include MsRestAzure - include MsRest::JSONable # @return [TransportProtocol] The transport protocol for the endpoint. # Possible values include: 'Tcp', 'Udp' attr_accessor :transport_protocol diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab.rb old mode 100755 new mode 100644 index 502669442f..86a83eae2e --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A lab. # - class Lab < MsRestAzure::Resource + class Lab < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The lab's default storage account. attr_accessor :default_storage_account diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost.rb old mode 100755 new mode 100644 index 9eaf8fe8d6..08188ab817 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A cost item. # - class LabCost < MsRestAzure::Resource + class LabCost < Resource include MsRestAzure - include MsRest::JSONable # @return [TargetCostProperties] The target cost properties attr_accessor :target_cost diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_details_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_details_properties.rb old mode 100755 new mode 100644 index 0aa14195ea..26995503ed --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_details_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_details_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LabCostDetailsProperties include MsRestAzure - include MsRest::JSONable # @return [DateTime] The date of the cost item. attr_accessor :date diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb old mode 100755 new mode 100644 index b145892ff0..3ba163ecf5 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LabCostSummaryProperties include MsRestAzure - include MsRest::JSONable # @return [Float] The cost component of the cost item. attr_accessor :estimated_lab_cost diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb old mode 100755 new mode 100644 index 92ede6e0d2..d9f4f36c65 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A lab. # - class LabFragment < MsRestAzure::Resource + class LabFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [StorageType] Type of storage used by the lab. It can be either # Premium or Standard. Default is Premium. Possible values include: # 'Standard', 'Premium' diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_resource_cost_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_resource_cost_properties.rb old mode 100755 new mode 100644 index 465df1f8e2..5ef15134d3 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_resource_cost_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_resource_cost_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LabResourceCostProperties include MsRestAzure - include MsRest::JSONable # @return [String] The name of the resource. attr_accessor :resourcename diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb old mode 100755 new mode 100644 index 05c6f91028..ef5993fdd9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LabVhd include MsRestAzure - include MsRest::JSONable # @return [String] The URI to the VHD. attr_accessor :id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb old mode 100755 new mode 100644 index a343ca0c84..7c2e227ec7 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A virtual machine. # - class LabVirtualMachine < MsRestAzure::Resource + class LabVirtualMachine < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The notes of the virtual machine. attr_accessor :notes diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb old mode 100755 new mode 100644 index b7bd78928d..061930cb3e --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LabVirtualMachineCreationParameter include MsRestAzure - include MsRest::JSONable # @return [BulkCreationParameters] The number of virtual machine # instances to create. attr_accessor :bulk_creation_parameters diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb old mode 100755 new mode 100644 index 7bc782dcfc..e121f42cbd --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A virtual machine. # - class LabVirtualMachineFragment < MsRestAzure::Resource + class LabVirtualMachineFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The notes of the virtual machine. attr_accessor :notes diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb old mode 100755 new mode 100644 index 7ac0c94ee4..568a54caf1 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LinuxOsInfo include MsRestAzure - include MsRest::JSONable # @return [LinuxOsState] The state of the Linux OS (i.e. # NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). Possible # values include: 'NonDeprovisioned', 'DeprovisionRequested', diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb old mode 100755 new mode 100644 index 7a4d780d53..75e0b009ea --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb old mode 100755 new mode 100644 index 3c2bf285ef..5aa4a89814 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NetworkInterfaceProperties include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the virtual network. attr_accessor :virtual_network_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb old mode 100755 new mode 100644 index 57d0750a45..95bbe2ba58 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NetworkInterfacePropertiesFragment include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the virtual network. attr_accessor :virtual_network_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel.rb old mode 100755 new mode 100644 index 95fb50c80f..43e92fcee5 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A notification. # - class NotificationChannel < MsRestAzure::Resource + class NotificationChannel < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The webhook URL to send notifications to. attr_accessor :web_hook_url diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb old mode 100755 new mode 100644 index e4ee3c7668..fb3f58ac6a --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_fragment.rb old mode 100755 new mode 100644 index b5a3031739..5c4c201e24 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A notification. # - class NotificationChannelFragment < MsRestAzure::Resource + class NotificationChannelFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The webhook URL to send notifications to. attr_accessor :web_hook_url diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings.rb old mode 100755 new mode 100644 index cc35838cab..c0ab016ae6 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NotificationSettings include MsRestAzure - include MsRest::JSONable # @return [NotificationStatus] If notifications are enabled for this # schedule (i.e. Enabled, Disabled). Possible values include: 'Disabled', # 'Enabled' diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb old mode 100755 new mode 100644 index aaec4efa0c..edf00d2bb3 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NotificationSettingsFragment include MsRestAzure - include MsRest::JSONable # @return [NotificationStatus] If notifications are enabled for this # schedule (i.e. Enabled, Disabled). Possible values include: 'Disabled', # 'Enabled' diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_status.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_status.rb old mode 100755 new mode 100644 index 149855c43c..eadb9fa673 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_status.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notification_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb old mode 100755 new mode 100644 index 7b28dfbae5..9abcb3cdf7 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NotifyParameters include MsRestAzure - include MsRest::JSONable # @return [NotificationChannelEventType] The type of event (i.e. # AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' attr_accessor :event_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameter_info.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameter_info.rb old mode 100755 new mode 100644 index 5467ff2533..46977aef8f --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameter_info.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameter_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ParameterInfo include MsRestAzure - include MsRest::JSONable # @return [String] The name of the artifact parameter. attr_accessor :name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb old mode 100755 new mode 100644 index 2d72ee1a43..067faffeee --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ParametersValueFileInfo include MsRestAzure - include MsRest::JSONable # @return [String] File name. attr_accessor :file_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb old mode 100755 new mode 100644 index 2761147ef3..f9d54deea9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PercentageCostThresholdProperties include MsRestAzure - include MsRest::JSONable # @return [Float] The cost threshold value. attr_accessor :threshold_value diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy.rb old mode 100755 new mode 100644 index a95101b51c..c47fddee3f --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A Policy. # - class Policy < MsRestAzure::Resource + class Policy < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The description of the policy. attr_accessor :description diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb old mode 100755 new mode 100644 index afcc628296..14f67731d2 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb old mode 100755 new mode 100644 index a1df073478..644c56f9d9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb old mode 100755 new mode 100644 index 83f39a7b65..543ee78f9f --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A Policy. # - class PolicyFragment < MsRestAzure::Resource + class PolicyFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The description of the policy. attr_accessor :description diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb old mode 100755 new mode 100644 index c955d0773a..37636ea9d9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PolicySetResult include MsRestAzure - include MsRest::JSONable # @return [Boolean] A value indicating whether this policy set evaluation # has discovered violations. attr_accessor :has_error diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_status.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_status.rb old mode 100755 new mode 100644 index 36d8e8eb39..2750d046bc --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_status.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_violation.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_violation.rb old mode 100755 new mode 100644 index 99008c5d9f..a3615091f0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_violation.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/policy_violation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PolicyViolation include MsRestAzure - include MsRest::JSONable # @return [String] The code of the policy violation. attr_accessor :code diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port.rb old mode 100755 new mode 100644 index 298d6e065b..98111cd4b0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Port include MsRestAzure - include MsRest::JSONable # @return [TransportProtocol] Protocol type of the port. Possible values # include: 'Tcp', 'Udp' attr_accessor :transport_protocol diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port_fragment.rb old mode 100755 new mode 100644 index a30fc131d1..e0569105cc --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/port_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PortFragment include MsRestAzure - include MsRest::JSONable # @return [TransportProtocol] Protocol type of the port. Possible values # include: 'Tcp', 'Udp' attr_accessor :transport_protocol diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb old mode 100755 new mode 100644 index 56e4a1a249..3ef0c8acd7 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb old mode 100755 new mode 100644 index d59ef046d3..302dd2369d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/resource.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/resource.rb new file mode 100644 index 0000000000..0d23706917 --- /dev/null +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/resource.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::ARM::DevTestLabs + module Models + # + # An Azure resource. + # + class Resource + + include MsRestAzure + + # @return [String] The identifier of the resource. + attr_accessor :id + + # @return [String] The name of the resource. + attr_accessor :name + + # @return [String] The type of the resource. + attr_accessor :type + + # @return [String] The location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] The tags of the resource. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb old mode 100755 new mode 100644 index fabb328282..604a3b6a86 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb old mode 100755 new mode 100644 index ad6af2ecbf..0fd3fb6017 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb old mode 100755 new mode 100644 index ee5dc2b3dd..4668d72d9d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb old mode 100755 new mode 100644 index e68d4115a4..0587ec1510 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_disk.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_disk.rb old mode 100755 new mode 100644 index d45ecba460..111c3f53ca --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_disk.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_disk.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_dtl_environment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_dtl_environment.rb old mode 100755 new mode 100644 index 7f328f814d..e3664c8c71 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_dtl_environment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_dtl_environment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb old mode 100755 new mode 100644 index 8ef520258e..dc0c8ec831 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb old mode 100755 new mode 100644 index 60bba90f3a..d074f24690 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb old mode 100755 new mode 100644 index 3a76e6f12d..cb15e26ace --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb old mode 100755 new mode 100644 index a153cea986..25083ec0ea --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb old mode 100755 new mode 100644 index 1ecc61c3a6..f621dfb765 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_notification_channel.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_notification_channel.rb old mode 100755 new mode 100644 index 778ee2e6a4..9970e5b6f9 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_notification_channel.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_notification_channel.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb old mode 100755 new mode 100644 index d0b95bffdc..965ecdf886 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb old mode 100755 new mode 100644 index 37b99b08dd..c768908ed8 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_secret.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_secret.rb old mode 100755 new mode 100644 index 296af25562..6c5909105d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_secret.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_secret.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_service_runner.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_service_runner.rb old mode 100755 new mode 100644 index 8599687f42..609e1d44bd --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_service_runner.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_service_runner.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_user.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_user.rb old mode 100755 new mode 100644 index a6d7c2dd61..c33984a557 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_user.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_user.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb old mode 100755 new mode 100644 index 8bfa202aab..8bc479b75d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb old mode 100755 new mode 100644 index e1ed753479..0c2d47370a --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RetargetScheduleProperties include MsRestAzure - include MsRest::JSONable # @return [String] The resource Id of the virtual machine on which the # schedule operates attr_accessor :current_resource_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule.rb old mode 100755 new mode 100644 index 44613180d7..3d4aac355a --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A schedule. # - class Schedule < MsRestAzure::Resource + class Schedule < Resource include MsRestAzure - include MsRest::JSONable # @return [EnableStatus] The status of the schedule (i.e. Enabled, # Disabled). Possible values include: 'Enabled', 'Disabled' attr_accessor :status diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb old mode 100755 new mode 100644 index 8d7445f038..bb0659e255 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A schedule. # - class ScheduleFragment < MsRestAzure::Resource + class ScheduleFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [EnableStatus] The status of the schedule (i.e. Enabled, # Disabled). Possible values include: 'Enabled', 'Disabled' attr_accessor :status diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/secret.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/secret.rb old mode 100755 new mode 100644 index 597b485ead..c4a60714d1 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/secret.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/secret.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A secret. # - class Secret < MsRestAzure::Resource + class Secret < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The value of the secret for secret creation. attr_accessor :value diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/service_runner.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/service_runner.rb old mode 100755 new mode 100644 index bbddff7d1f..14796a4624 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/service_runner.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/service_runner.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A container for a managed identity to execute DevTest lab services. # - class ServiceRunner < MsRestAzure::Resource + class ServiceRunner < Resource include MsRestAzure - include MsRest::JSONable # @return [IdentityProperties] The identity of the resource. attr_accessor :identity diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb old mode 100755 new mode 100644 index a6a7ea1ced..22a3f0c5c6 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SharedPublicIpAddressConfiguration include MsRestAzure - include MsRest::JSONable # @return [Array] The incoming NAT rules attr_accessor :inbound_nat_rules diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb old mode 100755 new mode 100644 index 4c73bed523..29104c6a5d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SharedPublicIpAddressConfigurationFragment include MsRestAzure - include MsRest::JSONable # @return [Array] The incoming NAT rules attr_accessor :inbound_nat_rules diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb old mode 100755 new mode 100644 index e6e71ae6ee..774ef1e69f --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -14,7 +14,6 @@ class ShutdownNotificationContent include MsRestAzure - include MsRest::JSONable # @return [String] The URL to skip auto-shutdown. attr_accessor :skip_url diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/source_control_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/source_control_type.rb old mode 100755 new mode 100644 index 7e771e89fd..7b3326c968 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/source_control_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/source_control_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/storage_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/storage_type.rb old mode 100755 new mode 100644 index fbd5fedcc6..abe4440abd --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/storage_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/storage_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet.rb old mode 100755 new mode 100644 index 685b198140..db8216a2f8 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Subnet include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the subnet. attr_accessor :resource_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb old mode 100755 new mode 100644 index 64e311a5fe..3265c7b1c0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SubnetFragment include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the subnet. attr_accessor :resource_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override.rb old mode 100755 new mode 100644 index ef142f94ef..9175bb2f51 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SubnetOverride include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the subnet. attr_accessor :resource_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb old mode 100755 new mode 100644 index 7bcc9caba4..1be29d7e5c --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SubnetOverrideFragment include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the subnet. attr_accessor :resource_id diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb old mode 100755 new mode 100644 index 609d6b1e42..ccd7a861e5 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SubnetSharedPublicIpAddressConfiguration include MsRestAzure - include MsRest::JSONable # @return [Array] Backend ports that virtual machines on this # subnet are allowed to expose attr_accessor :allowed_ports diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb old mode 100755 new mode 100644 index 44740ac36a..760ffb4d44 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SubnetSharedPublicIpAddressConfigurationFragment include MsRestAzure - include MsRest::JSONable # @return [Array] Backend ports that virtual machines on # this subnet are allowed to expose attr_accessor :allowed_ports diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb old mode 100755 new mode 100644 index 56f87e36ad..0f90cdae42 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TargetCostProperties include MsRestAzure - include MsRest::JSONable # @return [TargetCostStatus] Target cost status. Possible values include: # 'Enabled', 'Disabled' attr_accessor :status diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb old mode 100755 new mode 100644 index 5d056fae9f..41854eae85 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb old mode 100755 new mode 100644 index e3190675a2..e3434dc7e8 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb old mode 100755 new mode 100644 index c3f5f9682e..e54d3d84e6 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user.rb old mode 100755 new mode 100644 index cff63a2ca2..0d4ec6e69f --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Profile of a lab user. # - class User < MsRestAzure::Resource + class User < Resource include MsRestAzure - include MsRest::JSONable # @return [UserIdentity] The identity of the user. attr_accessor :identity diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_fragment.rb old mode 100755 new mode 100644 index 99b40a7bb0..cfdfeb4e3b --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Profile of a lab user. # - class UserFragment < MsRestAzure::Resource + class UserFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [UserIdentityFragment] The identity of the user. attr_accessor :identity diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity.rb old mode 100755 new mode 100644 index ae67608d89..4b88c4e410 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UserIdentity include MsRestAzure - include MsRest::JSONable # @return [String] Set to the principal name / UPN of the client JWT # making the request. attr_accessor :principal_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb old mode 100755 new mode 100644 index 15f3f2bf9f..8d4c664085 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UserIdentityFragment include MsRestAzure - include MsRest::JSONable # @return [String] Set to the principal name / UPN of the client JWT # making the request. attr_accessor :principal_name diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb old mode 100755 new mode 100644 index 05b2f5b653..474a9a9146 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UserSecretStore include MsRestAzure - include MsRest::JSONable # @return [String] The URI of the user's Key vault. attr_accessor :key_vault_uri diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb old mode 100755 new mode 100644 index 26bbb28b26..44bcd2a8ef --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UserSecretStoreFragment include MsRestAzure - include MsRest::JSONable # @return [String] The URI of the user's Key vault. attr_accessor :key_vault_uri diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb old mode 100755 new mode 100644 index 410e90f4c8..d6e6746373 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network.rb old mode 100755 new mode 100644 index 2fcc69c0c6..4d5c2863a7 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A virtual network. # - class VirtualNetwork < MsRestAzure::Resource + class VirtualNetwork < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] The allowed subnets of the virtual network. attr_accessor :allowed_subnets diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb old mode 100755 new mode 100644 index 5352ed253f..86c6fdf81d --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A virtual network. # - class VirtualNetworkFragment < MsRestAzure::Resource + class VirtualNetworkFragment < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] The allowed subnets of the virtual # network. attr_accessor :allowed_subnets diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details.rb old mode 100755 new mode 100644 index 602d089a82..771516b9c5 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WeekDetails include MsRestAzure - include MsRest::JSONable # @return [Array] The days of the week for which the schedule is # set (e.g. Sunday, Monday, Tuesday, etc.). attr_accessor :weekdays diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb old mode 100755 new mode 100644 index 804e61226d..a8a31ba3fb --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WeekDetailsFragment include MsRestAzure - include MsRest::JSONable # @return [Array] The days of the week for which the schedule is # set (e.g. Sunday, Monday, Tuesday, etc.). attr_accessor :weekdays diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb old mode 100755 new mode 100644 index 99e12342f4..b6d17d0afd --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WindowsOsInfo include MsRestAzure - include MsRest::JSONable # @return [WindowsOsState] The state of the Windows OS (i.e. # NonSysprepped, SysprepRequested, SysprepApplied). Possible values # include: 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb old mode 100755 new mode 100644 index 6696b6548d..1461baf97b --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/module_definition.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/module_definition.rb old mode 100755 new mode 100644 index dd15a510b5..4ee0add0fe --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/module_definition.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/notification_channels.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/notification_channels.rb old mode 100755 new mode 100644 index 71a1194308..15dfba38e7 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/notification_channels.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/notification_channels.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policies.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policies.rb old mode 100755 new mode 100644 index 12fbb505cd..a7f158b006 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policies.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policies.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policy_sets.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policy_sets.rb old mode 100755 new mode 100644 index 275603653f..f5b108b2d0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policy_sets.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/policy_sets.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/schedules.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/schedules.rb old mode 100755 new mode 100644 index 5b9655de23..31a850b7f7 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/schedules.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/schedules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/secrets.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/secrets.rb old mode 100755 new mode 100644 index 7104b58fe1..3b3bb002b8 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/secrets.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/secrets.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/service_runners.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/service_runners.rb old mode 100755 new mode 100644 index fd2f7da4fe..95701dfff3 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/service_runners.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/service_runners.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/users.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/users.rb old mode 100755 new mode 100644 index ddea7e5b50..98e8f897ce --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/users.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/users.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/version.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/version.rb old mode 100755 new mode 100644 index cb3989e37b..0589504ce0 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/version.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::DevTestLabs - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machine_schedules.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machine_schedules.rb old mode 100755 new mode 100644 index 690202aeb0..f48d1e85bd --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machine_schedules.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machine_schedules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machines.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machines.rb old mode 100755 new mode 100644 index 78db84cff1..0f310f0059 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machines.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_machines.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_networks.rb b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_networks.rb old mode 100755 new mode 100644 index e482bf124c..bbc5bc8103 --- a/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_networks.rb +++ b/management/azure_mgmt_devtestlabs/lib/generated/azure_mgmt_devtestlabs/virtual_networks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/azure_mgmt_dns.gemspec b/management/azure_mgmt_dns/azure_mgmt_dns.gemspec index 329ded050f..583c1e87b9 100644 --- a/management/azure_mgmt_dns/azure_mgmt_dns.gemspec +++ b/management/azure_mgmt_dns/azure_mgmt_dns.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns.rb old mode 100755 new mode 100644 index 4b66859345..ffb6fecfc8 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -37,6 +37,7 @@ module Models autoload :AaaaRecord, 'generated/azure_mgmt_dns/models/aaaa_record.rb' autoload :ZoneListResult, 'generated/azure_mgmt_dns/models/zone_list_result.rb' autoload :TxtRecord, 'generated/azure_mgmt_dns/models/txt_record.rb' + autoload :Resource, 'generated/azure_mgmt_dns/models/resource.rb' autoload :NsRecord, 'generated/azure_mgmt_dns/models/ns_record.rb' autoload :SoaRecord, 'generated/azure_mgmt_dns/models/soa_record.rb' autoload :Zone, 'generated/azure_mgmt_dns/models/zone.rb' diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/dns_management_client.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/dns_management_client.rb old mode 100755 new mode 100644 index 44dbd4c9e4..85419e0e23 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/dns_management_client.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/dns_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/aaaa_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/aaaa_record.rb old mode 100755 new mode 100644 index 600fc80170..ab972ad39d --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/aaaa_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/aaaa_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AaaaRecord include MsRestAzure - include MsRest::JSONable # @return [String] The IPv6 address of this AAAA record. attr_accessor :ipv6address diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/arecord.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/arecord.rb old mode 100755 new mode 100644 index d54f3c0f16..e5436eee56 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/arecord.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/arecord.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ARecord include MsRestAzure - include MsRest::JSONable # @return [String] The IPv4 address of this A record. attr_accessor :ipv4address diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/cname_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/cname_record.rb old mode 100755 new mode 100644 index ebb1c2c095..226b100129 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/cname_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/cname_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CnameRecord include MsRestAzure - include MsRest::JSONable # @return [String] The canonical name for this CNAME record. attr_accessor :cname diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/http_status_code.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/http_status_code.rb old mode 100755 new mode 100644 index 0af5b66e6b..c5916d4d27 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/http_status_code.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/http_status_code.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/mx_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/mx_record.rb old mode 100755 new mode 100644 index fa4fc96ca0..5ecf455d6c --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/mx_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/mx_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MxRecord include MsRestAzure - include MsRest::JSONable # @return [Integer] The preference value for this MX record. attr_accessor :preference diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ns_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ns_record.rb old mode 100755 new mode 100644 index d7bf35f737..e2db628747 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ns_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ns_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NsRecord include MsRestAzure - include MsRest::JSONable # @return [String] The name server name for this NS record. attr_accessor :nsdname diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/operation_status.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/operation_status.rb old mode 100755 new mode 100644 index 336fd68de8..2b120b63bc --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/operation_status.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/operation_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ptr_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ptr_record.rb old mode 100755 new mode 100644 index 9f7d95ff91..663095e5bb --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ptr_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/ptr_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PtrRecord include MsRestAzure - include MsRest::JSONable # @return [String] The PTR target domain name for this PTR record. attr_accessor :ptrdname diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set.rb old mode 100755 new mode 100644 index 718dafa0b0..6c249ed419 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RecordSet include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the record set. attr_accessor :id diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_list_result.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_list_result.rb old mode 100755 new mode 100644 index 993c6be04f..63127366ad --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_list_result.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_update_parameters.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_update_parameters.rb old mode 100755 new mode 100644 index d4cd8880e3..c08f7cbdf9 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_update_parameters.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_set_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecordSetUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [RecordSet] Specifies information about the record set being # updated. attr_accessor :record_set diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_type.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_type.rb old mode 100755 new mode 100644 index 3171575a80..89a9c6ca67 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_type.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/record_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/resource.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/resource.rb new file mode 100644 index 0000000000..b18f75057f --- /dev/null +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/resource.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::ARM::Dns + module Models + # + # Model object. + # + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + # @return [String] Resource location. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/soa_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/soa_record.rb old mode 100755 new mode 100644 index 39b7e3c8b1..3c6958024e --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/soa_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/soa_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SoaRecord include MsRestAzure - include MsRest::JSONable # @return [String] The domain name of the authoritative name server for # this SOA record. attr_accessor :host diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/srv_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/srv_record.rb old mode 100755 new mode 100644 index f6f73e1adc..6f6c9f51f7 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/srv_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/srv_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SrvRecord include MsRestAzure - include MsRest::JSONable # @return [Integer] The priority value for this SRV record. attr_accessor :priority diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/txt_record.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/txt_record.rb old mode 100755 new mode 100644 index e727cfb743..9e8a8b7b4f --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/txt_record.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/txt_record.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TxtRecord include MsRestAzure - include MsRest::JSONable # @return [Array] The text value of this TXT record. attr_accessor :value diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone.rb old mode 100755 new mode 100644 index 4fddbfb1de..1fb7bb1c67 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes a DNS zone. # - class Zone < MsRestAzure::Resource + class Zone < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The etag of the zone. attr_accessor :etag diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_delete_result.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_delete_result.rb old mode 100755 new mode 100644 index 579b8abcc6..8fa7b1db1f --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_delete_result.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_delete_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ZoneDeleteResult include MsRestAzure - include MsRest::JSONable # @return [String] Users can perform a Get on Azure-AsyncOperation to get # the status of their delete Zone operations. attr_accessor :azure_async_operation diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_list_result.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_list_result.rb old mode 100755 new mode 100644 index 4abf3cd8d9..647b1e7751 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_list_result.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/models/zone_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/module_definition.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/module_definition.rb old mode 100755 new mode 100644 index 70d99d2243..f830d92548 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/module_definition.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/record_sets.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/record_sets.rb old mode 100755 new mode 100644 index 9b0eae3eaa..ce76debf46 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/record_sets.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/record_sets.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/version.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/version.rb old mode 100755 new mode 100644 index ead779d8ca..37fc763bee --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/version.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Dns - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/zones.rb b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/zones.rb old mode 100755 new mode 100644 index 34dde1b68d..a7515431c8 --- a/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/zones.rb +++ b/management/azure_mgmt_dns/lib/generated/azure_mgmt_dns/zones.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_grid/.rspec b/management/azure_mgmt_event_grid/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_event_grid/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_event_grid/LICENSE.txt b/management/azure_mgmt_event_grid/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_event_grid/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_event_grid/Rakefile b/management/azure_mgmt_event_grid/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_event_grid/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_event_grid/azure_mgmt_event_grid.gemspec b/management/azure_mgmt_event_grid/azure_mgmt_event_grid.gemspec new file mode 100644 index 0000000000..77da78a9c2 --- /dev/null +++ b/management/azure_mgmt_event_grid/azure_mgmt_event_grid.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_event_grid/module_definition' +require 'generated/azure_mgmt_event_grid/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_event_grid' + spec.version = Azure::ARM::EventGrid::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Event Grid Services Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Event Grid.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_event_grid/lib/azure_mgmt_event_grid.rb b/management/azure_mgmt_event_grid/lib/azure_mgmt_event_grid.rb new file mode 100644 index 0000000000..011666800f --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/azure_mgmt_event_grid.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_event_grid' +require 'generated/azure_mgmt_event_grid' diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid.rb new file mode 100644 index 0000000000..8a398ded07 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid.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. + +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 'generated/azure_mgmt_event_grid/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::EventGrid + autoload :EventSubscriptions, 'generated/azure_mgmt_event_grid/event_subscriptions.rb' + autoload :Operations, 'generated/azure_mgmt_event_grid/operations.rb' + autoload :Topics, 'generated/azure_mgmt_event_grid/topics.rb' + autoload :TopicTypes, 'generated/azure_mgmt_event_grid/topic_types.rb' + autoload :EventGridManagementClient, 'generated/azure_mgmt_event_grid/event_grid_management_client.rb' + + module Models + autoload :Operation, 'generated/azure_mgmt_event_grid/models/operation.rb' + autoload :OperationsListResult, 'generated/azure_mgmt_event_grid/models/operations_list_result.rb' + autoload :EventSubscriptionFilter, 'generated/azure_mgmt_event_grid/models/event_subscription_filter.rb' + autoload :EventSubscriptionDestination, 'generated/azure_mgmt_event_grid/models/event_subscription_destination.rb' + autoload :OperationInfo, 'generated/azure_mgmt_event_grid/models/operation_info.rb' + autoload :EventTypesListResult, 'generated/azure_mgmt_event_grid/models/event_types_list_result.rb' + autoload :TopicSharedAccessKeys, 'generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb' + autoload :EventSubscriptionUpdateParameters, 'generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb' + autoload :Resource, 'generated/azure_mgmt_event_grid/models/resource.rb' + autoload :EventSubscriptionsListResult, 'generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb' + autoload :EventSubscriptionFullUrl, 'generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb' + autoload :TopicTypesListResult, 'generated/azure_mgmt_event_grid/models/topic_types_list_result.rb' + autoload :TopicRegenerateKeyRequest, 'generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb' + autoload :TopicsListResult, 'generated/azure_mgmt_event_grid/models/topics_list_result.rb' + autoload :WebHookEventSubscriptionDestination, 'generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb' + autoload :EventHubEventSubscriptionDestination, 'generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb' + autoload :EventSubscription, 'generated/azure_mgmt_event_grid/models/event_subscription.rb' + autoload :TrackedResource, 'generated/azure_mgmt_event_grid/models/tracked_resource.rb' + autoload :Topic, 'generated/azure_mgmt_event_grid/models/topic.rb' + autoload :EventType, 'generated/azure_mgmt_event_grid/models/event_type.rb' + autoload :TopicTypeInfo, 'generated/azure_mgmt_event_grid/models/topic_type_info.rb' + autoload :EventSubscriptionProvisioningState, 'generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb' + autoload :OperationOrigin, 'generated/azure_mgmt_event_grid/models/operation_origin.rb' + autoload :TopicProvisioningState, 'generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb' + autoload :ResourceRegionType, 'generated/azure_mgmt_event_grid/models/resource_region_type.rb' + autoload :TopicTypeProvisioningState, 'generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb' + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/event_grid_management_client.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/event_grid_management_client.rb new file mode 100644 index 0000000000..e1418f4a2c --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/event_grid_management_client.rb @@ -0,0 +1,143 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + # + # A service client - single point of access to the REST API. + # + class EventGridManagementClient < 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] Subscription credentials that uniquely identify a + # Microsoft Azure subscription. The subscription ID forms part of the URI + # for every service call. + attr_accessor :subscription_id + + # @return [String] Version of the API to be used with the client request. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [EventSubscriptions] event_subscriptions + attr_reader :event_subscriptions + + # @return [Operations] operations + attr_reader :operations + + # @return [Topics] topics + attr_reader :topics + + # @return [TopicTypes] topic_types + attr_reader :topic_types + + # + # Creates initializes a new instance of the EventGridManagementClient 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 + + @event_subscriptions = EventSubscriptions.new(self) + @operations = Operations.new(self) + @topics = Topics.new(self) + @topic_types = TopicTypes.new(self) + @api_version = '2017-09-15-preview' + @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_event_grid' + if defined? Azure::ARM::EventGrid::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::EventGrid::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/event_subscriptions.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/event_subscriptions.rb new file mode 100644 index 0000000000..43f5e323ac --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/event_subscriptions.rb @@ -0,0 +1,1803 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + # + # Azure EventGrid Management Client + # + class EventSubscriptions + include MsRestAzure + + # + # Creates and initializes a new instance of the EventSubscriptions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [EventGridManagementClient] reference to the EventGridManagementClient + attr_reader :client + + # + # Get an event subscription + # + # Get properties of an event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscription] operation results. + # + def get(scope, event_subscription_name, custom_headers = nil) + response = get_async(scope, event_subscription_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get an event subscription + # + # Get properties of an event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event 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 get_with_http_info(scope, event_subscription_name, custom_headers = nil) + get_async(scope, event_subscription_name, custom_headers).value! + end + + # + # Get an event subscription + # + # Get properties of an event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event 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 get_async(scope, event_subscription_name, custom_headers = nil) + fail ArgumentError, 'scope is nil' if scope.nil? + fail ArgumentError, 'event_subscription_name is nil' if event_subscription_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 = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'eventSubscriptionName' => event_subscription_name}, + skip_encoding_path_params: {'scope' => scope}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::EventSubscription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an event subscription + # + # Asynchronously creates a new event subscription to the specified scope. + # Existing event subscriptions cannot be updated with this API and should + # instead use the Update event subscription API. + # + # @param scope [String] The scope of the resource to which the event + # subscription needs to be created. The scope can be a subscription, or a + # resource group, or a top level resource belonging to a resource provider + # namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created. Event subscription names must be between 3 and 64 characters in + # length and use alphanumeric letters only. + # @param event_subscription_info [EventSubscription] Event subscription + # properties containing the destination and filter information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscription] operation results. + # + def create(scope, event_subscription_name, event_subscription_info, custom_headers = nil) + response = create_async(scope, event_subscription_name, event_subscription_info, custom_headers).value! + response.body unless response.nil? + end + + # + # @param scope [String] The scope of the resource to which the event + # subscription needs to be created. The scope can be a subscription, or a + # resource group, or a top level resource belonging to a resource provider + # namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created. Event subscription names must be between 3 and 64 characters in + # length and use alphanumeric letters only. + # @param event_subscription_info [EventSubscription] Event subscription + # properties containing the destination and filter information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(scope, event_subscription_name, event_subscription_info, custom_headers = nil) + # Send request + promise = begin_create_async(scope, event_subscription_name, event_subscription_info, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::EventGrid::Models::EventSubscription.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 + + # + # Delete an event subscription + # + # Delete an existing event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(scope, event_subscription_name, custom_headers = nil) + response = delete_async(scope, event_subscription_name, custom_headers).value! + nil + end + + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(scope, event_subscription_name, custom_headers = nil) + # Send request + promise = begin_delete_async(scope, event_subscription_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Update an event subscription + # + # Asynchronously updates an existing event subscription. + # + # @param scope [String] The scope of existing event subscription. The scope can + # be a subscription, or a resource group, or a top level resource belonging to + # a resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created + # @param event_subscription_update_parameters + # [EventSubscriptionUpdateParameters] Updated event subscription information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscription] operation results. + # + def update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers = nil) + response = update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param scope [String] The scope of existing event subscription. The scope can + # be a subscription, or a resource group, or a top level resource belonging to + # a resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created + # @param event_subscription_update_parameters + # [EventSubscriptionUpdateParameters] Updated event subscription information + # @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(scope, event_subscription_name, event_subscription_update_parameters, custom_headers = nil) + # Send request + promise = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::EventGrid::Models::EventSubscription.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 + + # + # Get full URL of an event subscription + # + # Get the full endpoint URL for an event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionFullUrl] operation results. + # + def get_full_url(scope, event_subscription_name, custom_headers = nil) + response = get_full_url_async(scope, event_subscription_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get full URL of an event subscription + # + # Get the full endpoint URL for an event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event 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 get_full_url_with_http_info(scope, event_subscription_name, custom_headers = nil) + get_full_url_async(scope, event_subscription_name, custom_headers).value! + end + + # + # Get full URL of an event subscription + # + # Get the full endpoint URL for an event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event 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 get_full_url_async(scope, event_subscription_name, custom_headers = nil) + fail ArgumentError, 'scope is nil' if scope.nil? + fail ArgumentError, 'event_subscription_name is nil' if event_subscription_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 = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'eventSubscriptionName' => event_subscription_name}, + skip_encoding_path_params: {'scope' => scope}, + 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::ARM::EventGrid::Models::EventSubscriptionFullUrl.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an aggregated list of all global event subscriptions under an Azure + # subscription + # + # List all aggregated global event subscriptions under a specific Azure + # subscription + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_global_by_subscription(custom_headers = nil) + response = list_global_by_subscription_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Get an aggregated list of all global event subscriptions under an Azure + # subscription + # + # List all aggregated global event subscriptions under a specific 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_global_by_subscription_with_http_info(custom_headers = nil) + list_global_by_subscription_async(custom_headers).value! + end + + # + # Get an aggregated list of all global event subscriptions under an Azure + # subscription + # + # List all aggregated global event subscriptions under a specific 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_global_by_subscription_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions' + + 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::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 global event subscriptions for a topic type + # + # List all global event subscriptions under an Azure subscription for a topic + # type. + # + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers = nil) + response = list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List all global event subscriptions for a topic type + # + # List all global event subscriptions under an Azure subscription for a topic + # type. + # + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_global_by_subscription_for_topic_type_with_http_info(topic_type_name, custom_headers = nil) + list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers).value! + end + + # + # List all global event subscriptions for a topic type + # + # List all global event subscriptions under an Azure subscription for a topic + # type. + # + # @param topic_type_name [String] Name of the topic type + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'topic_type_name is nil' if topic_type_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}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'topicTypeName' => topic_type_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::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 global event subscriptions under an Azure subscription and resource + # group + # + # List all global event subscriptions under a specific Azure subscription and + # resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_global_by_resource_group(resource_group_name, custom_headers = nil) + response = list_global_by_resource_group_async(resource_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List all global event subscriptions under an Azure subscription and resource + # group + # + # List all global event subscriptions under a specific Azure subscription and + # resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's 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_global_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) + list_global_by_resource_group_async(resource_group_name, custom_headers).value! + end + + # + # List all global event subscriptions under an Azure subscription and resource + # group + # + # List all global event subscriptions under a specific Azure subscription and + # resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's 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_global_by_resource_group_async(resource_group_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, '@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.EventGrid/eventSubscriptions' + + 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}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 global event subscriptions under a resource group for a topic type + # + # List all global event subscriptions under a resource group for a specific + # topic type. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_global_by_resource_group_for_topic_type(resource_group_name, topic_type_name, custom_headers = nil) + response = list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List all global event subscriptions under a resource group for a topic type + # + # List all global event subscriptions under a resource group for a specific + # topic type. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_global_by_resource_group_for_topic_type_with_http_info(resource_group_name, topic_type_name, custom_headers = nil) + list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers).value! + end + + # + # List all global event subscriptions under a resource group for a topic type + # + # List all global event subscriptions under a resource group for a specific + # topic type. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_type_name [String] Name of the topic type + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_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, 'topic_type_name is nil' if topic_type_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.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions' + + 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,'topicTypeName' => topic_type_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::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 regional event subscriptions under an Azure subscription + # + # List all event subscriptions from the given location under a specific Azure + # subscription + # + # @param location [String] Name of the location + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_regional_by_subscription(location, custom_headers = nil) + response = list_regional_by_subscription_async(location, custom_headers).value! + response.body unless response.nil? + end + + # + # List all regional event subscriptions under an Azure subscription + # + # List all event subscriptions from the given location under a specific Azure + # subscription + # + # @param location [String] Name of the location + # @param custom_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_regional_by_subscription_with_http_info(location, custom_headers = nil) + list_regional_by_subscription_async(location, custom_headers).value! + end + + # + # List all regional event subscriptions under an Azure subscription + # + # List all event subscriptions from the given location under a specific Azure + # subscription + # + # @param location [String] Name of the location + # @param [Hash{String => String}] 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_regional_by_subscription_async(location, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'location' => location}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 regional event subscriptions under an Azure subscription and + # resource group + # + # List all event subscriptions from the given location under a specific Azure + # subscription and resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param location [String] Name of the location + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_regional_by_resource_group(resource_group_name, location, custom_headers = nil) + response = list_regional_by_resource_group_async(resource_group_name, location, custom_headers).value! + response.body unless response.nil? + end + + # + # List all regional event subscriptions under an Azure subscription and + # resource group + # + # List all event subscriptions from the given location under a specific Azure + # subscription and resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param location [String] Name of the location + # @param custom_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_regional_by_resource_group_with_http_info(resource_group_name, location, custom_headers = nil) + list_regional_by_resource_group_async(resource_group_name, location, custom_headers).value! + end + + # + # List all regional event subscriptions under an Azure subscription and + # resource group + # + # List all event subscriptions from the given location under a specific Azure + # subscription and resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param location [String] Name of the location + # @param [Hash{String => String}] 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_regional_by_resource_group_async(resource_group_name, location, 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, 'location is nil' if location.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.EventGrid/locations/{location}/eventSubscriptions' + + 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,'location' => location}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 regional event subscriptions under an Azure subscription for a topic + # type + # + # List all event subscriptions from the given location under a specific Azure + # subscription and topic type. + # + # @param location [String] Name of the location + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_regional_by_subscription_for_topic_type(location, topic_type_name, custom_headers = nil) + response = list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List all regional event subscriptions under an Azure subscription for a topic + # type + # + # List all event subscriptions from the given location under a specific Azure + # subscription and topic type. + # + # @param location [String] Name of the location + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_regional_by_subscription_for_topic_type_with_http_info(location, topic_type_name, custom_headers = nil) + list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers).value! + end + + # + # List all regional event subscriptions under an Azure subscription for a topic + # type + # + # List all event subscriptions from the given location under a specific Azure + # subscription and topic type. + # + # @param location [String] Name of the location + # @param topic_type_name [String] Name of the topic type + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, 'topic_type_name is nil' if topic_type_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}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'location' => location,'topicTypeName' => topic_type_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::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 regional event subscriptions under an Azure subscription and + # resource group for a topic type + # + # List all event subscriptions from the given location under a specific Azure + # subscription and resource group and topic type + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param location [String] Name of the location + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, custom_headers = nil) + response = list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List all regional event subscriptions under an Azure subscription and + # resource group for a topic type + # + # List all event subscriptions from the given location under a specific Azure + # subscription and resource group and topic type + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param location [String] Name of the location + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_regional_by_resource_group_for_topic_type_with_http_info(resource_group_name, location, topic_type_name, custom_headers = nil) + list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers).value! + end + + # + # List all regional event subscriptions under an Azure subscription and + # resource group for a topic type + # + # List all event subscriptions from the given location under a specific Azure + # subscription and resource group and topic type + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param location [String] Name of the location + # @param topic_type_name [String] Name of the topic type + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_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, 'location is nil' if location.nil? + fail ArgumentError, 'topic_type_name is nil' if topic_type_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.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions' + + 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,'location' => location,'topicTypeName' => topic_type_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::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 event subscriptions for a specific topic + # + # List all event subscriptions that have been created for a specific topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param provider_namespace [String] Namespace of the provider of the topic + # @param resource_type_name [String] Name of the resource type + # @param resource_name [String] Name of the resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscriptionsListResult] operation results. + # + def list_by_resource(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers = nil) + response = list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List all event subscriptions for a specific topic + # + # List all event subscriptions that have been created for a specific topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param provider_namespace [String] Namespace of the provider of the topic + # @param resource_type_name [String] Name of the resource type + # @param resource_name [String] Name of the resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers = nil) + list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers).value! + end + + # + # List all event subscriptions for a specific topic + # + # List all event subscriptions that have been created for a specific topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param provider_namespace [String] Namespace of the provider of the topic + # @param resource_type_name [String] Name of the resource type + # @param resource_name [String] Name of the resource + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_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, 'provider_namespace is nil' if provider_namespace.nil? + fail ArgumentError, 'resource_type_name is nil' if resource_type_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_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/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions' + + 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,'providerNamespace' => provider_namespace,'resourceTypeName' => resource_type_name,'resourceName' => resource_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::ARM::EventGrid::Models::EventSubscriptionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an event subscription + # + # Asynchronously creates a new event subscription to the specified scope. + # Existing event subscriptions cannot be updated with this API and should + # instead use the Update event subscription API. + # + # @param scope [String] The scope of the resource to which the event + # subscription needs to be created. The scope can be a subscription, or a + # resource group, or a top level resource belonging to a resource provider + # namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created. Event subscription names must be between 3 and 64 characters in + # length and use alphanumeric letters only. + # @param event_subscription_info [EventSubscription] Event subscription + # properties containing the destination and filter information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscription] operation results. + # + def begin_create(scope, event_subscription_name, event_subscription_info, custom_headers = nil) + response = begin_create_async(scope, event_subscription_name, event_subscription_info, custom_headers).value! + response.body unless response.nil? + end + + # + # Create an event subscription + # + # Asynchronously creates a new event subscription to the specified scope. + # Existing event subscriptions cannot be updated with this API and should + # instead use the Update event subscription API. + # + # @param scope [String] The scope of the resource to which the event + # subscription needs to be created. The scope can be a subscription, or a + # resource group, or a top level resource belonging to a resource provider + # namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created. Event subscription names must be between 3 and 64 characters in + # length and use alphanumeric letters only. + # @param event_subscription_info [EventSubscription] Event subscription + # properties containing the destination and filter information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers = nil) + begin_create_async(scope, event_subscription_name, event_subscription_info, custom_headers).value! + end + + # + # Create an event subscription + # + # Asynchronously creates a new event subscription to the specified scope. + # Existing event subscriptions cannot be updated with this API and should + # instead use the Update event subscription API. + # + # @param scope [String] The scope of the resource to which the event + # subscription needs to be created. The scope can be a subscription, or a + # resource group, or a top level resource belonging to a resource provider + # namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created. Event subscription names must be between 3 and 64 characters in + # length and use alphanumeric letters only. + # @param event_subscription_info [EventSubscription] Event subscription + # properties containing the destination and filter information + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(scope, event_subscription_name, event_subscription_info, custom_headers = nil) + fail ArgumentError, 'scope is nil' if scope.nil? + fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? + fail ArgumentError, 'event_subscription_info is nil' if event_subscription_info.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::EventGrid::Models::EventSubscription.mapper() + request_content = @client.serialize(request_mapper, event_subscription_info) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'eventSubscriptionName' => event_subscription_name}, + skip_encoding_path_params: {'scope' => scope}, + 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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::EventSubscription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an event subscription + # + # Delete an existing event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(scope, event_subscription_name, custom_headers = nil) + response = begin_delete_async(scope, event_subscription_name, custom_headers).value! + nil + end + + # + # Delete an event subscription + # + # Delete an existing event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event 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 begin_delete_with_http_info(scope, event_subscription_name, custom_headers = nil) + begin_delete_async(scope, event_subscription_name, custom_headers).value! + end + + # + # Delete an event subscription + # + # Delete an existing event subscription + # + # @param scope [String] The scope of the event subscription. The scope can be a + # subscription, or a resource group, or a top level resource belonging to a + # resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event 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 begin_delete_async(scope, event_subscription_name, custom_headers = nil) + fail ArgumentError, 'scope is nil' if scope.nil? + fail ArgumentError, 'event_subscription_name is nil' if event_subscription_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 = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'eventSubscriptionName' => event_subscription_name}, + skip_encoding_path_params: {'scope' => scope}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Update an event subscription + # + # Asynchronously updates an existing event subscription. + # + # @param scope [String] The scope of existing event subscription. The scope can + # be a subscription, or a resource group, or a top level resource belonging to + # a resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created + # @param event_subscription_update_parameters + # [EventSubscriptionUpdateParameters] Updated event subscription information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventSubscription] operation results. + # + def begin_update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers = nil) + response = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update an event subscription + # + # Asynchronously updates an existing event subscription. + # + # @param scope [String] The scope of existing event subscription. The scope can + # be a subscription, or a resource group, or a top level resource belonging to + # a resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created + # @param event_subscription_update_parameters + # [EventSubscriptionUpdateParameters] Updated event subscription information + # @param custom_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(scope, event_subscription_name, event_subscription_update_parameters, custom_headers = nil) + begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers).value! + end + + # + # Update an event subscription + # + # Asynchronously updates an existing event subscription. + # + # @param scope [String] The scope of existing event subscription. The scope can + # be a subscription, or a resource group, or a top level resource belonging to + # a resource provider namespace, or an EventGrid topic. For example, use + # '/subscriptions/{subscriptionId}/' for a subscription, + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + # resource group, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + # for a resource, and + # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + # for an EventGrid topic. + # @param event_subscription_name [String] Name of the event subscription to be + # created + # @param event_subscription_update_parameters + # [EventSubscriptionUpdateParameters] Updated event subscription information + # @param [Hash{String => String}] 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(scope, event_subscription_name, event_subscription_update_parameters, custom_headers = nil) + fail ArgumentError, 'scope is nil' if scope.nil? + fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? + fail ArgumentError, 'event_subscription_update_parameters is nil' if event_subscription_update_parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::EventGrid::Models::EventSubscriptionUpdateParameters.mapper() + request_content = @client.serialize(request_mapper, event_subscription_update_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'eventSubscriptionName' => event_subscription_name}, + skip_encoding_path_params: {'scope' => scope}, + 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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::EventSubscription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_event_grid/lib/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb new file mode 100644 index 0000000000..cf3efd7a2e --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + module Models + # + # Information about the event hub destination for an event subscription + # + class EventHubEventSubscriptionDestination < EventSubscriptionDestination + + include MsRestAzure + + + def initialize + @endpointType = "EventHub" + end + + attr_accessor :endpointType + + # @return [String] The Azure Resource Id that represents the endpoint of + # an Event Hub destination of an event subscription. + attr_accessor :resource_id + + + # + # Mapper for EventHubEventSubscriptionDestination class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventHub', + type: { + name: 'Composite', + class_name: 'EventHubEventSubscriptionDestination', + model_properties: { + endpointType: { + required: true, + serialized_name: 'endpointType', + type: { + name: 'String' + } + }, + resource_id: { + required: false, + serialized_name: 'properties.resourceId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription.rb new file mode 100644 index 0000000000..0f0233ef14 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription.rb @@ -0,0 +1,126 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + module Models + # + # Event Subscription + # + class EventSubscription < Resource + + include MsRestAzure + + # @return [String] Name of the topic of the event subscription. + attr_accessor :topic + + # @return [EventSubscriptionProvisioningState] Provisioning state of the + # event subscription. Possible values include: 'Creating', 'Updating', + # 'Deleting', 'Succeeded', 'Canceled', 'Failed' + attr_accessor :provisioning_state + + # @return [EventSubscriptionDestination] Information about the + # destination where events have to be delivered for the event + # subscription. + attr_accessor :destination + + # @return [EventSubscriptionFilter] Information about the filter for the + # event subscription. + attr_accessor :filter + + # @return [Array] List of user defined labels. + attr_accessor :labels + + + # + # Mapper for EventSubscription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventSubscription', + type: { + name: 'Composite', + class_name: 'EventSubscription', + 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' + } + }, + topic: { + required: false, + read_only: true, + serialized_name: 'properties.topic', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + destination: { + required: false, + serialized_name: 'properties.destination', + type: { + name: 'Composite', + polymorphic_discriminator: 'endpointType', + uber_parent: 'EventSubscriptionDestination', + class_name: 'EventSubscriptionDestination' + } + }, + filter: { + required: false, + serialized_name: 'properties.filter', + type: { + name: 'Composite', + class_name: 'EventSubscriptionFilter' + } + }, + labels: { + required: false, + serialized_name: 'properties.labels', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb new file mode 100644 index 0000000000..2e34e3e8bd --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_destination.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::ARM::EventGrid + module Models + # + # Information about the destination for an event subscription + # + class EventSubscriptionDestination + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["WebHook"] = "WebHookEventSubscriptionDestination" + @@discriminatorMap["EventHub"] = "EventHubEventSubscriptionDestination" + + def initialize + @endpointType = "EventSubscriptionDestination" + end + + attr_accessor :endpointType + + + # + # Mapper for EventSubscriptionDestination class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventSubscriptionDestination', + type: { + name: 'Composite', + polymorphic_discriminator: 'endpointType', + uber_parent: 'EventSubscriptionDestination', + class_name: 'EventSubscriptionDestination', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb new file mode 100644 index 0000000000..40ed2cf1ea --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_filter.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::ARM::EventGrid + module Models + # + # Filter for the Event Subscription + # + class EventSubscriptionFilter + + include MsRestAzure + + # @return [String] An optional string to filter events for an event + # subscription based on a resource path prefix. + # The format of this depends on the publisher of the events. + # Wildcard characters are not supported in this path. + attr_accessor :subject_begins_with + + # @return [String] An optional string to filter events for an event + # subscription based on a resource path suffix. + # Wildcard characters are not supported in this path. + attr_accessor :subject_ends_with + + # @return [Array] A list of applicable event types that need to + # be part of the event subscription. + # If it is desired to subscribe to all event types, the string "all" + # needs to be specified as an element in this list. + attr_accessor :included_event_types + + # @return [Boolean] Specifies if the SubjectBeginsWith and + # SubjectEndsWith properties of the filter + # should be compared in a case sensitive manner. Default value: false . + attr_accessor :is_subject_case_sensitive + + + # + # Mapper for EventSubscriptionFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventSubscriptionFilter', + type: { + name: 'Composite', + class_name: 'EventSubscriptionFilter', + model_properties: { + subject_begins_with: { + required: false, + serialized_name: 'subjectBeginsWith', + type: { + name: 'String' + } + }, + subject_ends_with: { + required: false, + serialized_name: 'subjectEndsWith', + type: { + name: 'String' + } + }, + included_event_types: { + required: false, + serialized_name: 'includedEventTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + is_subject_case_sensitive: { + required: false, + serialized_name: 'isSubjectCaseSensitive', + default_value: false, + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb new file mode 100644 index 0000000000..fff7bc3374 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_full_url.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::ARM::EventGrid + module Models + # + # Full endpoint url of an event subscription + # + class EventSubscriptionFullUrl + + include MsRestAzure + + # @return [String] The URL that represents the endpoint of the + # destination of an event subscription. + attr_accessor :endpoint_url + + + # + # Mapper for EventSubscriptionFullUrl class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventSubscriptionFullUrl', + type: { + name: 'Composite', + class_name: 'EventSubscriptionFullUrl', + model_properties: { + endpoint_url: { + required: false, + serialized_name: 'endpointUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb new file mode 100644 index 0000000000..40af752657 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_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::ARM::EventGrid + module Models + # + # Defines values for EventSubscriptionProvisioningState + # + module EventSubscriptionProvisioningState + Creating = "Creating" + Updating = "Updating" + Deleting = "Deleting" + Succeeded = "Succeeded" + Canceled = "Canceled" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb new file mode 100644 index 0000000000..11887717f8 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscription_update_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::ARM::EventGrid + module Models + # + # Properties of the Event Subscription update + # + class EventSubscriptionUpdateParameters + + include MsRestAzure + + # @return [EventSubscriptionDestination] Information about the + # destination where events have to be delivered for the event + # subscription. + attr_accessor :destination + + # @return [EventSubscriptionFilter] Information about the filter for the + # event subscription. + attr_accessor :filter + + # @return [Array] List of user defined labels. + attr_accessor :labels + + + # + # Mapper for EventSubscriptionUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventSubscriptionUpdateParameters', + type: { + name: 'Composite', + class_name: 'EventSubscriptionUpdateParameters', + model_properties: { + destination: { + required: false, + serialized_name: 'destination', + type: { + name: 'Composite', + polymorphic_discriminator: 'endpointType', + uber_parent: 'EventSubscriptionDestination', + class_name: 'EventSubscriptionDestination' + } + }, + filter: { + required: false, + serialized_name: 'filter', + type: { + name: 'Composite', + class_name: 'EventSubscriptionFilter' + } + }, + labels: { + required: false, + serialized_name: 'labels', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb new file mode 100644 index 0000000000..14fd255bb2 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.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::ARM::EventGrid + module Models + # + # Result of the List EventSubscriptions operation + # + class EventSubscriptionsListResult + + include MsRestAzure + + # @return [Array] A collection of EventSubscriptions + attr_accessor :value + + + # + # Mapper for EventSubscriptionsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventSubscriptionsListResult', + type: { + name: 'Composite', + class_name: 'EventSubscriptionsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EventSubscriptionElementType', + type: { + name: 'Composite', + class_name: 'EventSubscription' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_type.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_type.rb new file mode 100644 index 0000000000..e27ee41d30 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_type.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + module Models + # + # Event Type for a subject under a topic + # + class EventType < Resource + + include MsRestAzure + + # @return [String] Display name of the event type. + attr_accessor :display_name + + # @return [String] Description of the event type. + attr_accessor :description + + # @return [String] Url of the schema for this event type. + attr_accessor :schema_url + + + # + # Mapper for EventType class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventType', + type: { + name: 'Composite', + class_name: 'EventType', + 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: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + schema_url: { + required: false, + serialized_name: 'properties.schemaUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_types_list_result.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_types_list_result.rb new file mode 100644 index 0000000000..d4eb6d166e --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/event_types_list_result.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::ARM::EventGrid + module Models + # + # Result of the List Event Types operation + # + class EventTypesListResult + + include MsRestAzure + + # @return [Array] A collection of event types + attr_accessor :value + + + # + # Mapper for EventTypesListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventTypesListResult', + type: { + name: 'Composite', + class_name: 'EventTypesListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EventTypeElementType', + type: { + name: 'Composite', + class_name: 'EventType' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation.rb new file mode 100644 index 0000000000..d1f3bedc5c --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + module Models + # + # Represents an operation returned by the GetOperations request + # + class Operation + + include MsRestAzure + + # @return [String] Name of the operation + attr_accessor :name + + # @return [OperationInfo] Display name of the operation + attr_accessor :display + + # @return [OperationOrigin] Origin of the operation. Possible values + # include: 'User', 'System', 'UserAndSystem' + attr_accessor :origin + + # @return Properties of the operation + 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: 'OperationInfo' + } + }, + 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_event_grid/lib/generated/azure_mgmt_event_grid/models/operation_info.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation_info.rb new file mode 100644 index 0000000000..43ae817e6f --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation_info.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::ARM::EventGrid + module Models + # + # Information about an operation + # + class OperationInfo + + include MsRestAzure + + # @return [String] Name of the provider + attr_accessor :provider + + # @return [String] Name of the resource type + attr_accessor :resource + + # @return [String] Name of the operation + attr_accessor :operation + + # @return [String] Description of the operation + attr_accessor :description + + + # + # Mapper for OperationInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationInfo', + type: { + name: 'Composite', + class_name: 'OperationInfo', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation_origin.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation_origin.rb new file mode 100644 index 0000000000..a914ff5573 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operation_origin.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::ARM::EventGrid + module Models + # + # Defines values for OperationOrigin + # + module OperationOrigin + User = "User" + System = "System" + UserAndSystem = "UserAndSystem" + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operations_list_result.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operations_list_result.rb new file mode 100644 index 0000000000..3450fb9109 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/operations_list_result.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::ARM::EventGrid + module Models + # + # Result of the List Operations operation + # + class OperationsListResult + + include MsRestAzure + + # @return [Array] A collection of operations + attr_accessor :value + + + # + # Mapper for OperationsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationsListResult', + type: { + name: 'Composite', + class_name: 'OperationsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/resource.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/resource.rb new file mode 100644 index 0000000000..065f6fe4aa --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/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::ARM::EventGrid + module Models + # + # Definition of a Resource + # + class Resource + + include MsRestAzure + + # @return [String] Fully qualified identifier of the resource + attr_accessor :id + + # @return [String] Name of the resource + attr_accessor :name + + # @return [String] Type of the 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_event_grid/lib/generated/azure_mgmt_event_grid/models/resource_region_type.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/resource_region_type.rb new file mode 100644 index 0000000000..a780c67544 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/resource_region_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::ARM::EventGrid + module Models + # + # Defines values for ResourceRegionType + # + module ResourceRegionType + RegionalResource = "RegionalResource" + GlobalResource = "GlobalResource" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recover_response.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic.rb old mode 100755 new mode 100644 similarity index 69% rename from management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recover_response.rb rename to management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic.rb index e378baebd2..9b885abe5e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recover_response.rb +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic.rb @@ -1,34 +1,37 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. -module Azure::ARM::Web +module Azure::ARM::EventGrid module Models # - # Response for an app recovery request. + # EventGrid Topic # - class RecoverResponse < MsRestAzure::Resource + class Topic < TrackedResource include MsRestAzure - include MsRest::JSONable - # @return [String] ID of the recovery operation. Can be used to check the - # status of the corresponding operation. - attr_accessor :operation_id + # @return [TopicProvisioningState] Provisioning state of the topic. + # Possible values include: 'Creating', 'Updating', 'Deleting', + # 'Succeeded', 'Canceled', 'Failed' + attr_accessor :provisioning_state + + # @return [String] Endpoint for the topic. + attr_accessor :endpoint # - # Mapper for RecoverResponse class as Ruby Hash. + # Mapper for Topic class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'RecoverResponse', + serialized_name: 'Topic', type: { name: 'Composite', - class_name: 'RecoverResponse', + class_name: 'Topic', model_properties: { id: { required: false, @@ -40,14 +43,16 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' } }, - kind: { + type: { required: false, - serialized_name: 'kind', + read_only: true, + serialized_name: 'type', type: { name: 'String' } @@ -59,13 +64,6 @@ def self.mapper() name: 'String' } }, - type: { - required: false, - serialized_name: 'type', - type: { - name: 'String' - } - }, tags: { required: false, serialized_name: 'tags', @@ -80,10 +78,18 @@ def self.mapper() } } }, - operation_id: { + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + endpoint: { required: false, read_only: true, - serialized_name: 'properties.operationId', + serialized_name: 'properties.endpoint', type: { name: 'String' } diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb new file mode 100644 index 0000000000..9a0a1a1189 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_provisioning_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::ARM::EventGrid + module Models + # + # Defines values for TopicProvisioningState + # + module TopicProvisioningState + Creating = "Creating" + Updating = "Updating" + Deleting = "Deleting" + Succeeded = "Succeeded" + Canceled = "Canceled" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb new file mode 100644 index 0000000000..4a2d99a258 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.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::ARM::EventGrid + module Models + # + # Topic regenerate share access key key request + # + class TopicRegenerateKeyRequest + + include MsRestAzure + + # @return [String] Key name to regenerate key1 or key2 + attr_accessor :key_name + + + # + # Mapper for TopicRegenerateKeyRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TopicRegenerateKeyRequest', + type: { + name: 'Composite', + class_name: 'TopicRegenerateKeyRequest', + model_properties: { + key_name: { + required: true, + serialized_name: 'keyName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb new file mode 100644 index 0000000000..a2ff96086b --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.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::ARM::EventGrid + module Models + # + # Shared access keys of the Topic + # + class TopicSharedAccessKeys + + include MsRestAzure + + # @return [String] Shared access key1 for the topic. + attr_accessor :key1 + + # @return [String] Shared access key2 for the topic. + attr_accessor :key2 + + + # + # Mapper for TopicSharedAccessKeys class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TopicSharedAccessKeys', + type: { + name: 'Composite', + class_name: 'TopicSharedAccessKeys', + model_properties: { + key1: { + required: false, + serialized_name: 'key1', + type: { + name: 'String' + } + }, + key2: { + required: false, + serialized_name: 'key2', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_type_info.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_type_info.rb new file mode 100644 index 0000000000..4e2a5dccec --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_type_info.rb @@ -0,0 +1,128 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + module Models + # + # Properties of a topic type info. + # + class TopicTypeInfo < Resource + + include MsRestAzure + + # @return [String] Namespace of the provider of the topic type. + attr_accessor :provider + + # @return [String] Display Name for the topic type. + attr_accessor :display_name + + # @return [String] Description of the topic type. + attr_accessor :description + + # @return [ResourceRegionType] Region type of the resource. Possible + # values include: 'RegionalResource', 'GlobalResource' + attr_accessor :resource_region_type + + # @return [TopicTypeProvisioningState] Provisioning state of the topic + # type. Possible values include: 'Creating', 'Updating', 'Deleting', + # 'Succeeded', 'Canceled', 'Failed' + attr_accessor :provisioning_state + + # @return [Array] List of locations supported by this topic type. + attr_accessor :supported_locations + + + # + # Mapper for TopicTypeInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TopicTypeInfo', + type: { + name: 'Composite', + class_name: 'TopicTypeInfo', + 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' + } + }, + provider: { + required: false, + serialized_name: 'properties.provider', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + resource_region_type: { + required: false, + serialized_name: 'properties.resourceRegionType', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + supported_locations: { + required: false, + serialized_name: 'properties.supportedLocations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb new file mode 100644 index 0000000000..fc6ca20299 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_type_provisioning_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::ARM::EventGrid + module Models + # + # Defines values for TopicTypeProvisioningState + # + module TopicTypeProvisioningState + Creating = "Creating" + Updating = "Updating" + Deleting = "Deleting" + Succeeded = "Succeeded" + Canceled = "Canceled" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb new file mode 100644 index 0000000000..60b40966d1 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topic_types_list_result.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::ARM::EventGrid + module Models + # + # Result of the List Topic Types operation + # + class TopicTypesListResult + + include MsRestAzure + + # @return [Array] A collection of topic types + attr_accessor :value + + + # + # Mapper for TopicTypesListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TopicTypesListResult', + type: { + name: 'Composite', + class_name: 'TopicTypesListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TopicTypeInfoElementType', + type: { + name: 'Composite', + class_name: 'TopicTypeInfo' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topics_list_result.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topics_list_result.rb new file mode 100644 index 0000000000..358e82152b --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/topics_list_result.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::ARM::EventGrid + module Models + # + # Result of the List Topics operation + # + class TopicsListResult + + include MsRestAzure + + # @return [Array] A collection of Topics + attr_accessor :value + + + # + # Mapper for TopicsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TopicsListResult', + type: { + name: 'Composite', + class_name: 'TopicsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TopicElementType', + type: { + name: 'Composite', + class_name: 'Topic' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/tracked_resource.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/tracked_resource.rb new file mode 100644 index 0000000000..5147d056bf --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/tracked_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::ARM::EventGrid + module Models + # + # Definition of a Tracked Resource + # + class TrackedResource < Resource + + include MsRestAzure + + # @return [String] Location of the resource + attr_accessor :location + + # @return [Hash{String => String}] Tags of the resource + attr_accessor :tags + + + # + # Mapper for TrackedResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TrackedResource', + type: { + name: 'Composite', + class_name: 'TrackedResource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb new file mode 100644 index 0000000000..f7ff860d4a --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.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::ARM::EventGrid + module Models + # + # Information about the webhook destination for an event subscription + # + class WebHookEventSubscriptionDestination < EventSubscriptionDestination + + include MsRestAzure + + + def initialize + @endpointType = "WebHook" + end + + attr_accessor :endpointType + + # @return [String] The URL that represents the endpoint of the + # destination of an event subscription. + attr_accessor :endpoint_url + + # @return [String] The base URL that represents the endpoint of the + # destination of an event subscription. + attr_accessor :endpoint_base_url + + + # + # Mapper for WebHookEventSubscriptionDestination class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebHook', + type: { + name: 'Composite', + class_name: 'WebHookEventSubscriptionDestination', + model_properties: { + endpointType: { + required: true, + serialized_name: 'endpointType', + type: { + name: 'String' + } + }, + endpoint_url: { + required: false, + serialized_name: 'properties.endpointUrl', + type: { + name: 'String' + } + }, + endpoint_base_url: { + required: false, + read_only: true, + serialized_name: 'properties.endpointBaseUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/module_definition.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/module_definition.rb new file mode 100644 index 0000000000..022162cf9e --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/module_definition.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 end +module Azure::ARM end +module Azure::ARM::EventGrid end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/operations.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/operations.rb new file mode 100644 index 0000000000..eff773f793 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/operations.rb @@ -0,0 +1,115 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + # + # Azure EventGrid Management Client + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [EventGridManagementClient] reference to the EventGridManagementClient + attr_reader :client + + # + # List available operations + # + # List the available operations supported by the Microsoft.EventGrid resource + # provider + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationsListResult] operation results. + # + def list(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # List available operations + # + # List the available operations supported by the Microsoft.EventGrid resource + # 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 + + # + # List available operations + # + # List the available operations supported by the Microsoft.EventGrid resource + # 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.EventGrid/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::ARM::EventGrid::Models::OperationsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_event_grid/lib/generated/azure_mgmt_event_grid/topic_types.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/topic_types.rb new file mode 100644 index 0000000000..7925805dae --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/topic_types.rb @@ -0,0 +1,296 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + # + # Azure EventGrid Management Client + # + class TopicTypes + include MsRestAzure + + # + # Creates and initializes a new instance of the TopicTypes class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [EventGridManagementClient] reference to the EventGridManagementClient + attr_reader :client + + # + # List topic types + # + # List all registered topic types + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TopicTypesListResult] operation results. + # + def list(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # List topic types + # + # List all registered topic types + # + # @param custom_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 + + # + # List topic types + # + # List all registered topic types + # + # @param [Hash{String => String}] 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.EventGrid/topicTypes' + + 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::ARM::EventGrid::Models::TopicTypesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a topic type + # + # Get information about a topic type + # + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TopicTypeInfo] operation results. + # + def get(topic_type_name, custom_headers = nil) + response = get_async(topic_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get a topic type + # + # Get information about a topic type + # + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(topic_type_name, custom_headers = nil) + get_async(topic_type_name, custom_headers).value! + end + + # + # Get a topic type + # + # Get information about a topic type + # + # @param topic_type_name [String] Name of the topic type + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(topic_type_name, custom_headers = nil) + fail ArgumentError, 'topic_type_name is nil' if topic_type_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 = 'providers/Microsoft.EventGrid/topicTypes/{topicTypeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'topicTypeName' => topic_type_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::ARM::EventGrid::Models::TopicTypeInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 event types + # + # List event types for a topic type + # + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventTypesListResult] operation results. + # + def list_event_types(topic_type_name, custom_headers = nil) + response = list_event_types_async(topic_type_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List event types + # + # List event types for a topic type + # + # @param topic_type_name [String] Name of the topic type + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_event_types_with_http_info(topic_type_name, custom_headers = nil) + list_event_types_async(topic_type_name, custom_headers).value! + end + + # + # List event types + # + # List event types for a topic type + # + # @param topic_type_name [String] Name of the topic type + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_event_types_async(topic_type_name, custom_headers = nil) + fail ArgumentError, 'topic_type_name is nil' if topic_type_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 = 'providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'topicTypeName' => topic_type_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::ARM::EventGrid::Models::EventTypesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_event_grid/lib/generated/azure_mgmt_event_grid/topics.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/topics.rb new file mode 100644 index 0000000000..af784b7e44 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/topics.rb @@ -0,0 +1,926 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventGrid + # + # Azure EventGrid Management Client + # + class Topics + include MsRestAzure + + # + # Creates and initializes a new instance of the Topics class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [EventGridManagementClient] reference to the EventGridManagementClient + attr_reader :client + + # + # Get a topic + # + # Get properties of a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Topic] operation results. + # + def get(resource_group_name, topic_name, custom_headers = nil) + response = get_async(resource_group_name, topic_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get a topic + # + # Get properties of a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_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, topic_name, custom_headers = nil) + get_async(resource_group_name, topic_name, custom_headers).value! + end + + # + # Get a topic + # + # Get properties of a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param [Hash{String => String}] 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, topic_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, 'topic_name is nil' if topic_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.EventGrid/topics/{topicName}' + + 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,'topicName' => topic_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::ARM::EventGrid::Models::Topic.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a topic + # + # Asynchronously creates a new topic with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param topic_info [Topic] Topic information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Topic] operation results. + # + def create_or_update(resource_group_name, topic_name, topic_info, custom_headers = nil) + response = create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param topic_info [Topic] Topic information + # @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, topic_name, topic_info, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::EventGrid::Models::Topic.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 + + # + # Delete a topic + # + # Delete existing topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, topic_name, custom_headers = nil) + response = delete_async(resource_group_name, topic_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, topic_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, topic_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # List topics under an Azure subscription + # + # List all the topics under an Azure subscription + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TopicsListResult] operation results. + # + def list_by_subscription(custom_headers = nil) + response = list_by_subscription_async(custom_headers).value! + response.body unless response.nil? + end + + # + # List topics under an Azure subscription + # + # List all the topics under 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_by_subscription_with_http_info(custom_headers = nil) + list_by_subscription_async(custom_headers).value! + end + + # + # List topics under an Azure subscription + # + # List all the topics under 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_by_subscription_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics' + + 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::ARM::EventGrid::Models::TopicsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 topics under a resource group + # + # List all the topics under a resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TopicsListResult] operation results. + # + def list_by_resource_group(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List topics under a resource group + # + # List all the topics under a resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's 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_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 topics under a resource group + # + # List all the topics under a resource group + # + # @param resource_group_name [String] The name of the resource group within the + # user's 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_by_resource_group_async(resource_group_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, '@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.EventGrid/topics' + + 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}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::TopicsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 keys for a topic + # + # List the two keys used to publish to a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TopicSharedAccessKeys] operation results. + # + def list_shared_access_keys(resource_group_name, topic_name, custom_headers = nil) + response = list_shared_access_keys_async(resource_group_name, topic_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List keys for a topic + # + # List the two keys used to publish to a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_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_shared_access_keys_with_http_info(resource_group_name, topic_name, custom_headers = nil) + list_shared_access_keys_async(resource_group_name, topic_name, custom_headers).value! + end + + # + # List keys for a topic + # + # List the two keys used to publish to a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param [Hash{String => String}] 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_shared_access_keys_async(resource_group_name, topic_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, 'topic_name is nil' if topic_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.EventGrid/topics/{topicName}/listKeys' + + 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,'topicName' => topic_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 == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::TopicSharedAccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 key for a topic + # + # Regenerate a shared access key for a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to + # regenerate key + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TopicSharedAccessKeys] operation results. + # + def regenerate_key(resource_group_name, topic_name, regenerate_key_request, custom_headers = nil) + response = regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerate key for a topic + # + # Regenerate a shared access key for a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to + # regenerate 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 regenerate_key_with_http_info(resource_group_name, topic_name, regenerate_key_request, custom_headers = nil) + regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers).value! + end + + # + # Regenerate key for a topic + # + # Regenerate a shared access key for a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to + # regenerate 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 regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, 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, 'topic_name is nil' if topic_name.nil? + fail ArgumentError, 'regenerate_key_request is nil' if regenerate_key_request.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::EventGrid::Models::TopicRegenerateKeyRequest.mapper() + request_content = @client.serialize(request_mapper, regenerate_key_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey' + + 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,'topicName' => topic_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 == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::TopicSharedAccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 topic event types + # + # List event types for a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param provider_namespace [String] Namespace of the provider of the topic + # @param resource_type_name [String] Name of the topic type + # @param resource_name [String] Name of the topic + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventTypesListResult] operation results. + # + def list_event_types(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers = nil) + response = list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers).value! + response.body unless response.nil? + end + + # + # List topic event types + # + # List event types for a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param provider_namespace [String] Namespace of the provider of the topic + # @param resource_type_name [String] Name of the topic type + # @param resource_name [String] Name of the topic + # @param custom_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_event_types_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers = nil) + list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers).value! + end + + # + # List topic event types + # + # List event types for a topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param provider_namespace [String] Namespace of the provider of the topic + # @param resource_type_name [String] Name of the topic type + # @param resource_name [String] Name of the topic + # @param [Hash{String => String}] 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_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_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, 'provider_namespace is nil' if provider_namespace.nil? + fail ArgumentError, 'resource_type_name is nil' if resource_type_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_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/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes' + + 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,'providerNamespace' => provider_namespace,'resourceTypeName' => resource_type_name,'resourceName' => resource_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::ARM::EventGrid::Models::EventTypesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a topic + # + # Asynchronously creates a new topic with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param topic_info [Topic] Topic information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Topic] operation results. + # + def begin_create_or_update(resource_group_name, topic_name, topic_info, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a topic + # + # Asynchronously creates a new topic with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param topic_info [Topic] Topic information + # @param custom_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, topic_name, topic_info, custom_headers = nil) + begin_create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers).value! + end + + # + # Create a topic + # + # Asynchronously creates a new topic with the specified parameters. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param topic_info [Topic] Topic information + # @param [Hash{String => String}] 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, topic_name, topic_info, 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, 'topic_name is nil' if topic_name.nil? + fail ArgumentError, 'topic_info is nil' if topic_info.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::EventGrid::Models::Topic.mapper() + request_content = @client.serialize(request_mapper, topic_info) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + + 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,'topicName' => topic_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(: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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventGrid::Models::Topic.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a topic + # + # Delete existing topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, topic_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, topic_name, custom_headers).value! + nil + end + + # + # Delete a topic + # + # Delete existing topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, topic_name, custom_headers = nil) + begin_delete_async(resource_group_name, topic_name, custom_headers).value! + end + + # + # Delete a topic + # + # Delete existing topic + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. + # @param topic_name [String] Name of the topic + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, topic_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, 'topic_name is nil' if topic_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.EventGrid/topics/{topicName}' + + 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,'topicName' => topic_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/version.rb b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/version.rb new file mode 100644 index 0000000000..3b421f06d9 --- /dev/null +++ b/management/azure_mgmt_event_grid/lib/generated/azure_mgmt_event_grid/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::ARM::EventGrid + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_event_grid/spec/spec_helper.rb b/management/azure_mgmt_event_grid/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_event_grid/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_event_hub/azure_mgmt_event_hub.gemspec b/management/azure_mgmt_event_hub/azure_mgmt_event_hub.gemspec index 3c7daddce2..dd2f506136 100644 --- a/management/azure_mgmt_event_hub/azure_mgmt_event_hub.gemspec +++ b/management/azure_mgmt_event_hub/azure_mgmt_event_hub.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub.rb old mode 100755 new mode 100644 index bfa05de230..bf111882fa --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -22,31 +22,35 @@ module Azure::ARM::EventHub autoload :Operations, 'generated/azure_mgmt_event_hub/operations.rb' autoload :Namespaces, 'generated/azure_mgmt_event_hub/namespaces.rb' + autoload :DisasterRecoveryConfigs, 'generated/azure_mgmt_event_hub/disaster_recovery_configs.rb' autoload :EventHubs, 'generated/azure_mgmt_event_hub/event_hubs.rb' autoload :ConsumerGroups, 'generated/azure_mgmt_event_hub/consumer_groups.rb' autoload :EventHubManagementClient, 'generated/azure_mgmt_event_hub/event_hub_management_client.rb' module Models autoload :CaptureDescription, 'generated/azure_mgmt_event_hub/models/capture_description.rb' - autoload :RegenerateAccessKeyParameters, 'generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb' autoload :Destination, 'generated/azure_mgmt_event_hub/models/destination.rb' - autoload :Sku, 'generated/azure_mgmt_event_hub/models/sku.rb' - autoload :OperationDisplay, 'generated/azure_mgmt_event_hub/models/operation_display.rb' - autoload :EHNamespaceListResult, 'generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb' - autoload :AuthorizationRuleListResult, 'generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb' - autoload :EventHubListResult, 'generated/azure_mgmt_event_hub/models/event_hub_list_result.rb' - autoload :ErrorResponse, 'generated/azure_mgmt_event_hub/models/error_response.rb' + autoload :Resource, 'generated/azure_mgmt_event_hub/models/resource.rb' autoload :Operation, 'generated/azure_mgmt_event_hub/models/operation.rb' - autoload :ConsumerGroupListResult, 'generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_event_hub/models/error_response.rb' autoload :OperationListResult, 'generated/azure_mgmt_event_hub/models/operation_list_result.rb' - autoload :CheckNameAvailabilityParameter, 'generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb' + autoload :EventHubListResult, 'generated/azure_mgmt_event_hub/models/event_hub_list_result.rb' autoload :AccessKeys, 'generated/azure_mgmt_event_hub/models/access_keys.rb' + autoload :ArmDisasterRecoveryListResult, 'generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb' + autoload :Sku, 'generated/azure_mgmt_event_hub/models/sku.rb' + autoload :ConsumerGroupListResult, 'generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb' + autoload :AuthorizationRuleListResult, 'generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb' + autoload :CheckNameAvailabilityParameter, 'generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb' + autoload :EHNamespaceListResult, 'generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb' autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_event_hub/models/check_name_availability_result.rb' + autoload :RegenerateAccessKeyParameters, 'generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_event_hub/models/operation_display.rb' autoload :TrackedResource, 'generated/azure_mgmt_event_hub/models/tracked_resource.rb' autoload :EHNamespace, 'generated/azure_mgmt_event_hub/models/ehnamespace.rb' autoload :AuthorizationRule, 'generated/azure_mgmt_event_hub/models/authorization_rule.rb' autoload :Eventhub, 'generated/azure_mgmt_event_hub/models/eventhub.rb' autoload :ConsumerGroup, 'generated/azure_mgmt_event_hub/models/consumer_group.rb' + autoload :ArmDisasterRecovery, 'generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb' autoload :SkuName, 'generated/azure_mgmt_event_hub/models/sku_name.rb' autoload :SkuTier, 'generated/azure_mgmt_event_hub/models/sku_tier.rb' autoload :AccessRights, 'generated/azure_mgmt_event_hub/models/access_rights.rb' @@ -54,5 +58,7 @@ module Models autoload :EntityStatus, 'generated/azure_mgmt_event_hub/models/entity_status.rb' autoload :EncodingCaptureDescription, 'generated/azure_mgmt_event_hub/models/encoding_capture_description.rb' autoload :UnavailableReason, 'generated/azure_mgmt_event_hub/models/unavailable_reason.rb' + autoload :ProvisioningStateDR, 'generated/azure_mgmt_event_hub/models/provisioning_state_dr.rb' + autoload :RoleDisasterRecovery, 'generated/azure_mgmt_event_hub/models/role_disaster_recovery.rb' end end diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/consumer_groups.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/consumer_groups.rb old mode 100755 new mode 100644 index 24173bba22..f2036b76a1 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/consumer_groups.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/consumer_groups.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb new file mode 100644 index 0000000000..ea2401a76d --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb @@ -0,0 +1,711 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::EventHub + # + # Azure Event Hubs client + # + class DisasterRecoveryConfigs + include MsRestAzure + + # + # Creates and initializes a new instance of the DisasterRecoveryConfigs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [EventHubManagementClient] reference to the EventHubManagementClient + attr_reader :client + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecoveryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 new Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param parameters [ArmDisasterRecovery] Parameters required to create an + # Alias(Disaster Recovery configuration) + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ArmDisasterRecovery] operation results. + # + def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a new Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param parameters [ArmDisasterRecovery] Parameters required to create an + # Alias(Disaster Recovery configuration) + # @param custom_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, namespace_name, alias_parameter, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value! + end + + # + # Creates or updates a new Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param parameters [ArmDisasterRecovery] Parameters required to create an + # Alias(Disaster Recovery configuration) + # @param [Hash{String => String}] 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, namespace_name, alias_parameter, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecovery.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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::EventHub::Models::ArmDisasterRecovery.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + nil + end + + # + # Deletes an Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # Deletes an Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 Alias(Disaster Recovery configuration) for primary or secondary + # namespace + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ArmDisasterRecovery] operation results. + # + def get(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves Alias(Disaster Recovery configuration) for primary or secondary + # namespace + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # Retrieves Alias(Disaster Recovery configuration) for primary or secondary + # namespace + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'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::ARM::EventHub::Models::ArmDisasterRecovery.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 disables the Disaster Recovery and stops replicating changes + # from primary to secondary namespaces + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + nil + end + + # + # This operation disables the Disaster Recovery and stops replicating changes + # from primary to secondary namespaces + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # This operation disables the Disaster Recovery and stops replicating changes + # from primary to secondary namespaces + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'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? + + result + end + + promise.execute + end + + # + # envokes GEO DR failover and reconfigure the alias to point to the secondary + # namespace + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + nil + end + + # + # envokes GEO DR failover and reconfigure the alias to point to the secondary + # namespace + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # envokes GEO DR failover and reconfigure the alias to point to the secondary + # namespace + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'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? + + result + end + + promise.execute + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @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 [ArmDisasterRecoveryListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @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::ARM::EventHub::Models::ArmDisasterRecoveryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the resource group within the + # azure subscription. + # @param namespace_name [String] The Namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_async(resource_group_name, namespace_name, custom_headers).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_event_hub/lib/generated/azure_mgmt_event_hub/event_hub_management_client.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/event_hub_management_client.rb old mode 100755 new mode 100644 index 1ee012e8cc..5c800536e1 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/event_hub_management_client.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/event_hub_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -42,6 +42,9 @@ class EventHubManagementClient < MsRestAzure::AzureServiceClient # @return [Namespaces] namespaces attr_reader :namespaces + # @return [DisasterRecoveryConfigs] disaster_recovery_configs + attr_reader :disaster_recovery_configs + # @return [EventHubs] event_hubs attr_reader :event_hubs @@ -63,6 +66,7 @@ def initialize(credentials = nil, base_url = nil, options = nil) @operations = Operations.new(self) @namespaces = Namespaces.new(self) + @disaster_recovery_configs = DisasterRecoveryConfigs.new(self) @event_hubs = EventHubs.new(self) @consumer_groups = ConsumerGroups.new(self) @api_version = '2017-04-01' diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/event_hubs.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/event_hubs.rb old mode 100755 new mode 100644 index 131b01b4a9..6772f2cb19 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/event_hubs.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/event_hubs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_keys.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_keys.rb index 50a5f93f59..7c2c352998 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_keys.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AccessKeys include MsRestAzure - include MsRest::JSONable # @return [String] Primary connection string of the created namespace # AuthorizationRule. attr_accessor :primary_connection_string @@ -21,6 +20,14 @@ class AccessKeys # AuthorizationRule. attr_accessor :secondary_connection_string + # @return [String] Primary connection string of the alias if GEO DR is + # enabled + attr_accessor :alias_primary_connection_string + + # @return [String] Secondary connection string of the alias if GEO DR is + # enabled + attr_accessor :alias_secondary_connection_string + # @return [String] A base64-encoded 256-bit primary key for signing and # validating the SAS token. attr_accessor :primary_key @@ -61,6 +68,22 @@ def self.mapper() name: 'String' } }, + alias_primary_connection_string: { + required: false, + read_only: true, + serialized_name: 'aliasPrimaryConnectionString', + type: { + name: 'String' + } + }, + alias_secondary_connection_string: { + required: false, + read_only: true, + serialized_name: 'aliasSecondaryConnectionString', + type: { + name: 'String' + } + }, primary_key: { required: false, read_only: true, diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_rights.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_rights.rb old mode 100755 new mode 100644 index 1cc63c7336..ee9e86aed9 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_rights.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/access_rights.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb new file mode 100644 index 0000000000..a0450095b8 --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.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::ARM::EventHub + module Models + # + # Single item in List or Get Alias(Disaster Recovery configuration) + # operation + # + class ArmDisasterRecovery < Resource + + include MsRestAzure + + # @return [ProvisioningStateDR] Provisioning state of the Alias(Disaster + # Recovery configuration) - possible values 'Accepted' or 'Succeeded' or + # 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + attr_accessor :provisioning_state + + # @return [String] Primary/Secondary eventhub namespace name, which is + # part of GEO DR pairning + attr_accessor :partner_namespace + + # @return [RoleDisasterRecovery] role of namespace in GEO DR - possible + # values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible + # values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' + attr_accessor :role + + + # + # Mapper for ArmDisasterRecovery class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ArmDisasterRecovery', + type: { + name: 'Composite', + class_name: 'ArmDisasterRecovery', + 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' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'ProvisioningStateDR' + } + }, + partner_namespace: { + required: false, + serialized_name: 'properties.partnerNamespace', + type: { + name: 'String' + } + }, + role: { + required: false, + read_only: true, + serialized_name: 'properties.role', + type: { + name: 'Enum', + module: 'RoleDisasterRecovery' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb new file mode 100644 index 0000000000..cc2de03073 --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_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::ARM::EventHub + module Models + # + # The result of the List Alias(Disaster Recovery configuration) operation. + # + class ArmDisasterRecoveryListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of Alias(Disaster Recovery + # configurations) + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of Alias(Disaster Recovery configuration) + 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 [ArmDisasterRecoveryListResult] 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 ArmDisasterRecoveryListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ArmDisasterRecoveryListResult', + type: { + name: 'Composite', + class_name: 'ArmDisasterRecoveryListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ArmDisasterRecoveryElementType', + type: { + name: 'Composite', + class_name: 'ArmDisasterRecovery' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule.rb index 36eb8dd54b..f7c6d440a6 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Single item in a List or Get AuthorizationRule operation # - class AuthorizationRule < MsRestAzure::Resource + class AuthorizationRule < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] The rights associated with the rule. attr_accessor :rights diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb index 84f9cc0ba8..4d73668d5f 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/capture_description.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/capture_description.rb index 8be8b2e2a5..e44436c6ec 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/capture_description.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/capture_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CaptureDescription include MsRestAzure - include MsRest::JSONable # @return [Boolean] A value that indicates whether capture description is # enabled. attr_accessor :enabled diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb old mode 100755 new mode 100644 index 7026366e91..0fb54d283c --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityParameter include MsRestAzure - include MsRest::JSONable # @return [String] Name to check the namespace name availability attr_accessor :name diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb old mode 100755 new mode 100644 index 86b82daf46..a0e28955d8 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityResult include MsRestAzure - include MsRest::JSONable # @return [String] The detailed info regarding the reason associated with # the Namespace. attr_accessor :message diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group.rb index d2a63775e2..a037edbc34 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Single item in List or Get Consumer group operation # - class ConsumerGroup < MsRestAzure::Resource + class ConsumerGroup < Resource include MsRestAzure - include MsRest::JSONable # @return [DateTime] Exact time the message was created. attr_accessor :created_at diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb old mode 100755 new mode 100644 index fdec87c676..9ee1262714 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/destination.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/destination.rb index 82c413d26d..192c466485 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/destination.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/destination.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Destination include MsRestAzure - include MsRest::JSONable # @return [String] Name for capture destination attr_accessor :name diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace.rb index 54e6d546dd..4f5bf5135b 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EHNamespace < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [Sku] Properties of sku resource attr_accessor :sku diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb index b141aed818..1ca2dcbde5 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb index a1586a0280..69f4df8e27 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/entity_status.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/entity_status.rb old mode 100755 new mode 100644 index 7893827927..318e163ffd --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/entity_status.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/entity_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/error_response.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/error_response.rb index cc535ceeea..59b84410ba 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/error_response.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/error_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ErrorResponse include MsRestAzure - include MsRest::JSONable # @return [String] Error code. attr_accessor :code diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb old mode 100755 new mode 100644 index c61b6d9eee..b94fc5a504 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/eventhub.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/eventhub.rb index 56d10256c7..bb1b9561bb 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/eventhub.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/eventhub.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Single item in List or Get Event Hub operation # - class Eventhub < MsRestAzure::Resource + class Eventhub < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] Current number of shards on the Event Hub. attr_accessor :partition_ids diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/key_type.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/key_type.rb index 20656286e7..daac25b700 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/key_type.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation.rb old mode 100755 new mode 100644 index 31629f4cd0..7bac5ba3c6 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] Operation name: {provider}/{resource}/{operation} attr_accessor :name diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_display.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_display.rb old mode 100755 new mode 100644 index 464f9bd54b..3508f52721 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_display.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable # @return [String] Service provider: Microsoft.EventHub attr_accessor :provider diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_list_result.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_list_result.rb old mode 100755 new mode 100644 index 4af54fd894..0460753158 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_list_result.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/operation_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/provisioning_state_dr.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/provisioning_state_dr.rb new file mode 100644 index 0000000000..cf666eb1a8 --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/provisioning_state_dr.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::ARM::EventHub + module Models + # + # Defines values for ProvisioningStateDR + # + module ProvisioningStateDR + Accepted = "Accepted" + Succeeded = "Succeeded" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb index 53ccc8f9b2..78c3ffec47 100644 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RegenerateAccessKeyParameters include MsRestAzure - include MsRest::JSONable # @return [KeyType] The access key to regenerate. Possible values # include: 'PrimaryKey', 'SecondaryKey' attr_accessor :key_type diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sql_sub_resource.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/resource.rb similarity index 64% rename from management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sql_sub_resource.rb rename to management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/resource.rb index da8b01633c..cbd82faf98 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sql_sub_resource.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/resource.rb @@ -1,37 +1,47 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. -module Azure::ARM::SQL +module Azure::ARM::EventHub module Models # - # Subresource properties + # The Resource definition # - class SqlSubResource + class Resource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id + attr_accessor :id + # @return [String] Resource name attr_accessor :name - # @return [String] Resource Id - attr_accessor :id + # @return [String] Resource type + attr_accessor :type # - # Mapper for SqlSubResource class as Ruby Hash. + # Mapper for Resource class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'SqlSubResource', + serialized_name: 'Resource', type: { name: 'Composite', - class_name: 'SqlSubResource', + class_name: 'Resource', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: false, read_only: true, @@ -40,10 +50,10 @@ def self.mapper() name: 'String' } }, - id: { + type: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'type', type: { name: 'String' } diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/role_disaster_recovery.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/role_disaster_recovery.rb new file mode 100644 index 0000000000..c28bda9ee9 --- /dev/null +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/role_disaster_recovery.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::ARM::EventHub + module Models + # + # Defines values for RoleDisasterRecovery + # + module RoleDisasterRecovery + Primary = "Primary" + PrimaryNotReplicating = "PrimaryNotReplicating" + Secondary = "Secondary" + end + end +end diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku.rb old mode 100755 new mode 100644 index 4f88948f57..42d4c5c622 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] Name of this SKU. Possible values include: 'Basic', # 'Standard' attr_accessor :name diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_name.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_name.rb old mode 100755 new mode 100644 index cdf9745a32..017c448e60 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_name.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_tier.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_tier.rb old mode 100755 new mode 100644 index 31d98a2510..337044cc88 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_tier.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/tracked_resource.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/tracked_resource.rb old mode 100755 new mode 100644 index fe1ea1204c..b9ccd042f1 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/tracked_resource.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/tracked_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Definition of Resource # - class TrackedResource < MsRestAzure::Resource + class TrackedResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Resource location attr_accessor :location diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/unavailable_reason.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/unavailable_reason.rb old mode 100755 new mode 100644 index 9cfb0f6506..afa946aa14 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/unavailable_reason.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/models/unavailable_reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/module_definition.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/module_definition.rb old mode 100755 new mode 100644 index 05e906ba1e..a1a1d07595 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/module_definition.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/namespaces.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/namespaces.rb old mode 100755 new mode 100644 index 3b2df5bf04..2de90e1818 --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/namespaces.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/namespaces.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/operations.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/operations.rb old mode 100755 new mode 100644 index faa9d9c076..c0711ac3de --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/operations.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/version.rb b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/version.rb old mode 100755 new mode 100644 index 04e78b118f..058e86004f --- a/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/version.rb +++ b/management/azure_mgmt_event_hub/lib/generated/azure_mgmt_event_hub/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::EventHub - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_features/azure_mgmt_features.gemspec b/management/azure_mgmt_features/azure_mgmt_features.gemspec index aa04d219a5..f18150b25f 100644 --- a/management/azure_mgmt_features/azure_mgmt_features.gemspec +++ b/management/azure_mgmt_features/azure_mgmt_features.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features.rb index 1303f73f4f..a95f06e872 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/feature_client.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/feature_client.rb index 3f242b1f9c..82d9008ec5 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/feature_client.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/feature_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/features.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/features.rb index 42b2bd0c00..e872393299 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/features.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/features.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_operations_list_result.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_operations_list_result.rb index 59022385d8..02a562b826 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_operations_list_result.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_operations_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_properties.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_properties.rb index 8207d78e7c..c490f00cb1 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_properties.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FeatureProperties include MsRestAzure - include MsRest::JSONable # @return [String] The registration state of the feature for the # subscription. attr_accessor :state diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_result.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_result.rb index 865d614a1d..9d6a2444d9 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_result.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/models/feature_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FeatureResult include MsRestAzure - include MsRest::JSONable # @return [String] The name of the feature. attr_accessor :name diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/module_definition.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/module_definition.rb index 18b756bc3a..299679ac3c 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/module_definition.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/version.rb b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/version.rb index b6bd775448..65ad308fb2 100644 --- a/management/azure_mgmt_features/lib/generated/azure_mgmt_features/version.rb +++ b/management/azure_mgmt_features/lib/generated/azure_mgmt_features/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Features - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_graph/azure_mgmt_graph.gemspec b/management/azure_mgmt_graph/azure_mgmt_graph.gemspec index f1425a85ed..d41255d927 100644 --- a/management/azure_mgmt_graph/azure_mgmt_graph.gemspec +++ b/management/azure_mgmt_graph/azure_mgmt_graph.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph.rb old mode 100755 new mode 100644 index 9d472b07b8..1db99f7050 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -34,34 +34,39 @@ module Models autoload :GroupGetMemberGroupsResult, 'generated/azure_mgmt_graph/models/group_get_member_groups_result.rb' autoload :PasswordCredential, 'generated/azure_mgmt_graph/models/password_credential.rb' autoload :CheckGroupMembershipParameters, 'generated/azure_mgmt_graph/models/check_group_membership_parameters.rb' - autoload :ApplicationUpdateParameters, 'generated/azure_mgmt_graph/models/application_update_parameters.rb' + autoload :RequiredResourceAccess, 'generated/azure_mgmt_graph/models/required_resource_access.rb' autoload :CheckGroupMembershipResult, 'generated/azure_mgmt_graph/models/check_group_membership_result.rb' - autoload :ApplicationListResult, 'generated/azure_mgmt_graph/models/application_list_result.rb' + autoload :ApplicationUpdateParameters, 'generated/azure_mgmt_graph/models/application_update_parameters.rb' autoload :ServicePrincipalCreateParameters, 'generated/azure_mgmt_graph/models/service_principal_create_parameters.rb' - autoload :KeyCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb' + autoload :ApplicationListResult, 'generated/azure_mgmt_graph/models/application_list_result.rb' autoload :ServicePrincipal, 'generated/azure_mgmt_graph/models/service_principal.rb' - autoload :PasswordCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb' + autoload :KeyCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb' autoload :ServicePrincipalListResult, 'generated/azure_mgmt_graph/models/service_principal_list_result.rb' - autoload :GetObjectsResult, 'generated/azure_mgmt_graph/models/get_objects_result.rb' + autoload :PasswordCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb' autoload :PasswordProfile, 'generated/azure_mgmt_graph/models/password_profile.rb' + autoload :GetObjectsResult, 'generated/azure_mgmt_graph/models/get_objects_result.rb' + autoload :UserBase, 'generated/azure_mgmt_graph/models/user_base.rb' autoload :GroupCreateParameters, 'generated/azure_mgmt_graph/models/group_create_parameters.rb' - autoload :UserCreateParameters, 'generated/azure_mgmt_graph/models/user_create_parameters.rb' - autoload :GroupListResult, 'generated/azure_mgmt_graph/models/group_list_result.rb' - autoload :UserUpdateParameters, 'generated/azure_mgmt_graph/models/user_update_parameters.rb' + autoload :GroupAddMemberParameters, 'generated/azure_mgmt_graph/models/group_add_member_parameters.rb' + autoload :ADGroup, 'generated/azure_mgmt_graph/models/adgroup.rb' + autoload :KeyCredential, 'generated/azure_mgmt_graph/models/key_credential.rb' autoload :ApplicationCreateParameters, 'generated/azure_mgmt_graph/models/application_create_parameters.rb' - autoload :User, 'generated/azure_mgmt_graph/models/user.rb' + autoload :DomainListResult, 'generated/azure_mgmt_graph/models/domain_list_result.rb' autoload :KeyCredentialListResult, 'generated/azure_mgmt_graph/models/key_credential_list_result.rb' - autoload :UserGetMemberGroupsParameters, 'generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb' + autoload :SignInName, 'generated/azure_mgmt_graph/models/sign_in_name.rb' autoload :AADObject, 'generated/azure_mgmt_graph/models/aadobject.rb' + autoload :Domain, 'generated/azure_mgmt_graph/models/domain.rb' + autoload :ResourceAccess, 'generated/azure_mgmt_graph/models/resource_access.rb' + autoload :UserGetMemberGroupsParameters, 'generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb' + autoload :PasswordCredentialListResult, 'generated/azure_mgmt_graph/models/password_credential_list_result.rb' autoload :UserGetMemberGroupsResult, 'generated/azure_mgmt_graph/models/user_get_member_groups_result.rb' - autoload :ADGroup, 'generated/azure_mgmt_graph/models/adgroup.rb' - autoload :UserListResult, 'generated/azure_mgmt_graph/models/user_list_result.rb' autoload :Application, 'generated/azure_mgmt_graph/models/application.rb' + autoload :UserListResult, 'generated/azure_mgmt_graph/models/user_list_result.rb' + autoload :GroupListResult, 'generated/azure_mgmt_graph/models/group_list_result.rb' autoload :GetObjectsParameters, 'generated/azure_mgmt_graph/models/get_objects_parameters.rb' - autoload :GroupAddMemberParameters, 'generated/azure_mgmt_graph/models/group_add_member_parameters.rb' - autoload :Domain, 'generated/azure_mgmt_graph/models/domain.rb' - autoload :PasswordCredentialListResult, 'generated/azure_mgmt_graph/models/password_credential_list_result.rb' - autoload :DomainListResult, 'generated/azure_mgmt_graph/models/domain_list_result.rb' - autoload :KeyCredential, 'generated/azure_mgmt_graph/models/key_credential.rb' + autoload :UserCreateParameters, 'generated/azure_mgmt_graph/models/user_create_parameters.rb' + autoload :UserUpdateParameters, 'generated/azure_mgmt_graph/models/user_update_parameters.rb' + autoload :User, 'generated/azure_mgmt_graph/models/user.rb' + autoload :UserType, 'generated/azure_mgmt_graph/models/user_type.rb' end end diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/applications.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/applications.rb old mode 100755 new mode 100644 index b217a001b0..905c9f1322 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/applications.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/applications.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/domains.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/domains.rb index b87d5e9e90..6120764039 100644 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/domains.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/domains.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/graph_rbac_management_client.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/graph_rbac_management_client.rb old mode 100755 new mode 100644 index c0926f012b..ece36a9169 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/graph_rbac_management_client.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/graph_rbac_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/groups.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/groups.rb old mode 100755 new mode 100644 index 83935fb045..808c056b3b --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/groups.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/groups.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/aadobject.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/aadobject.rb old mode 100755 new mode 100644 index f3b0964681..fee523e01a --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/aadobject.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/aadobject.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AADObject include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the object. attr_accessor :object_id diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/adgroup.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/adgroup.rb old mode 100755 new mode 100644 index c080f2346b..746e03499e --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/adgroup.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/adgroup.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ADGroup include MsRestAzure - include MsRest::JSONable # @return [String] The object ID. attr_accessor :object_id diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application.rb old mode 100755 new mode 100644 index c6c68204ef..095fdb2c48 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Application include MsRestAzure - include MsRest::JSONable # @return [String] The object ID. attr_accessor :object_id @@ -41,6 +40,9 @@ class Application # @return [String] The home page of the application. attr_accessor :homepage + # @return [Boolean] Whether to allow implicit grant flow for OAuth2 + attr_accessor :oauth2allow_implicit_flow + # # Mapper for Application class as Ruby Hash. @@ -137,6 +139,13 @@ def self.mapper() type: { name: 'String' } + }, + oauth2allow_implicit_flow: { + required: false, + serialized_name: 'oauth2AllowImplicitFlow', + type: { + name: 'Boolean' + } } } } diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_create_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_create_parameters.rb old mode 100755 new mode 100644 index bd58902373..61a1b2d1d1 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_create_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationCreateParameters include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether the application is available to other # tenants. attr_accessor :available_to_other_tenants @@ -36,6 +35,16 @@ class ApplicationCreateParameters # objects. attr_accessor :password_credentials + # @return [Boolean] Whether to allow implicit grant flow for OAuth2 + attr_accessor :oauth2allow_implicit_flow + + # @return [Array] Specifies resources that this + # application requires access to and the set of OAuth permission scopes + # and application roles that it needs under each of those resources. This + # pre-configuration of required resource access drives the consent + # experience. + attr_accessor :required_resource_access + # # Mapper for ApplicationCreateParameters class as Ruby Hash. @@ -127,6 +136,28 @@ def self.mapper() } } } + }, + oauth2allow_implicit_flow: { + required: false, + serialized_name: 'oauth2AllowImplicitFlow', + type: { + name: 'Boolean' + } + }, + required_resource_access: { + required: false, + serialized_name: 'requiredResourceAccess', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RequiredResourceAccessElementType', + type: { + name: 'Composite', + class_name: 'RequiredResourceAccess' + } + } + } } } } diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_list_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_list_result.rb old mode 100755 new mode 100644 index d3471f4b19..32603c9e30 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_list_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_update_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_update_parameters.rb old mode 100755 new mode 100644 index df8ddd00b1..28900cf5e9 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_update_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/application_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether the application is available to other tenants attr_accessor :available_to_other_tenants @@ -35,6 +34,16 @@ class ApplicationUpdateParameters # objects. attr_accessor :password_credentials + # @return [Boolean] Whether to allow implicit grant flow for OAuth2 + attr_accessor :oauth2allow_implicit_flow + + # @return [Array] Specifies resources that this + # application requires access to and the set of OAuth permission scopes + # and application roles that it needs under each of those resources. This + # pre-configuration of required resource access drives the consent + # experience. + attr_accessor :required_resource_access + # # Mapper for ApplicationUpdateParameters class as Ruby Hash. @@ -126,6 +135,28 @@ def self.mapper() } } } + }, + oauth2allow_implicit_flow: { + required: false, + serialized_name: 'oauth2AllowImplicitFlow', + type: { + name: 'Boolean' + } + }, + required_resource_access: { + required: false, + serialized_name: 'requiredResourceAccess', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RequiredResourceAccessElementType', + type: { + name: 'Composite', + class_name: 'RequiredResourceAccess' + } + } + } } } } diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_parameters.rb old mode 100755 new mode 100644 index bb3dae5b7d..86b985aade --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckGroupMembershipParameters include MsRestAzure - include MsRest::JSONable # @return [String] The object ID of the group to check. attr_accessor :group_id diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_result.rb old mode 100755 new mode 100644 index 3e460099d2..e47cb4144b --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/check_group_membership_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckGroupMembershipResult include MsRestAzure - include MsRest::JSONable # @return [Boolean] True if the specified user, group, contact, or # service principal has either direct or transitive membership in the # specified group; otherwise, false. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain.rb index 30dfc1999c..c6a573606d 100644 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Domain include MsRestAzure - include MsRest::JSONable # @return [String] the type of the authentication into the domain. attr_accessor :authentication_type diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain_list_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain_list_result.rb index 8aa1d62597..776a46a798 100644 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain_list_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/domain_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DomainListResult include MsRestAzure - include MsRest::JSONable # @return [Array] the list of domains. attr_accessor :value diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_parameters.rb old mode 100755 new mode 100644 index 8269104f9b..e841dce25e --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GetObjectsParameters include MsRestAzure - include MsRest::JSONable # @return [Array] The requested object IDs. attr_accessor :object_ids diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_result.rb old mode 100755 new mode 100644 index e196ea7d54..4d58c02f90 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/get_objects_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/graph_error.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/graph_error.rb old mode 100755 new mode 100644 index b128c4fbf1..e2fe7408d8 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/graph_error.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/graph_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GraphError include MsRestAzure - include MsRest::JSONable # @return [String] Error code. attr_accessor :code diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_add_member_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_add_member_parameters.rb old mode 100755 new mode 100644 index 4d1489be0e..8c252f66c2 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_add_member_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_add_member_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GroupAddMemberParameters include MsRestAzure - include MsRest::JSONable # @return [String] A member object URL, such as # "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", # where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_create_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_create_parameters.rb old mode 100755 new mode 100644 index e6cb933718..9031af0913 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_create_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GroupCreateParameters include MsRestAzure - include MsRest::JSONable # @return [String] Group display name attr_accessor :display_name diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_parameters.rb old mode 100755 new mode 100644 index f7e7c327fb..4185c4da18 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GroupGetMemberGroupsParameters include MsRestAzure - include MsRest::JSONable # @return [Boolean] If true, only membership in security-enabled groups # should be checked. Otherwise, membership in all groups should be # checked. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_result.rb old mode 100755 new mode 100644 index 9635741cc0..1f47633736 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_get_member_groups_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GroupGetMemberGroupsResult include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of group IDs of which the group is # a member. attr_accessor :value diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_list_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_list_result.rb old mode 100755 new mode 100644 index ce83b3f76f..8da2bc07a4 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_list_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/group_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential.rb old mode 100755 new mode 100644 index 2383739597..5fdbeae708 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyCredential include MsRestAzure - include MsRest::JSONable # @return [DateTime] Start date. attr_accessor :start_date diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential_list_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential_list_result.rb old mode 100755 new mode 100644 index 6b3dc7c56c..79ff0fe221 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential_list_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credential_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyCredentialListResult include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of KeyCredentials. attr_accessor :value diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb old mode 100755 new mode 100644 index 64d1a2c19d..4c8aee5f04 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyCredentialsUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of KeyCredentials. attr_accessor :value diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential.rb old mode 100755 new mode 100644 index dc6e463139..4e002a4ac7 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PasswordCredential include MsRestAzure - include MsRest::JSONable # @return [DateTime] Start date. attr_accessor :start_date diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential_list_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential_list_result.rb old mode 100755 new mode 100644 index 051943fecd..b1221b58a0 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential_list_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credential_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PasswordCredentialListResult include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of # PasswordCredentials. attr_accessor :value diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb old mode 100755 new mode 100644 index af66179236..a578075782 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PasswordCredentialsUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of # PasswordCredentials. attr_accessor :value diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_profile.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_profile.rb old mode 100755 new mode 100644 index b365ba1439..6d349b5288 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_profile.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/password_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PasswordProfile include MsRestAzure - include MsRest::JSONable # @return [String] Password attr_accessor :password diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/required_resource_access.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/required_resource_access.rb new file mode 100644 index 0000000000..029ee8b23a --- /dev/null +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/required_resource_access.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::ARM::Graph + module Models + # + # Specifies the set of OAuth 2.0 permission scopes and app roles under the + # specified resource that an application requires access to. The specified + # OAuth 2.0 permission scopes may be requested by client applications + # (through the requiredResourceAccess collection) when calling a resource + # application. The requiredResourceAccess property of the Application + # entity is a collection of ReqiredResourceAccess. + # + class RequiredResourceAccess + + include MsRestAzure + + # @return [Array] The list of OAuth2.0 permission scopes + # and app roles that the application requires from the specified + # resource. + attr_accessor :resource_access + + # @return [String] The unique identifier for the resource that the + # application requires access to. This should be equal to the appId + # declared on the target resource application. + attr_accessor :resource_app_id + + + # + # Mapper for RequiredResourceAccess class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RequiredResourceAccess', + type: { + name: 'Composite', + class_name: 'RequiredResourceAccess', + model_properties: { + resource_access: { + required: true, + serialized_name: 'resourceAccess', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ResourceAccessElementType', + type: { + name: 'Composite', + class_name: 'ResourceAccess' + } + } + } + }, + resource_app_id: { + required: false, + serialized_name: 'resourceAppId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/resource_access.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/resource_access.rb new file mode 100644 index 0000000000..915962c7b5 --- /dev/null +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/resource_access.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::ARM::Graph + module Models + # + # Specifies an OAuth 2.0 permission scope or an app role that an + # application requires. The resourceAccess property of the + # RequiredResourceAccess type is a collection of ResourceAccess. + # + class ResourceAccess + + include MsRestAzure + + # @return [String] The unique identifier for one of the OAuth2Permission + # or AppRole instances that the resource application exposes. + attr_accessor :id + + # @return [String] Specifies whether the id property references an + # OAuth2Permission or an AppRole. Possible values are "scope" or "role". + attr_accessor :type + + + # + # Mapper for ResourceAccess class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceAccess', + type: { + name: 'Composite', + class_name: 'ResourceAccess', + model_properties: { + id: { + required: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal.rb old mode 100755 new mode 100644 index 7a7129dd44..652a74f515 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServicePrincipal include MsRestAzure - include MsRest::JSONable # @return [String] The object ID. attr_accessor :object_id diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_create_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_create_parameters.rb old mode 100755 new mode 100644 index 92be413443..4174700e2c --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_create_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServicePrincipalCreateParameters include MsRestAzure - include MsRest::JSONable # @return [String] application Id attr_accessor :app_id diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_list_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_list_result.rb old mode 100755 new mode 100644 index 8f9f7d26f5..b379d7b20a --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_list_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/service_principal_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/sign_in_name.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/sign_in_name.rb new file mode 100644 index 0000000000..193d41f229 --- /dev/null +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/sign_in_name.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Graph + module Models + # + # Contains information about a sign-in name of a local account user in an + # Azure Active Directory B2C tenant. + # + class SignInName + + include MsRestAzure + + # @return [String] A string value that can be used to classify user + # sign-in types in your directory, such as 'emailAddress' or 'userName'. + attr_accessor :type + + # @return [String] The sign-in used by the local account. Must be unique + # across the company/tenant. For example, 'johnc@example.com'. + attr_accessor :value + + + # + # Mapper for SignInName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SignInName', + type: { + name: 'Composite', + class_name: 'SignInName', + model_properties: { + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user.rb old mode 100755 new mode 100644 index 0257271007..182cf303c3 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,37 +8,33 @@ module Models # # Active Directory user information. # - class User + class User < UserBase include MsRestAzure - include MsRest::JSONable - # @return [String] The object ID. - attr_accessor :object_id + # @return [Boolean] Whether the account is enabled. + attr_accessor :account_enabled - # @return [String] The object type. - attr_accessor :object_type + # @return [String] The display name of the user. + attr_accessor :display_name # @return [String] The principal name of the user. attr_accessor :user_principal_name - # @return [String] The display name of the user. - attr_accessor :display_name - - # @return [String] The sign-in name of the user. - attr_accessor :sign_in_name + # @return [String] The mail alias for the user. + attr_accessor :mail_nickname # @return [String] The primary email address of the user. attr_accessor :mail - # @return [String] The mail alias for the user. - attr_accessor :mail_nickname + # @return [String] The object ID. + attr_accessor :object_id - # @return [String] A two letter country code (ISO standard 3166). - # Required for users that will be assigned licenses due to legal - # requirement to check for availability of services in countries. - # Examples include: "US", "JP", and "GB". - attr_accessor :usage_location + # @return [String] The object type. + attr_accessor :object_type + + # @return [Array] The sign-in names of the user. + attr_accessor :sign_in_names # @@ -53,27 +49,48 @@ def self.mapper() name: 'Composite', class_name: 'User', model_properties: { - object_id: { + immutable_id: { required: false, - serialized_name: 'objectId', + serialized_name: 'immutableId', type: { name: 'String' } }, - object_type: { + usage_location: { required: false, - serialized_name: 'objectType', + serialized_name: 'usageLocation', type: { name: 'String' } }, - user_principal_name: { + given_name: { required: false, - serialized_name: 'userPrincipalName', + serialized_name: 'givenName', + type: { + name: 'String' + } + }, + surname: { + required: false, + serialized_name: 'surname', type: { name: 'String' } }, + user_type: { + required: false, + serialized_name: 'userType', + type: { + name: 'String' + } + }, + account_enabled: { + required: false, + serialized_name: 'accountEnabled', + type: { + name: 'Boolean' + } + }, display_name: { required: false, serialized_name: 'displayName', @@ -81,9 +98,16 @@ def self.mapper() name: 'String' } }, - sign_in_name: { + user_principal_name: { + required: false, + serialized_name: 'userPrincipalName', + type: { + name: 'String' + } + }, + mail_nickname: { required: false, - serialized_name: 'signInName', + serialized_name: 'mailNickname', type: { name: 'String' } @@ -95,19 +119,34 @@ def self.mapper() name: 'String' } }, - mail_nickname: { + object_id: { required: false, - serialized_name: 'mailNickname', + serialized_name: 'objectId', type: { name: 'String' } }, - usage_location: { + object_type: { required: false, - serialized_name: 'usageLocation', + serialized_name: 'objectType', type: { name: 'String' } + }, + sign_in_names: { + required: false, + serialized_name: 'signInNames', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SignInNameElementType', + type: { + name: 'Composite', + class_name: 'SignInName' + } + } + } } } } diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_base.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_base.rb new file mode 100644 index 0000000000..daf7e3e752 --- /dev/null +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_base.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::ARM::Graph + module Models + # + # Model object. + # + # + class UserBase + + include MsRestAzure + + # @return [String] This must be specified if you are using a federated + # domain for the user's userPrincipalName (UPN) property when creating a + # new user account. It is used to associate an on-premises Active + # Directory user account with their Azure AD user object. + attr_accessor :immutable_id + + # @return [String] A two letter country code (ISO standard 3166). + # Required for users that will be assigned licenses due to legal + # requirement to check for availability of services in countries. + # Examples include: "US", "JP", and "GB". + attr_accessor :usage_location + + # @return [String] The given name for the user. + attr_accessor :given_name + + # @return [String] The user's surname (family name or last name). + attr_accessor :surname + + # @return [UserType] A string value that can be used to classify user + # types in your directory, such as 'Member' and 'Guest'. Possible values + # include: 'Member', 'Guest' + attr_accessor :user_type + + + # + # Mapper for UserBase class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UserBase', + type: { + name: 'Composite', + class_name: 'UserBase', + model_properties: { + immutable_id: { + required: false, + serialized_name: 'immutableId', + type: { + name: 'String' + } + }, + usage_location: { + required: false, + serialized_name: 'usageLocation', + type: { + name: 'String' + } + }, + given_name: { + required: false, + serialized_name: 'givenName', + type: { + name: 'String' + } + }, + surname: { + required: false, + serialized_name: 'surname', + type: { + name: 'String' + } + }, + user_type: { + required: false, + serialized_name: 'userType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_create_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_create_parameters.rb old mode 100755 new mode 100644 index 76aec390b3..82e2b8651e --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_create_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Request parameters for creating a new work or school account user. # - class UserCreateParameters + class UserCreateParameters < UserBase include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether the account is enabled. attr_accessor :account_enabled @@ -29,17 +28,8 @@ class UserCreateParameters # @return [String] The mail alias for the user. attr_accessor :mail_nickname - # @return [String] This must be specified if you are using a federated - # domain for the user's userPrincipalName (UPN) property when creating a - # new user account. It is used to associate an on-premises Active - # Directory user account with their Azure AD user object. - attr_accessor :immutable_id - - # @return [String] A two letter country code (ISO standard 3166). - # Required for users that will be assigned licenses due to legal - # requirement to check for availability of services in countries. - # Examples include: "US", "JP", and "GB". - attr_accessor :usage_location + # @return [String] The primary email address of the user. + attr_accessor :mail # @@ -54,6 +44,41 @@ def self.mapper() name: 'Composite', class_name: 'UserCreateParameters', model_properties: { + immutable_id: { + required: false, + serialized_name: 'immutableId', + type: { + name: 'String' + } + }, + usage_location: { + required: false, + serialized_name: 'usageLocation', + type: { + name: 'String' + } + }, + given_name: { + required: false, + serialized_name: 'givenName', + type: { + name: 'String' + } + }, + surname: { + required: false, + serialized_name: 'surname', + type: { + name: 'String' + } + }, + user_type: { + required: false, + serialized_name: 'userType', + type: { + name: 'String' + } + }, account_enabled: { required: true, serialized_name: 'accountEnabled', @@ -90,16 +115,9 @@ def self.mapper() name: 'String' } }, - immutable_id: { + mail: { required: false, - serialized_name: 'immutableId', - type: { - name: 'String' - } - }, - usage_location: { - required: false, - serialized_name: 'usageLocation', + serialized_name: 'mail', type: { name: 'String' } diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb old mode 100755 new mode 100644 index e00cba11d0..2b62f81559 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UserGetMemberGroupsParameters include MsRestAzure - include MsRest::JSONable # @return [Boolean] If true, only membership in security-enabled groups # should be checked. Otherwise, membership in all groups should be # checked. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_result.rb old mode 100755 new mode 100644 index fb96119295..0bec79f4d0 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_get_member_groups_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UserGetMemberGroupsResult include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of group IDs of which the user is # a member. attr_accessor :value diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_list_result.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_list_result.rb old mode 100755 new mode 100644 index 47d0aa422f..d3efa476fe --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_list_result.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_type.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_type.rb new file mode 100644 index 0000000000..bb960f46b3 --- /dev/null +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_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::ARM::Graph + module Models + # + # Defines values for UserType + # + module UserType + Member = "Member" + Guest = "Guest" + end + end +end diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_update_parameters.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_update_parameters.rb old mode 100755 new mode 100644 index 67ee87a4fc..3a27afd9d8 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_update_parameters.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/models/user_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Request parameters for updating an existing work or school account user. # - class UserUpdateParameters + class UserUpdateParameters < UserBase include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether the account is enabled. attr_accessor :account_enabled @@ -22,15 +21,13 @@ class UserUpdateParameters # @return [PasswordProfile] The password profile of the user. attr_accessor :password_profile + # @return [String] The user principal name (someuser@contoso.com). It + # must contain one of the verified domains for the tenant. + attr_accessor :user_principal_name + # @return [String] The mail alias for the user. attr_accessor :mail_nickname - # @return [String] A two letter country code (ISO standard 3166). - # Required for users that will be assigned licenses due to legal - # requirement to check for availability of services in countries. - # Examples include: "US", "JP", and "GB". - attr_accessor :usage_location - # # Mapper for UserUpdateParameters class as Ruby Hash. @@ -44,6 +41,41 @@ def self.mapper() name: 'Composite', class_name: 'UserUpdateParameters', model_properties: { + immutable_id: { + required: false, + serialized_name: 'immutableId', + type: { + name: 'String' + } + }, + usage_location: { + required: false, + serialized_name: 'usageLocation', + type: { + name: 'String' + } + }, + given_name: { + required: false, + serialized_name: 'givenName', + type: { + name: 'String' + } + }, + surname: { + required: false, + serialized_name: 'surname', + type: { + name: 'String' + } + }, + user_type: { + required: false, + serialized_name: 'userType', + type: { + name: 'String' + } + }, account_enabled: { required: false, serialized_name: 'accountEnabled', @@ -66,16 +98,16 @@ def self.mapper() class_name: 'PasswordProfile' } }, - mail_nickname: { + user_principal_name: { required: false, - serialized_name: 'mailNickname', + serialized_name: 'userPrincipalName', type: { name: 'String' } }, - usage_location: { + mail_nickname: { required: false, - serialized_name: 'usageLocation', + serialized_name: 'mailNickname', type: { name: 'String' } diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/module_definition.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/module_definition.rb old mode 100755 new mode 100644 index 95c714f32c..72bf75f03c --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/module_definition.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/objects.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/objects.rb old mode 100755 new mode 100644 index e7074073cc..13127ada41 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/objects.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/objects.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/service_principals.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/service_principals.rb old mode 100755 new mode 100644 index a88ea2d394..370167e51a --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/service_principals.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/service_principals.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/users.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/users.rb old mode 100755 new mode 100644 index a505374f18..66bc704703 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/users.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/users.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/version.rb b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/version.rb old mode 100755 new mode 100644 index a3300b8c01..bb98acd680 --- a/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/version.rb +++ b/management/azure_mgmt_graph/lib/generated/azure_mgmt_graph/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Graph - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_iot_hub/azure_mgmt_iot_hub.gemspec b/management/azure_mgmt_iot_hub/azure_mgmt_iot_hub.gemspec index 69723d1f43..6d8994e7fe 100644 --- a/management/azure_mgmt_iot_hub/azure_mgmt_iot_hub.gemspec +++ b/management/azure_mgmt_iot_hub/azure_mgmt_iot_hub.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub.rb old mode 100755 new mode 100644 index bc23d0aa07..24726c170d --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -20,43 +20,57 @@ require 'ms_rest_azure' module Azure::ARM::IotHub + autoload :Operations, 'generated/azure_mgmt_iot_hub/operations.rb' autoload :IotHubResource, 'generated/azure_mgmt_iot_hub/iot_hub_resource.rb' + autoload :Certificates, 'generated/azure_mgmt_iot_hub/certificates.rb' autoload :IotHubClient, 'generated/azure_mgmt_iot_hub/iot_hub_client.rb' module Models - autoload :SharedAccessSignatureAuthorizationRule, 'generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb' + autoload :IotHubProperties, 'generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb' + autoload :IotHubSkuInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb' + autoload :CertificateBodyDescription, 'generated/azure_mgmt_iot_hub/models/certificate_body_description.rb' + autoload :CertificateProperties, 'generated/azure_mgmt_iot_hub/models/certificate_properties.rb' + autoload :CertificateListDescription, 'generated/azure_mgmt_iot_hub/models/certificate_list_description.rb' + autoload :Resource, 'generated/azure_mgmt_iot_hub/models/resource.rb' + autoload :CertificateWithNonceDescription, 'generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb' autoload :SharedAccessSignatureAuthorizationRuleListResult, 'generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb' - autoload :EventHubProperties, 'generated/azure_mgmt_iot_hub/models/event_hub_properties.rb' + autoload :IpFilterRule, 'generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_iot_hub/models/operation_display.rb' + autoload :RoutingServiceBusQueueEndpointProperties, 'generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb' + autoload :Operation, 'generated/azure_mgmt_iot_hub/models/operation.rb' + autoload :RoutingEventHubProperties, 'generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb' + autoload :OperationListResult, 'generated/azure_mgmt_iot_hub/models/operation_list_result.rb' + autoload :RoutingEndpoints, 'generated/azure_mgmt_iot_hub/models/routing_endpoints.rb' autoload :ErrorDetails, 'generated/azure_mgmt_iot_hub/models/error_details.rb' - autoload :RoutingServiceBusTopicEndpointProperties, 'generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb' + autoload :FallbackRouteProperties, 'generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb' autoload :IotHubQuotaMetricInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb' - autoload :RoutingEndpoints, 'generated/azure_mgmt_iot_hub/models/routing_endpoints.rb' + autoload :StorageEndpointProperties, 'generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb' autoload :IotHubQuotaMetricInfoListResult, 'generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb' - autoload :FallbackRouteProperties, 'generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb' + autoload :FeedbackProperties, 'generated/azure_mgmt_iot_hub/models/feedback_properties.rb' autoload :RegistryStatistics, 'generated/azure_mgmt_iot_hub/models/registry_statistics.rb' - autoload :StorageEndpointProperties, 'generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb' + autoload :OperationsMonitoringProperties, 'generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb' autoload :JobResponse, 'generated/azure_mgmt_iot_hub/models/job_response.rb' - autoload :FeedbackProperties, 'generated/azure_mgmt_iot_hub/models/feedback_properties.rb' + autoload :CertificateDescription, 'generated/azure_mgmt_iot_hub/models/certificate_description.rb' autoload :JobResponseListResult, 'generated/azure_mgmt_iot_hub/models/job_response_list_result.rb' - autoload :OperationsMonitoringProperties, 'generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb' + autoload :SharedAccessSignatureAuthorizationRule, 'generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb' autoload :IotHubCapacity, 'generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb' - autoload :IotHubSkuInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb' + autoload :RoutingServiceBusTopicEndpointProperties, 'generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb' autoload :IotHubSkuDescription, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb' - autoload :IpFilterRule, 'generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb' + autoload :RouteProperties, 'generated/azure_mgmt_iot_hub/models/route_properties.rb' autoload :EventHubConsumerGroupsListResult, 'generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb' - autoload :RoutingEventHubProperties, 'generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb' + autoload :MessagingEndpointProperties, 'generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb' autoload :EventHubConsumerGroupInfo, 'generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb' - autoload :RoutingProperties, 'generated/azure_mgmt_iot_hub/models/routing_properties.rb' + autoload :CertificateVerificationDescription, 'generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb' autoload :IotHubSkuDescriptionListResult, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb' - autoload :CloudToDeviceProperties, 'generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb' + autoload :EventHubProperties, 'generated/azure_mgmt_iot_hub/models/event_hub_properties.rb' autoload :IotHubDescriptionListResult, 'generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb' - autoload :RoutingServiceBusQueueEndpointProperties, 'generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb' + autoload :RoutingProperties, 'generated/azure_mgmt_iot_hub/models/routing_properties.rb' autoload :OperationInputs, 'generated/azure_mgmt_iot_hub/models/operation_inputs.rb' - autoload :MessagingEndpointProperties, 'generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb' + autoload :CertificatePropertiesWithNonce, 'generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb' autoload :IotHubNameAvailabilityInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb' - autoload :RouteProperties, 'generated/azure_mgmt_iot_hub/models/route_properties.rb' + autoload :CloudToDeviceProperties, 'generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb' autoload :ExportDevicesRequest, 'generated/azure_mgmt_iot_hub/models/export_devices_request.rb' - autoload :IotHubProperties, 'generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb' + autoload :RoutingStorageContainerProperties, 'generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb' autoload :ImportDevicesRequest, 'generated/azure_mgmt_iot_hub/models/import_devices_request.rb' autoload :IotHubDescription, 'generated/azure_mgmt_iot_hub/models/iot_hub_description.rb' autoload :AccessRights, 'generated/azure_mgmt_iot_hub/models/access_rights.rb' diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/certificates.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/certificates.rb new file mode 100644 index 0000000000..c8aebdb33e --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/certificates.rb @@ -0,0 +1,704 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::IotHub + # + # Use this API to manage the IoT hubs in your Azure subscription. + # + class Certificates + include MsRestAzure + + # + # Creates and initializes a new instance of the Certificates class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [IotHubClient] reference to the IotHubClient + attr_reader :client + + # + # Get the certificate list. + # + # Returns the list of certificates. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateListDescription] operation results. + # + def list_by_iot_hub(resource_group_name, resource_name, custom_headers = nil) + response = list_by_iot_hub_async(resource_group_name, resource_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the certificate list. + # + # Returns the list of certificates. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param custom_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_iot_hub_with_http_info(resource_group_name, resource_name, custom_headers = nil) + list_by_iot_hub_async(resource_group_name, resource_name, custom_headers).value! + end + + # + # Get the certificate list. + # + # Returns the list of certificates. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param [Hash{String => String}] 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_iot_hub_async(resource_group_name, resource_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_name.nil? + + + request_headers = {} + + # Set Headers + request_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.Devices/IotHubs/{resourceName}/certificates' + + 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,'resourceName' => resource_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::ARM::IotHub::Models::CertificateListDescription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 certificate. + # + # Returns the certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateDescription] operation results. + # + def get(resource_group_name, resource_name, certificate_name, custom_headers = nil) + response = get_async(resource_group_name, resource_name, certificate_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the certificate. + # + # Returns the certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param custom_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, resource_name, certificate_name, custom_headers = nil) + get_async(resource_group_name, resource_name, certificate_name, custom_headers).value! + end + + # + # Get the certificate. + # + # Returns the certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param [Hash{String => String}] 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, resource_name, certificate_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.nil? + + + request_headers = {} + + # Set Headers + request_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.Devices/IotHubs/{resourceName}/certificates/{certificateName}' + + 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,'resourceName' => resource_name,'certificateName' => certificate_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::ARM::IotHub::Models::CertificateDescription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Upload the certificate to the IoT hub. + # + # Adds new or replaces existing certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param certificate_description [CertificateBodyDescription] The certificate + # body. + # @param if_match [String] ETag of the Certificate. Do not specify for creating + # a brand new certificate. Required to update an existing certificate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateDescription] operation results. + # + def create_or_update(resource_group_name, resource_name, certificate_name, certificate_description, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Upload the certificate to the IoT hub. + # + # Adds new or replaces existing certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param certificate_description [CertificateBodyDescription] The certificate + # body. + # @param if_match [String] ETag of the Certificate. Do not specify for creating + # a brand new certificate. Required to update an existing certificate. + # @param custom_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, resource_name, certificate_name, certificate_description, if_match = nil, custom_headers = nil) + create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match, custom_headers).value! + end + + # + # Upload the certificate to the IoT hub. + # + # Adds new or replaces existing certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param certificate_description [CertificateBodyDescription] The certificate + # body. + # @param if_match [String] ETag of the Certificate. Do not specify for creating + # a brand new certificate. Required to update an existing certificate. + # @param [Hash{String => String}] 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, resource_name, certificate_name, certificate_description, if_match = nil, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.nil? + fail ArgumentError, 'certificate_description is nil' if certificate_description.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::ARM::IotHub::Models::CertificateBodyDescription.mapper() + request_content = @client.serialize(request_mapper, certificate_description) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}' + + 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,'resourceName' => resource_name,'certificateName' => certificate_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(: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::ARM::IotHub::Models::CertificateDescription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::IotHub::Models::CertificateDescription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an X509 certificate. + # + # Deletes an existing X509 certificate or does nothing if it does not exist. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, resource_name, certificate_name, if_match, custom_headers = nil) + response = delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers).value! + nil + end + + # + # Delete an X509 certificate. + # + # Deletes an existing X509 certificate or does nothing if it does not exist. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param custom_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, resource_name, certificate_name, if_match, custom_headers = nil) + delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers).value! + end + + # + # Delete an X509 certificate. + # + # Deletes an existing X509 certificate or does nothing if it does not exist. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param [Hash{String => String}] 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, resource_name, certificate_name, if_match, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.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.Devices/IotHubs/{resourceName}/certificates/{certificateName}' + + 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,'resourceName' => resource_name,'certificateName' => certificate_name}, + 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 + + # + # Generate verification code for proof of possession flow. + # + # Generates verification code for proof of possession flow. The verification + # code will be used to generate a leaf certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateWithNonceDescription] operation results. + # + def generate_verification_code(resource_group_name, resource_name, certificate_name, if_match, custom_headers = nil) + response = generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Generate verification code for proof of possession flow. + # + # Generates verification code for proof of possession flow. The verification + # code will be used to generate a leaf certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param custom_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_verification_code_with_http_info(resource_group_name, resource_name, certificate_name, if_match, custom_headers = nil) + generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers).value! + end + + # + # Generate verification code for proof of possession flow. + # + # Generates verification code for proof of possession flow. The verification + # code will be used to generate a leaf certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param [Hash{String => String}] 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_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.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.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode' + + 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,'resourceName' => resource_name,'certificateName' => certificate_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 == 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::ARM::IotHub::Models::CertificateWithNonceDescription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Verify certificate's private key possession. + # + # Verifies the certificate's private key possession by providing the leaf cert + # issued by the verifying pre uploaded certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param certificate_verification_body [CertificateVerificationDescription] The + # name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CertificateDescription] operation results. + # + def verify(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers = nil) + response = verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Verify certificate's private key possession. + # + # Verifies the certificate's private key possession by providing the leaf cert + # issued by the verifying pre uploaded certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param certificate_verification_body [CertificateVerificationDescription] The + # name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def verify_with_http_info(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers = nil) + verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers).value! + end + + # + # Verify certificate's private key possession. + # + # Verifies the certificate's private key possession by providing the leaf cert + # issued by the verifying pre uploaded certificate. + # + # @param resource_group_name [String] The name of the resource group that + # contains the IoT hub. + # @param resource_name [String] The name of the IoT hub. + # @param certificate_name [String] The name of the certificate + # @param certificate_verification_body [CertificateVerificationDescription] The + # name of the certificate + # @param if_match [String] ETag of the Certificate. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'resource_name is nil' if resource_name.nil? + fail ArgumentError, 'certificate_name is nil' if certificate_name.nil? + fail ArgumentError, 'certificate_verification_body is nil' if certificate_verification_body.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::ARM::IotHub::Models::CertificateVerificationDescription.mapper() + request_content = @client.serialize(request_mapper, certificate_verification_body) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify' + + 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,'resourceName' => resource_name,'certificateName' => certificate_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 == 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::ARM::IotHub::Models::CertificateDescription.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_client.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_client.rb old mode 100755 new mode 100644 index dd27c50295..87381275ef --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_client.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -34,9 +34,15 @@ class IotHubClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id + # @return [Operations] operations + attr_reader :operations + # @return [IotHubResource] iot_hub_resource attr_reader :iot_hub_resource + # @return [Certificates] certificates + attr_reader :certificates + # # Creates initializes a new instance of the IotHubClient class. # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @@ -50,8 +56,10 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials + @operations = Operations.new(self) @iot_hub_resource = IotHubResource.new(self) - @api_version = '2017-01-19' + @certificates = Certificates.new(self) + @api_version = '2017-07-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_resource.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_resource.rb old mode 100755 new mode 100644 index 2ae70edaca..a89a4b4c3b --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/iot_hub_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -130,34 +130,38 @@ def get_async(resource_group_name, resource_name, custom_headers = nil) # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to create or update. + # @param resource_name [String] The name of the IoT hub. # @param iot_hub_description [IotHubDescription] The IoT hub metadata and # security metadata. + # @param if_match [String] ETag of the IoT Hub. Do not specify for creating a + # brand new IoT Hub. Required to update an existing IoT Hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [IotHubDescription] operation results. # - def create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers = nil) - response = create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value! + def create_or_update(resource_group_name, resource_name, iot_hub_description, if_match = nil, custom_headers = nil) + response = create_or_update_async(resource_group_name, resource_name, iot_hub_description, if_match, custom_headers).value! response.body unless response.nil? end # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to create or update. + # @param resource_name [String] The name of the IoT hub. # @param iot_hub_description [IotHubDescription] The IoT hub metadata and # security metadata. + # @param if_match [String] ETag of the IoT Hub. Do not specify for creating a + # brand new IoT Hub. Required to update an existing IoT Hub. # @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, resource_name, iot_hub_description, custom_headers = nil) + def create_or_update_async(resource_group_name, resource_name, iot_hub_description, if_match = nil, custom_headers = nil) # Send request - promise = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers) + promise = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, if_match, custom_headers) promise = promise.then do |response| # Defining deserialization method. @@ -180,7 +184,7 @@ def create_or_update_async(resource_group_name, resource_name, iot_hub_descripti # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to delete. + # @param resource_name [String] The name of the IoT hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -194,7 +198,7 @@ def delete(resource_group_name, resource_name, custom_headers = nil) # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to delete. + # @param resource_name [String] The name of the IoT hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -320,7 +324,7 @@ def list_by_subscription_async(custom_headers = nil) # Get all the IoT hubs in a resource group. # # @param resource_group_name [String] The name of the resource group that - # contains the IoT hubs. + # contains the IoT hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -337,7 +341,7 @@ def list_by_resource_group(resource_group_name, custom_headers = nil) # Get all the IoT hubs in a resource group. # # @param resource_group_name [String] The name of the resource group that - # contains the IoT hubs. + # contains the IoT hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -353,7 +357,7 @@ def list_by_resource_group_with_http_info(resource_group_name, custom_headers = # Get all the IoT hubs in a resource group. # # @param resource_group_name [String] The name of the resource group that - # contains the IoT hubs. + # contains the IoT hub. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -1953,16 +1957,18 @@ def import_devices_async(resource_group_name, resource_name, import_devices_para # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to create or update. + # @param resource_name [String] The name of the IoT hub. # @param iot_hub_description [IotHubDescription] The IoT hub metadata and # security metadata. + # @param if_match [String] ETag of the IoT Hub. Do not specify for creating a + # brand new IoT Hub. Required to update an existing IoT Hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [IotHubDescription] operation results. # - def begin_create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers = nil) - response = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value! + def begin_create_or_update(resource_group_name, resource_name, iot_hub_description, if_match = nil, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, if_match, custom_headers).value! response.body unless response.nil? end @@ -1975,16 +1981,18 @@ def begin_create_or_update(resource_group_name, resource_name, iot_hub_descripti # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to create or update. + # @param resource_name [String] The name of the IoT hub. # @param iot_hub_description [IotHubDescription] The IoT hub metadata and # security metadata. + # @param if_match [String] ETag of the IoT Hub. Do not specify for creating a + # brand new IoT Hub. Required to update an existing IoT Hub. # @param custom_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, resource_name, iot_hub_description, custom_headers = nil) - begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value! + def begin_create_or_update_with_http_info(resource_group_name, resource_name, iot_hub_description, if_match = nil, custom_headers = nil) + begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, if_match, custom_headers).value! end # @@ -1996,15 +2004,17 @@ def begin_create_or_update_with_http_info(resource_group_name, resource_name, io # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to create or update. + # @param resource_name [String] The name of the IoT hub. # @param iot_hub_description [IotHubDescription] The IoT hub metadata and # security metadata. + # @param if_match [String] ETag of the IoT Hub. Do not specify for creating a + # brand new IoT Hub. Required to update an existing IoT Hub. # @param [Hash{String => String}] 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, resource_name, iot_hub_description, custom_headers = nil) + def begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, if_match = nil, custom_headers = nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? @@ -2016,6 +2026,7 @@ def begin_create_or_update_async(resource_group_name, resource_name, iot_hub_des # 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' @@ -2083,7 +2094,7 @@ def begin_create_or_update_async(resource_group_name, resource_name, iot_hub_des # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to delete. + # @param resource_name [String] The name of the IoT hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -2101,7 +2112,7 @@ def begin_delete(resource_group_name, resource_name, custom_headers = nil) # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to delete. + # @param resource_name [String] The name of the IoT hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -2118,7 +2129,7 @@ def begin_delete_with_http_info(resource_group_name, resource_name, custom_heade # # @param resource_group_name [String] The name of the resource group that # contains the IoT hub. - # @param resource_name [String] The name of the IoT hub to delete. + # @param resource_name [String] The name of the IoT hub. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -2893,7 +2904,7 @@ def list_by_subscription_as_lazy(custom_headers = nil) # Get all the IoT hubs in a resource group. # # @param resource_group_name [String] The name of the resource group that - # contains the IoT hubs. + # contains the IoT hub. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/access_rights.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/access_rights.rb old mode 100755 new mode 100644 index 75feb1a485..abb70715c8 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/access_rights.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/access_rights.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/capabilities.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/capabilities.rb old mode 100755 new mode 100644 index 8ea47fbc72..f25b60e6be --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/capabilities.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/capabilities.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb new file mode 100644 index 0000000000..616936cec8 --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_body_description.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::ARM::IotHub + module Models + # + # The JSON-serialized X509 Certificate. + # + class CertificateBodyDescription + + include MsRestAzure + + # @return [String] base-64 representation of the X509 leaf certificate + # .cer file or just .pem file content. + attr_accessor :certificate + + + # + # Mapper for CertificateBodyDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateBodyDescription', + type: { + name: 'Composite', + class_name: 'CertificateBodyDescription', + model_properties: { + certificate: { + required: false, + serialized_name: 'certificate', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_description.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_description.rb new file mode 100644 index 0000000000..eadaab28cb --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_description.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::ARM::IotHub + module Models + # + # The X509 Certificate. + # + class CertificateDescription + + include MsRestAzure + + # @return [CertificateProperties] + attr_accessor :properties + + # @return [String] The resource identifier. + attr_accessor :id + + # @return [String] The name of the certificate. + attr_accessor :name + + # @return [String] The entity tag. + attr_accessor :etag + + # @return [String] The resource type. + attr_accessor :type + + + # + # Mapper for CertificateDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateDescription', + type: { + name: 'Composite', + class_name: 'CertificateDescription', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CertificateProperties' + } + }, + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + read_only: true, + serialized_name: 'etag', + 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_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb new file mode 100644 index 0000000000..166a33b486 --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::IotHub + module Models + # + # The JSON-serialized array of Certificate objects. + # + class CertificateListDescription + + include MsRestAzure + + # @return [Array] The array of Certificate + # objects. + attr_accessor :value + + + # + # Mapper for CertificateListDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateListDescription', + type: { + name: 'Composite', + class_name: 'CertificateListDescription', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CertificateDescriptionElementType', + type: { + name: 'Composite', + class_name: 'CertificateDescription' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_properties.rb new file mode 100644 index 0000000000..f1c72bd6cb --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_properties.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::ARM::IotHub + module Models + # + # The description of an X509 CA Certificate. + # + class CertificateProperties + + include MsRestAzure + + # @return [String] The certificate's subject name. + attr_accessor :subject + + # @return [DateTime] The certificate's expiration date and time. + attr_accessor :expiry + + # @return [String] The certificate's thumbprint. + attr_accessor :thumbprint + + # @return [Boolean] Determines whether certificate has been verified. + attr_accessor :is_verified + + # @return [DateTime] The certificate's create date and time. + attr_accessor :created + + # @return [DateTime] The certificate's last update date and time. + attr_accessor :updated + + + # + # Mapper for CertificateProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateProperties', + type: { + name: 'Composite', + class_name: 'CertificateProperties', + model_properties: { + subject: { + required: false, + read_only: true, + serialized_name: 'subject', + type: { + name: 'String' + } + }, + expiry: { + required: false, + read_only: true, + serialized_name: 'expiry', + type: { + name: 'DateTimeRfc1123' + } + }, + thumbprint: { + required: false, + read_only: true, + serialized_name: 'thumbprint', + type: { + name: 'String' + } + }, + is_verified: { + required: false, + read_only: true, + serialized_name: 'isVerified', + type: { + name: 'Boolean' + } + }, + created: { + required: false, + read_only: true, + serialized_name: 'created', + type: { + name: 'DateTimeRfc1123' + } + }, + updated: { + required: false, + read_only: true, + serialized_name: 'updated', + type: { + name: 'DateTimeRfc1123' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb new file mode 100644 index 0000000000..21fac9c4c6 --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.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::ARM::IotHub + module Models + # + # The description of an X509 CA Certificate including the challenge nonce + # issued for the Proof-Of-Possession flow. + # + class CertificatePropertiesWithNonce + + include MsRestAzure + + # @return [String] The certificate's subject name. + attr_accessor :subject + + # @return [DateTime] The certificate's expiration date and time. + attr_accessor :expiry + + # @return [String] The certificate's thumbprint. + attr_accessor :thumbprint + + # @return [Boolean] Determines whether certificate has been verified. + attr_accessor :is_verified + + # @return [DateTime] The certificate's create date and time. + attr_accessor :created + + # @return [DateTime] The certificate's last update date and time. + attr_accessor :updated + + # @return [String] The certificate's verification code that will be used + # for proof of possession. + attr_accessor :verification_code + + + # + # Mapper for CertificatePropertiesWithNonce class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificatePropertiesWithNonce', + type: { + name: 'Composite', + class_name: 'CertificatePropertiesWithNonce', + model_properties: { + subject: { + required: false, + read_only: true, + serialized_name: 'subject', + type: { + name: 'String' + } + }, + expiry: { + required: false, + read_only: true, + serialized_name: 'expiry', + type: { + name: 'DateTimeRfc1123' + } + }, + thumbprint: { + required: false, + read_only: true, + serialized_name: 'thumbprint', + type: { + name: 'String' + } + }, + is_verified: { + required: false, + read_only: true, + serialized_name: 'isVerified', + type: { + name: 'Boolean' + } + }, + created: { + required: false, + read_only: true, + serialized_name: 'created', + type: { + name: 'DateTimeRfc1123' + } + }, + updated: { + required: false, + read_only: true, + serialized_name: 'updated', + type: { + name: 'DateTimeRfc1123' + } + }, + verification_code: { + required: false, + read_only: true, + serialized_name: 'verificationCode', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb new file mode 100644 index 0000000000..8cba2ee98b --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_verification_description.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::ARM::IotHub + module Models + # + # The JSON-serialized leaf certificate + # + class CertificateVerificationDescription + + include MsRestAzure + + # @return [String] base-64 representation of X509 certificate .cer file + # or just .pem file content. + attr_accessor :certificate + + + # + # Mapper for CertificateVerificationDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateVerificationDescription', + type: { + name: 'Composite', + class_name: 'CertificateVerificationDescription', + model_properties: { + certificate: { + required: false, + serialized_name: 'certificate', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb new file mode 100644 index 0000000000..f88558a621 --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.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::ARM::IotHub + module Models + # + # The X509 Certificate. + # + class CertificateWithNonceDescription + + include MsRestAzure + + # @return [CertificatePropertiesWithNonce] + attr_accessor :properties + + # @return [String] The resource identifier. + attr_accessor :id + + # @return [String] The name of the certificate. + attr_accessor :name + + # @return [String] The entity tag. + attr_accessor :etag + + # @return [String] The resource type. + attr_accessor :type + + + # + # Mapper for CertificateWithNonceDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateWithNonceDescription', + type: { + name: 'Composite', + class_name: 'CertificateWithNonceDescription', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CertificatePropertiesWithNonce' + } + }, + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + read_only: true, + serialized_name: 'etag', + 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_iot_hub/lib/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb old mode 100755 new mode 100644 index 6d62ea211b..a0b8618292 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CloudToDeviceProperties include MsRestAzure - include MsRest::JSONable # @return [Integer] The max delivery count for cloud-to-device messages # in the device queue. See: # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/error_details.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/error_details.rb old mode 100755 new mode 100644 index af3e3f8627..c70327a05a --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/error_details.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/error_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ErrorDetails include MsRestAzure - include MsRest::JSONable # @return [String] The error code. attr_accessor :code diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb old mode 100755 new mode 100644 index 4ae3de3562..8869cecea4 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EventHubConsumerGroupInfo include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] The tags. attr_accessor :tags diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb old mode 100755 new mode 100644 index 94e1ee0fc6..2422addcc3 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb old mode 100755 new mode 100644 index 9524fe1b88..49e16033f8 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,14 +13,13 @@ class EventHubProperties include MsRestAzure - include MsRest::JSONable # @return [Integer] The retention time for device-to-cloud messages in # days. See: # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages attr_accessor :retention_time_in_days - # @return [Integer] The number of paritions for receiving device-to-cloud - # messages in the Event Hub-compatible endpoint. See: + # @return [Integer] The number of partitions for receiving + # device-to-cloud messages in the Event Hub-compatible endpoint. See: # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. attr_accessor :partition_count diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/export_devices_request.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/export_devices_request.rb old mode 100755 new mode 100644 index 4a67d4831a..f71916a1df --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/export_devices_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ExportDevicesRequest include MsRestAzure - include MsRest::JSONable # @return [String] The export blob container URI. attr_accessor :export_blob_container_uri diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb index 2609cc181e..957176ba60 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb @@ -1,21 +1,20 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::IotHub module Models # - # The properties related to the fallback route based on which the IoT hub - # routes messages to the fallback endpoint. + # The properties of the fallback route. IoT Hub uses these properties when + # it routes messages to the fallback endpoint. # class FallbackRouteProperties include MsRestAzure - include MsRest::JSONable # @return [String] The source to which the routing rule is to be applied - # to. e.g. DeviceMessages. Default value: 'DeviceMessages' . + # to. For example, DeviceMessages. Default value: 'DeviceMessages' . attr_accessor :source # @return [String] The condition which is evaluated in order to apply the @@ -29,8 +28,8 @@ class FallbackRouteProperties # allowed. attr_accessor :endpoint_names - # @return [Boolean] Used to specify whether the fallback route is enabled - # or not. + # @return [Boolean] Used to specify whether the fallback route is + # enabled. attr_accessor :is_enabled diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/feedback_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/feedback_properties.rb old mode 100755 new mode 100644 index 968badfd9e..178d5092fd --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/feedback_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FeedbackProperties include MsRestAzure - include MsRest::JSONable # @return [Duration] The lock duration for the feedback queue. See: # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. attr_accessor :lock_duration_as_iso8601 diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/import_devices_request.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/import_devices_request.rb old mode 100755 new mode 100644 index 5dea1900ba..33ad39a16a --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/import_devices_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ImportDevicesRequest include MsRestAzure - include MsRest::JSONable # @return [String] The input blob container URI. attr_accessor :input_blob_container_uri diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb old mode 100755 new mode 100644 index b8ac2ccf76..01968a4f71 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IotHubCapacity include MsRestAzure - include MsRest::JSONable # @return [Integer] The minimum number of units. attr_accessor :minimum diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb old mode 100755 new mode 100644 index 10fdff70f9..9ec1ecb1be --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The description of the IoT hub. # - class IotHubDescription < MsRestAzure::Resource + class IotHubDescription < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The subscription identifier. attr_accessor :subscriptionid diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb old mode 100755 new mode 100644 index 194f319d20..8d2f428ac0 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb old mode 100755 new mode 100644 index ee0c366d19..0c9a065325 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IotHubNameAvailabilityInfo include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value which indicates whether the provided name # is available. attr_accessor :name_available diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb old mode 100755 new mode 100644 index a49e497446..926ac32c41 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb old mode 100755 new mode 100644 index b1b81e52c0..225279e2bb --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IotHubProperties include MsRestAzure - include MsRest::JSONable # @return [Array] The shared # access policies you can use to secure a connection to the IoT hub. attr_accessor :authorization_policies @@ -54,7 +53,7 @@ class IotHubProperties # @return [CloudToDeviceProperties] attr_accessor :cloud_to_device - # @return [String] Comments. + # @return [String] IoT hub comments. attr_accessor :comments # @return [OperationsMonitoringProperties] diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb old mode 100755 new mode 100644 index 21b6111c14..cd841c0da9 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IotHubQuotaMetricInfo include MsRestAzure - include MsRest::JSONable # @return [String] The name of the quota metric. attr_accessor :name diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb old mode 100755 new mode 100644 index 3fee86fdd4..58d53cc266 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb old mode 100755 new mode 100644 index d626a42a9f..4cd4ca5dbd --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb old mode 100755 new mode 100644 index fd4052e455..dea675c2f6 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb old mode 100755 new mode 100644 index d1a5826220..9edadceac0 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IotHubSkuDescription include MsRestAzure - include MsRest::JSONable # @return [String] The type of the resource. attr_accessor :resource_type diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb old mode 100755 new mode 100644 index 74940353af..24a175b305 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb old mode 100755 new mode 100644 index 8d5f69b088..7a2647bb2b --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IotHubSkuInfo include MsRestAzure - include MsRest::JSONable # @return [IotHubSku] The name of the SKU. Possible values include: 'F1', # 'S1', 'S2', 'S3' attr_accessor :name diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb old mode 100755 new mode 100644 index e93c176847..57f08282f6 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb old mode 100755 new mode 100644 index db4c824b7c..321ddb3b52 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb old mode 100755 new mode 100644 index e1c16e484a..2620df15a5 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IpFilterRule include MsRestAzure - include MsRest::JSONable # @return [String] The name of the IP filter rule. attr_accessor :filter_name diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response.rb old mode 100755 new mode 100644 index 847addf3b9..fba9037a6f --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class JobResponse include MsRestAzure - include MsRest::JSONable # @return [String] The job identifier. attr_accessor :job_id diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb old mode 100755 new mode 100644 index 9ee4f0d0ee..e51fa0b103 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_status.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_status.rb old mode 100755 new mode 100644 index df0f747f9c..15b86b4477 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_status.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_type.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_type.rb old mode 100755 new mode 100644 index 838fe23ca4..6bb880cbd4 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_type.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/job_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb old mode 100755 new mode 100644 index fbfe8fe3fe..aa8b92f785 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MessagingEndpointProperties include MsRestAzure - include MsRest::JSONable # @return [Duration] The lock duration. See: # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. attr_accessor :lock_duration_as_iso8601 diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation.rb new file mode 100644 index 0000000000..57899a2510 --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation.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::ARM::IotHub + module Models + # + # IoT Hub REST API operation + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{read | write | + # action | delete} + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_display.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_display.rb new file mode 100644 index 0000000000..fde9c4b8de --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_display.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::ARM::IotHub + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft Devices + attr_accessor :provider + + # @return [String] Resource Type: IotHubs + attr_accessor :resource + + # @return [String] Name of the operation + attr_accessor :operation + + + # + # 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, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_inputs.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_inputs.rb old mode 100755 new mode 100644 index 5b7ce4652e..27acf59377 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_inputs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationInputs include MsRestAzure - include MsRest::JSONable # @return [String] The name of the IoT hub to check. attr_accessor :name diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_list_result.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_list_result.rb new file mode 100644 index 0000000000..3486859d58 --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_list_result.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::ARM::IotHub + module Models + # + # Result of the request to list IoT Hub operations. It contains a list of + # operations and a URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of IoT Hub operations supported by the + # Microsoft.Devices 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb old mode 100755 new mode 100644 index f932557bcf..fc8df072a3 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb old mode 100755 new mode 100644 index 79bccc58b9..225de7bf36 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationsMonitoringProperties include MsRestAzure - include MsRest::JSONable # @return [Hash{String => OperationMonitoringLevel}] attr_accessor :events diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/registry_statistics.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/registry_statistics.rb old mode 100755 new mode 100644 index 0547e7136c..bb8d8a0427 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/registry_statistics.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RegistryStatistics include MsRestAzure - include MsRest::JSONable # @return [Integer] The total count of devices in the identity registry. attr_accessor :total_device_count diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/resource.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/resource.rb new file mode 100644 index 0000000000..197b98adec --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/resource.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::ARM::IotHub + module Models + # + # The common properties of an Azure resource. + # + class Resource + + include MsRestAzure + + # @return [String] The resource identifier. + attr_accessor :id + + # @return [String] The resource name. + attr_accessor :name + + # @return [String] The resource type. + attr_accessor :type + + # @return [String] The resource location. + attr_accessor :location + + # @return [Hash{String => String}] The resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + constraints: { + Pattern: '^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$' + }, + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/route_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/route_properties.rb index d8c07bd3af..8ba1174006 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/route_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/route_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,10 +13,9 @@ class RouteProperties include MsRestAzure - include MsRest::JSONable # @return [String] The name of the route. The name can only include # alphanumeric characters, periods, underscores, hyphens, has a maximum - # length of 64 characters, and must be unique. + # length of 64 characters, and must be unique. attr_accessor :name # @return [RoutingSource] The source that the routing rule is to be @@ -27,7 +26,7 @@ class RouteProperties # @return [String] The condition that is evaluated to apply the routing # rule. If no condition is provided, it evaluates to true by default. For - # grammar, See: + # grammar, see: # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language attr_accessor :condition diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb index 10f5a52af5..0bdc852af6 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -15,7 +15,6 @@ class RoutingEndpoints include MsRestAzure - include MsRest::JSONable # @return [Array] The list of # Service Bus queue endpoints that IoT hub routes the messages to, based # on the routing rules. @@ -31,6 +30,11 @@ class RoutingEndpoints # This list does not include the built-in Event Hubs endpoint. attr_accessor :event_hubs + # @return [Array] The list of storage + # container endpoints that IoT hub routes messages to, based on the + # routing rules. + attr_accessor :storage_containers + # # Mapper for RoutingEndpoints class as Ruby Hash. @@ -88,6 +92,21 @@ def self.mapper() } } } + }, + storage_containers: { + required: false, + serialized_name: 'storageContainers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RoutingStorageContainerPropertiesElementType', + type: { + name: 'Composite', + class_name: 'RoutingStorageContainerProperties' + } + } + } } } } diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb index 4eb40d3e70..0cee46f2a0 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,15 +12,14 @@ class RoutingEventHubProperties include MsRestAzure - include MsRest::JSONable # @return [String] The connection string of the event hub endpoint. attr_accessor :connection_string - # @return [String] The name of the event hub endpoint. The name can only - # include alphanumeric characters, periods, underscores, hyphens and has - # a maximum length of 64 characters. The following names are reserved; - # events, operationsMonitoringEvents, fileNotifications, $default. - # Endpoint names must be unique across endpoint types. + # @return [String] The name that identifies this endpoint. The name can + # only include alphanumeric characters, periods, underscores, hyphens and + # has a maximum length of 64 characters. The following names are + # reserved: events, operationsMonitoringEvents, fileNotifications, + # $default. Endpoint names must be unique across endpoint types. attr_accessor :name # @return [String] The subscription identifier of the event hub endpoint. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_properties.rb index 8160a185d4..8adebd1925 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RoutingProperties include MsRestAzure - include MsRest::JSONable # @return [RoutingEndpoints] attr_accessor :endpoints diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb index ba15601c0b..7943005b74 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,15 +12,14 @@ class RoutingServiceBusQueueEndpointProperties include MsRestAzure - include MsRest::JSONable # @return [String] The connection string of the service bus queue # endpoint. attr_accessor :connection_string - # @return [String] The name of the service bus queue endpoint. The name - # can only include alphanumeric characters, periods, underscores, hyphens - # and has a maximum length of 64 characters. The following names are - # reserved; events, operationsMonitoringEvents, fileNotifications, + # @return [String] The name that identifies this endpoint. The name can + # only include alphanumeric characters, periods, underscores, hyphens and + # has a maximum length of 64 characters. The following names are + # reserved: events, operationsMonitoringEvents, fileNotifications, # $default. Endpoint names must be unique across endpoint types. The name # need not be the same as the actual queue name. attr_accessor :name diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb index 2e1f745e0f..27ce847843 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,15 +12,14 @@ class RoutingServiceBusTopicEndpointProperties include MsRestAzure - include MsRest::JSONable # @return [String] The connection string of the service bus topic # endpoint. attr_accessor :connection_string - # @return [String] The name of the service bus topic endpoint. The name - # can only include alphanumeric characters, periods, underscores, hyphens - # and has a maximum length of 64 characters. The following names are - # reserved; events, operationsMonitoringEvents, fileNotifications, + # @return [String] The name that identifies this endpoint. The name can + # only include alphanumeric characters, periods, underscores, hyphens and + # has a maximum length of 64 characters. The following names are + # reserved: events, operationsMonitoringEvents, fileNotifications, # $default. Endpoint names must be unique across endpoint types. The # name need not be the same as the actual topic name. attr_accessor :name diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_source.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_source.rb index 1eb6088dc8..23757800bd 100644 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_source.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb new file mode 100644 index 0000000000..325d85ada3 --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb @@ -0,0 +1,146 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::IotHub + module Models + # + # The properties related to a storage container endpoint. + # + class RoutingStorageContainerProperties + + include MsRestAzure + + # @return [String] The connection string of the storage account. + attr_accessor :connection_string + + # @return [String] The name that identifies this endpoint. The name can + # only include alphanumeric characters, periods, underscores, hyphens and + # has a maximum length of 64 characters. The following names are + # reserved: events, operationsMonitoringEvents, fileNotifications, + # $default. Endpoint names must be unique across endpoint types. + attr_accessor :name + + # @return [String] The subscription identifier of the storage account. + attr_accessor :subscription_id + + # @return [String] The name of the resource group of the storage account. + attr_accessor :resource_group + + # @return [String] The name of storage container in the storage account. + attr_accessor :container_name + + # @return [String] File name format for the blob. Default format is + # {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are + # mandatory but can be reordered. + attr_accessor :file_name_format + + # @return [Integer] Time interval at which blobs are written to storage. + # Value should be between 60 and 720 seconds. Default value is 300 + # seconds. + attr_accessor :batch_frequency_in_seconds + + # @return [Integer] Maximum number of bytes for each blob written to + # storage. Value should be between 10485760(10MB) and 524288000(500MB). + # Default value is 314572800(300MB). + attr_accessor :max_chunk_size_in_bytes + + # @return [String] Encoding that is used to serialize messages to blobs. + # Supported values are 'avro' and 'avrodeflate'. Default value is 'avro'. + attr_accessor :encoding + + + # + # Mapper for RoutingStorageContainerProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RoutingStorageContainerProperties', + type: { + name: 'Composite', + class_name: 'RoutingStorageContainerProperties', + model_properties: { + connection_string: { + required: true, + serialized_name: 'connectionString', + type: { + name: 'String' + } + }, + name: { + required: true, + serialized_name: 'name', + constraints: { + Pattern: '^[A-Za-z0-9-._]{1,64}$' + }, + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'subscriptionId', + type: { + name: 'String' + } + }, + resource_group: { + required: false, + serialized_name: 'resourceGroup', + type: { + name: 'String' + } + }, + container_name: { + required: true, + serialized_name: 'containerName', + type: { + name: 'String' + } + }, + file_name_format: { + required: false, + serialized_name: 'fileNameFormat', + type: { + name: 'String' + } + }, + batch_frequency_in_seconds: { + required: false, + serialized_name: 'batchFrequencyInSeconds', + constraints: { + InclusiveMaximum: 720, + InclusiveMinimum: 60 + }, + type: { + name: 'Number' + } + }, + max_chunk_size_in_bytes: { + required: false, + serialized_name: 'maxChunkSizeInBytes', + constraints: { + InclusiveMaximum: 524288000, + InclusiveMinimum: 10485760 + }, + type: { + name: 'Number' + } + }, + encoding: { + required: false, + serialized_name: 'encoding', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb old mode 100755 new mode 100644 index cc7d9e0eae..76f07f1c27 --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SharedAccessSignatureAuthorizationRule include MsRestAzure - include MsRest::JSONable # @return [String] The name of the shared access policy. attr_accessor :key_name diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb old mode 100755 new mode 100644 index 8531768afb..a0f7e13e9c --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb old mode 100755 new mode 100644 index 04a7abeec8..1b4c80b0db --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageEndpointProperties include MsRestAzure - include MsRest::JSONable # @return [Duration] The period of time for which the the SAS URI # generated by IoT Hub for file upload is valid. See: # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/module_definition.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/module_definition.rb old mode 100755 new mode 100644 index 031cb2e71c..2941d6240e --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/module_definition.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/operations.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/operations.rb new file mode 100644 index 0000000000..a1def3320d --- /dev/null +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/operations.rb @@ -0,0 +1,213 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::IotHub + # + # Use this API to manage the IoT hubs in your Azure subscription. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [IotHubClient] reference to the IotHubClient + attr_reader :client + + # + # Lists all of the available IoT Hub REST API operations. + # + # @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 IoT Hub REST API operations. + # + # @param custom_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 IoT Hub REST API operations. + # + # @param [Hash{String => String}] 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.Devices/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::IotHub::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 IoT Hub REST 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 [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 IoT Hub REST 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_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 IoT Hub REST 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_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::ARM::IotHub::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 IoT Hub REST API operations. + # + # @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_iot_hub/lib/generated/azure_mgmt_iot_hub/version.rb b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/version.rb old mode 100755 new mode 100644 index 01e2d66ff0..2e4753323d --- a/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/version.rb +++ b/management/azure_mgmt_iot_hub/lib/generated/azure_mgmt_iot_hub/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::IotHub - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_key_vault/azure_mgmt_key_vault.gemspec b/management/azure_mgmt_key_vault/azure_mgmt_key_vault.gemspec index 1de5ca0fa0..318b947032 100644 --- a/management/azure_mgmt_key_vault/azure_mgmt_key_vault.gemspec +++ b/management/azure_mgmt_key_vault/azure_mgmt_key_vault.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault.rb old mode 100755 new mode 100644 index dead95ac4c..303bb23f12 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -32,6 +32,7 @@ module Models autoload :Sku, 'generated/azure_mgmt_key_vault/models/sku.rb' autoload :DeletedVaultListResult, 'generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb' autoload :DeletedVaultProperties, 'generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb' + autoload :Resource, 'generated/azure_mgmt_key_vault/models/resource.rb' autoload :AccessPolicyEntry, 'generated/azure_mgmt_key_vault/models/access_policy_entry.rb' autoload :ResourceListResult, 'generated/azure_mgmt_key_vault/models/resource_list_result.rb' autoload :Vault, 'generated/azure_mgmt_key_vault/models/vault.rb' diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/key_vault_management_client.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/key_vault_management_client.rb old mode 100755 new mode 100644 index 899c5aec6f..69fa8debfc --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/key_vault_management_client.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/key_vault_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/access_policy_entry.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/access_policy_entry.rb old mode 100755 new mode 100644 index 31e56e2630..ace7acd895 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/access_policy_entry.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/access_policy_entry.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AccessPolicyEntry include MsRestAzure - include MsRest::JSONable # @return The Azure Active Directory tenant ID that should be used for # authenticating requests to the key vault. attr_accessor :tenant_id diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/certificate_permissions.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/certificate_permissions.rb old mode 100755 new mode 100644 index d5bf6dec73..a3b6b04995 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/certificate_permissions.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/certificate_permissions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/create_mode.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/create_mode.rb index cfa9b87377..fa7411eee3 100644 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/create_mode.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/create_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault.rb index 9b3b77332d..918a7e0584 100644 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeletedVault include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID for the deleted key vault. attr_accessor :id diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb index eef9412a62..58cd1ee27d 100644 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb index b5f1009024..d1e3c2429e 100644 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeletedVaultProperties include MsRestAzure - include MsRest::JSONable # @return [String] The resource id of the original vault. attr_accessor :vault_id diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/key_permissions.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/key_permissions.rb old mode 100755 new mode 100644 index fcd7cdbf44..4074d97318 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/key_permissions.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/key_permissions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/permissions.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/permissions.rb old mode 100755 new mode 100644 index 44f68341ba..a16c66217a --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/permissions.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/permissions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Permissions include MsRestAzure - include MsRest::JSONable # @return [Array] Permissions to keys attr_accessor :keys diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/resource.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/resource.rb new file mode 100644 index 0000000000..7b743b9d49 --- /dev/null +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/resource.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::ARM::KeyVault + module Models + # + # Key Vault resource + # + class Resource + + include MsRestAzure + + # @return [String] The Azure Resource Manager resource ID for the key + # vault. + attr_accessor :id + + # @return [String] The name of the key vault. + attr_accessor :name + + # @return [String] The resource type of the key vault. + attr_accessor :type + + # @return [String] The supported Azure location where the key vault + # should be created. + attr_accessor :location + + # @return [Hash{String => String}] The tags that will be assigned to the + # key vault. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/resource_list_result.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/resource_list_result.rb old mode 100755 new mode 100644 index 0983958242..48698432e0 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/resource_list_result.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/resource_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/secret_permissions.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/secret_permissions.rb old mode 100755 new mode 100644 index 6eb22c1df9..2c43752430 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/secret_permissions.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/secret_permissions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku.rb old mode 100755 new mode 100644 index f8f76c0b1c..cf5fa7044d --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [String] SKU family name. Default value: 'A' . attr_accessor :family diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku_name.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku_name.rb old mode 100755 new mode 100644 index d72dda069d..a15b777ba1 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku_name.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/storage_permissions.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/storage_permissions.rb index e589eb8858..28de308805 100644 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/storage_permissions.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/storage_permissions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault.rb old mode 100755 new mode 100644 index 13640c24c6..5d7b598e48 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Resource information with extended details. # - class Vault < MsRestAzure::Resource + class Vault < Resource include MsRestAzure - include MsRest::JSONable # @return [VaultProperties] Properties of the vault attr_accessor :properties diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb old mode 100755 new mode 100644 index eabfbe6bd3..36bd27e0f7 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VaultCreateOrUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [String] The supported Azure location where the key vault # should be created. attr_accessor :location diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_list_result.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_list_result.rb old mode 100755 new mode 100644 index 477645c179..172248c532 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_list_result.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_properties.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_properties.rb old mode 100755 new mode 100644 index 16370c4fa9..eafb35ffdc --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_properties.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/models/vault_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VaultProperties include MsRestAzure - include MsRest::JSONable # @return The Azure Active Directory tenant ID that should be used for # authenticating requests to the key vault. attr_accessor :tenant_id diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/module_definition.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/module_definition.rb old mode 100755 new mode 100644 index 5b830e4861..ce94de1e35 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/module_definition.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/vaults.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/vaults.rb old mode 100755 new mode 100644 index 6376e7b250..23707095bd --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/vaults.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/vaults.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/version.rb b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/version.rb old mode 100755 new mode 100644 index 55a77fbb13..037ecc7ab4 --- a/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/version.rb +++ b/management/azure_mgmt_key_vault/lib/generated/azure_mgmt_key_vault/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::KeyVault - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_links/.rspec b/management/azure_mgmt_links/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_links/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_links/LICENSE.txt b/management/azure_mgmt_links/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_links/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_links/Rakefile b/management/azure_mgmt_links/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_links/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_links/azure_mgmt_links.gemspec b/management/azure_mgmt_links/azure_mgmt_links.gemspec new file mode 100644 index 0000000000..dea62735cb --- /dev/null +++ b/management/azure_mgmt_links/azure_mgmt_links.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_links/module_definition' +require 'generated/azure_mgmt_links/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_links' + spec.version = Azure::ARM::Links::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Links Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Links.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_links/lib/azure_mgmt_links.rb b/management/azure_mgmt_links/lib/azure_mgmt_links.rb new file mode 100644 index 0000000000..2fbb5322e1 --- /dev/null +++ b/management/azure_mgmt_links/lib/azure_mgmt_links.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_links' + + diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links.rb new file mode 100644 index 0000000000..152255f96d --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links.rb @@ -0,0 +1,33 @@ +# encoding: 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 'generated/azure_mgmt_links/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::Links + autoload :ResourceLinks, 'generated/azure_mgmt_links/resource_links.rb' + autoload :ManagementLinkClient, 'generated/azure_mgmt_links/management_link_client.rb' + + module Models + autoload :ResourceLink, 'generated/azure_mgmt_links/models/resource_link.rb' + autoload :ResourceLinkFilter, 'generated/azure_mgmt_links/models/resource_link_filter.rb' + autoload :ResourceLinkResult, 'generated/azure_mgmt_links/models/resource_link_result.rb' + autoload :ResourceLinkProperties, 'generated/azure_mgmt_links/models/resource_link_properties.rb' + autoload :Filter, 'generated/azure_mgmt_links/models/filter.rb' + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/management_link_client.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/management_link_client.rb new file mode 100644 index 0000000000..c58503c701 --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/management_link_client.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::ARM::Links + # + # A service client - single point of access to the REST API. + # + class ManagementLinkClient < 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] The ID of the target subscription. + attr_accessor :subscription_id + + # @return [String] The API version to use for the operation. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [ResourceLinks] resource_links + attr_reader :resource_links + + # + # Creates initializes a new instance of the ManagementLinkClient 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 + + @resource_links = ResourceLinks.new(self) + @api_version = '2016-09-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_links' + if defined? Azure::ARM::Links::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::Links::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/filter.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/filter.rb new file mode 100644 index 0000000000..ea907106a8 --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/filter.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Links + module Models + # + # Defines values for Filter + # + module Filter + AtScope = "atScope()" + end + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link.rb new file mode 100644 index 0000000000..5bd93eee1d --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link.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::ARM::Links + module Models + # + # The resource link. + # + class ResourceLink + + include MsRestAzure + + # @return [String] The fully qualified ID of the resource link. + attr_accessor :id + + # @return [String] The name of the resource link. + attr_accessor :name + + # @return [ResourceLinkProperties] Properties for resource link. + attr_accessor :properties + + + # + # Mapper for ResourceLink class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceLink', + type: { + name: 'Composite', + class_name: 'ResourceLink', + 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' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ResourceLinkProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_filter.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_filter.rb new file mode 100644 index 0000000000..c42e43ac59 --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_filter.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::ARM::Links + module Models + # + # Resource link filter. + # + class ResourceLinkFilter + + include MsRestAzure + + # @return [String] The ID of the target resource. + attr_accessor :target_id + + + # + # Mapper for ResourceLinkFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceLinkFilter', + type: { + name: 'Composite', + class_name: 'ResourceLinkFilter', + model_properties: { + target_id: { + required: true, + serialized_name: 'targetId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_properties.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_properties.rb new file mode 100644 index 0000000000..a016c8bae2 --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_properties.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::ARM::Links + module Models + # + # The resource link properties. + # + class ResourceLinkProperties + + include MsRestAzure + + # @return [String] The fully qualified ID of the source resource in the + # link. + attr_accessor :source_id + + # @return [String] The fully qualified ID of the target resource in the + # link. + attr_accessor :target_id + + # @return [String] Notes about the resource link. + attr_accessor :notes + + + # + # Mapper for ResourceLinkProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceLinkProperties', + type: { + name: 'Composite', + class_name: 'ResourceLinkProperties', + model_properties: { + source_id: { + required: false, + read_only: true, + serialized_name: 'sourceId', + type: { + name: 'String' + } + }, + target_id: { + required: true, + serialized_name: 'targetId', + type: { + name: 'String' + } + }, + notes: { + required: false, + serialized_name: 'notes', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_result.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_result.rb new file mode 100644 index 0000000000..8847ef922b --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/models/resource_link_result.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::ARM::Links + module Models + # + # List of resource links. + # + class ResourceLinkResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] An array of resource links. + attr_accessor :value + + # @return [String] The URL to use for getting the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ResourceLinkResult] 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 ResourceLinkResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceLinkResult', + type: { + name: 'Composite', + class_name: 'ResourceLinkResult', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ResourceLinkElementType', + type: { + name: 'Composite', + class_name: 'ResourceLink' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/module_definition.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/module_definition.rb new file mode 100644 index 0000000000..e738e880a3 --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/module_definition.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 end +module Azure::ARM end +module Azure::ARM::Links end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/resource_links.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/resource_links.rb new file mode 100644 index 0000000000..683c939c34 --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/resource_links.rb @@ -0,0 +1,753 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Links + # + # Azure resources can be linked together to form logical relationships. You + # can establish links between resources belonging to different resource + # groups. However, all the linked resources must belong to the same + # subscription. Each resource can be linked to 50 other resources. If any of + # the linked resources are deleted or moved, the link owner must clean up the + # remaining link. + # + class ResourceLinks + include MsRestAzure + + # + # Creates and initializes a new instance of the ResourceLinks class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ManagementLinkClient] reference to the ManagementLinkClient + attr_reader :client + + # + # Deletes a resource link with the specified ID. + # + # @param link_id [String] The fully qualified ID of the resource link. Use the + # format, + # /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. + # For example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(link_id, custom_headers = nil) + response = delete_async(link_id, custom_headers).value! + nil + end + + # + # Deletes a resource link with the specified ID. + # + # @param link_id [String] The fully qualified ID of the resource link. Use the + # format, + # /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. + # For example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param custom_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(link_id, custom_headers = nil) + delete_async(link_id, custom_headers).value! + end + + # + # Deletes a resource link with the specified ID. + # + # @param link_id [String] The fully qualified ID of the resource link. Use the + # format, + # /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. + # For example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param [Hash{String => String}] 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(link_id, custom_headers = nil) + fail ArgumentError, 'link_id is nil' if link_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{linkId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'linkId' => link_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 + + # + # Creates or updates a resource link between the specified resources. + # + # @param link_id [String] The fully qualified ID of the resource link. Use the + # format, + # /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. + # For example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param parameters [ResourceLink] Parameters for creating or updating a + # resource link. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceLink] operation results. + # + def create_or_update(link_id, parameters, custom_headers = nil) + response = create_or_update_async(link_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a resource link between the specified resources. + # + # @param link_id [String] The fully qualified ID of the resource link. Use the + # format, + # /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. + # For example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param parameters [ResourceLink] Parameters for creating or updating a + # resource link. + # @param custom_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(link_id, parameters, custom_headers = nil) + create_or_update_async(link_id, parameters, custom_headers).value! + end + + # + # Creates or updates a resource link between the specified resources. + # + # @param link_id [String] The fully qualified ID of the resource link. Use the + # format, + # /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. + # For example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param parameters [ResourceLink] Parameters for creating or updating a + # resource link. + # @param [Hash{String => String}] 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(link_id, parameters, custom_headers = nil) + fail ArgumentError, 'link_id is nil' if link_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Links::Models::ResourceLink.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '{linkId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'linkId' => link_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Links::Models::ResourceLink.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Links::Models::ResourceLink.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a resource link with the specified ID. + # + # @param link_id [String] The fully qualified Id of the resource link. For + # example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceLink] operation results. + # + def get(link_id, custom_headers = nil) + response = get_async(link_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a resource link with the specified ID. + # + # @param link_id [String] The fully qualified Id of the resource link. For + # example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param custom_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(link_id, custom_headers = nil) + get_async(link_id, custom_headers).value! + end + + # + # Gets a resource link with the specified ID. + # + # @param link_id [String] The fully qualified Id of the resource link. For + # example, + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink + # @param [Hash{String => String}] 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(link_id, custom_headers = nil) + fail ArgumentError, 'link_id is nil' if link_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{linkId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'linkId' => link_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Links::Models::ResourceLink.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the linked resources for the subscription. + # + # @param filter [String] The filter to apply on the list resource links + # operation. The supported filter for list resource links is targetid. For + # example, $filter=targetid eq {value} + # @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_at_subscription(filter = nil, custom_headers = nil) + first_page = list_at_subscription_as_lazy(filter, custom_headers) + first_page.get_all_items + end + + # + # Gets all the linked resources for the subscription. + # + # @param filter [String] The filter to apply on the list resource links + # operation. The supported filter for list resource links is targetid. For + # example, $filter=targetid eq {value} + # @param custom_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_at_subscription_with_http_info(filter = nil, custom_headers = nil) + list_at_subscription_async(filter, custom_headers).value! + end + + # + # Gets all the linked resources for the subscription. + # + # @param filter [String] The filter to apply on the list resource links + # operation. The supported filter for list resource links is targetid. For + # example, $filter=targetid eq {value} + # @param [Hash{String => String}] 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_at_subscription_async(filter = nil, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_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.Resources/links' + + 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: {'$filter' => filter,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Links::Models::ResourceLinkResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of resource links at and below the specified source scope. + # + # @param scope [String] The fully qualified ID of the scope for getting the + # resource links. For example, to list resource links at and under a resource + # group, set the scope to + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. + # @param filter [String] The filter to apply when getting resource links. To + # get links only at the specified scope (not below the scope), use + # Filter.atScope(). + # @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_at_source_scope(scope, filter = nil, custom_headers = nil) + first_page = list_at_source_scope_as_lazy(scope, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of resource links at and below the specified source scope. + # + # @param scope [String] The fully qualified ID of the scope for getting the + # resource links. For example, to list resource links at and under a resource + # group, set the scope to + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. + # @param filter [String] The filter to apply when getting resource links. To + # get links only at the specified scope (not below the scope), use + # Filter.atScope(). + # @param custom_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_at_source_scope_with_http_info(scope, filter = nil, custom_headers = nil) + list_at_source_scope_async(scope, filter, custom_headers).value! + end + + # + # Gets a list of resource links at and below the specified source scope. + # + # @param scope [String] The fully qualified ID of the scope for getting the + # resource links. For example, to list resource links at and under a resource + # group, set the scope to + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. + # @param filter [String] The filter to apply when getting resource links. To + # get links only at the specified scope (not below the scope), use + # Filter.atScope(). + # @param [Hash{String => String}] 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_at_source_scope_async(scope, filter = nil, custom_headers = nil) + fail ArgumentError, 'scope is nil' if scope.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 = '{scope}/providers/Microsoft.Resources/links' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'scope' => scope}, + query_params: {'$filter' => filter,'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Links::Models::ResourceLinkResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the linked resources for the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceLinkResult] operation results. + # + def list_at_subscription_next(next_page_link, custom_headers = nil) + response = list_at_subscription_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the linked resources for the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_at_subscription_next_with_http_info(next_page_link, custom_headers = nil) + list_at_subscription_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the linked resources for the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_at_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::ARM::Links::Models::ResourceLinkResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of resource links at and below the specified source scope. + # + # @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 [ResourceLinkResult] operation results. + # + def list_at_source_scope_next(next_page_link, custom_headers = nil) + response = list_at_source_scope_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of resource links at and below the specified source scope. + # + # @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_at_source_scope_next_with_http_info(next_page_link, custom_headers = nil) + list_at_source_scope_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of resource links at and below the specified source scope. + # + # @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_at_source_scope_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Links::Models::ResourceLinkResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the linked resources for the subscription. + # + # @param filter [String] The filter to apply on the list resource links + # operation. The supported filter for list resource links is targetid. For + # example, $filter=targetid eq {value} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceLinkResult] which provide lazy access to pages of the + # response. + # + def list_at_subscription_as_lazy(filter = nil, custom_headers = nil) + response = list_at_subscription_async(filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_at_subscription_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets a list of resource links at and below the specified source scope. + # + # @param scope [String] The fully qualified ID of the scope for getting the + # resource links. For example, to list resource links at and under a resource + # group, set the scope to + # /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. + # @param filter [String] The filter to apply when getting resource links. To + # get links only at the specified scope (not below the scope), use + # Filter.atScope(). + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceLinkResult] which provide lazy access to pages of the + # response. + # + def list_at_source_scope_as_lazy(scope, filter = nil, custom_headers = nil) + response = list_at_source_scope_async(scope, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_at_source_scope_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_links/lib/generated/azure_mgmt_links/version.rb b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/version.rb new file mode 100644 index 0000000000..cbd7cb3b31 --- /dev/null +++ b/management/azure_mgmt_links/lib/generated/azure_mgmt_links/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::ARM::Links + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_links/spec/spec_helper.rb b/management/azure_mgmt_links/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_links/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_locks/azure_mgmt_locks.gemspec b/management/azure_mgmt_locks/azure_mgmt_locks.gemspec index a9de1636fd..9f5070fc49 100644 --- a/management/azure_mgmt_locks/azure_mgmt_locks.gemspec +++ b/management/azure_mgmt_locks/azure_mgmt_locks.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks.rb index 343cb28050..bfa4bc7fb1 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_lock_client.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_lock_client.rb index e29d244fa9..757bd7eeba 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_lock_client.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_lock_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_locks.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_locks.rb index 5e07193c1d..ea9040a039 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_locks.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/management_locks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/lock_level.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/lock_level.rb index 89152a2aeb..9d81aaccd5 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/lock_level.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/lock_level.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_list_result.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_list_result.rb index 17052cf469..c0688b534f 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_list_result.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_object.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_object.rb index cd62234aee..a2b274e1d5 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_object.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_object.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ManagementLockObject include MsRestAzure - include MsRest::JSONable # @return [LockLevel] The level of the lock. Possible values are: # NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized # users are able to read and modify the resources, but not delete. diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_owner.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_owner.rb index 841ae47826..fac3355e67 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_owner.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/models/management_lock_owner.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ManagementLockOwner include MsRestAzure - include MsRest::JSONable # @return [String] The application ID of the lock owner. attr_accessor :application_id diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/module_definition.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/module_definition.rb index b742bf9829..aaa72f8467 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/module_definition.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/version.rb b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/version.rb index 196cf7d0e4..e1448dbbb2 100644 --- a/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/version.rb +++ b/management/azure_mgmt_locks/lib/generated/azure_mgmt_locks/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Locks - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_logic/azure_mgmt_logic.gemspec b/management/azure_mgmt_logic/azure_mgmt_logic.gemspec index 08eb962091..baca42a7ba 100644 --- a/management/azure_mgmt_logic/azure_mgmt_logic.gemspec +++ b/management/azure_mgmt_logic/azure_mgmt_logic.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic.rb old mode 100755 new mode 100644 index eefd3b1952..c911823f78 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -37,6 +37,7 @@ module Azure::ARM::Logic module Models autoload :IntegrationAccountPartnerFilter, 'generated/azure_mgmt_logic/models/integration_account_partner_filter.rb' + autoload :Resource, 'generated/azure_mgmt_logic/models/resource.rb' autoload :AS2MessageConnectionSettings, 'generated/azure_mgmt_logic/models/as2message_connection_settings.rb' autoload :ResourceReference, 'generated/azure_mgmt_logic/models/resource_reference.rb' autoload :AS2AcknowledgementConnectionSettings, 'generated/azure_mgmt_logic/models/as2acknowledgement_connection_settings.rb' @@ -48,6 +49,7 @@ module Models autoload :WorkflowVersionListResult, 'generated/azure_mgmt_logic/models/workflow_version_list_result.rb' autoload :IntegrationAccountPartnerListResult, 'generated/azure_mgmt_logic/models/integration_account_partner_list_result.rb' autoload :RecurrenceSchedule, 'generated/azure_mgmt_logic/models/recurrence_schedule.rb' + autoload :SubResource, 'generated/azure_mgmt_logic/models/sub_resource.rb' autoload :Sku, 'generated/azure_mgmt_logic/models/sku.rb' autoload :WorkflowTriggerListResult, 'generated/azure_mgmt_logic/models/workflow_trigger_list_result.rb' autoload :WorkflowTriggerListCallbackUrlQueries, 'generated/azure_mgmt_logic/models/workflow_trigger_list_callback_url_queries.rb' diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/agreements.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/agreements.rb old mode 100755 new mode 100644 index 4e9e2ea7e5..855ad96ae2 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/agreements.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/agreements.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/certificates.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/certificates.rb old mode 100755 new mode 100644 index 772986d486..56fa625027 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/certificates.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/certificates.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/integration_accounts.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/integration_accounts.rb old mode 100755 new mode 100644 index 89758e89ab..c4b0e4da70 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/integration_accounts.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/integration_accounts.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/logic_management_client.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/logic_management_client.rb old mode 100755 new mode 100644 index b36f500c02..117492282c --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/logic_management_client.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/logic_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/maps.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/maps.rb old mode 100755 new mode 100644 index 939d1d9b35..430efaf564 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/maps.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/maps.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_content.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_content.rb old mode 100755 new mode 100644 index 3571d40308..f6d3ceb0f8 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_content.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_content.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AgreementContent include MsRestAzure - include MsRest::JSONable # @return [AS2AgreementContent] The AS2 agreement content. attr_accessor :a_s2 diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_type.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_type.rb old mode 100755 new mode 100644 index a1eea25a50..68320c037e --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_type.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/agreement_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2acknowledgement_connection_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2acknowledgement_connection_settings.rb old mode 100755 new mode 100644 index bed75164c7..6617f264fb --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2acknowledgement_connection_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2acknowledgement_connection_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2AcknowledgementConnectionSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to ignore mismatch in # certificate name. attr_accessor :ignore_certificate_name_mismatch diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2agreement_content.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2agreement_content.rb old mode 100755 new mode 100644 index a49467e191..43745b21a6 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2agreement_content.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2agreement_content.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2AgreementContent include MsRestAzure - include MsRest::JSONable # @return [AS2OneWayAgreement] The AS2 one-way receive agreement. attr_accessor :receive_agreement diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2envelope_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2envelope_settings.rb old mode 100755 new mode 100644 index 7dff9c2957..8e2b7b8467 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2envelope_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2envelope_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2EnvelopeSettings include MsRestAzure - include MsRest::JSONable # @return [String] The message content type. attr_accessor :message_content_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2error_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2error_settings.rb old mode 100755 new mode 100644 index fb23fca3e1..2171417c2f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2error_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2error_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2ErrorSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to suspend duplicate # message. attr_accessor :suspend_duplicate_message diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2mdn_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2mdn_settings.rb old mode 100755 new mode 100644 index 1eebbc28f6..e6e1833440 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2mdn_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2mdn_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2MdnSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to send or request a # MDN. attr_accessor :need_mdn diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2message_connection_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2message_connection_settings.rb old mode 100755 new mode 100644 index cada6009ea..b4805f759f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2message_connection_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2message_connection_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2MessageConnectionSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to ignore mismatch in # certificate name. attr_accessor :ignore_certificate_name_mismatch diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2one_way_agreement.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2one_way_agreement.rb old mode 100755 new mode 100644 index 9dd4b73305..b9828196da --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2one_way_agreement.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2one_way_agreement.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2OneWayAgreement include MsRestAzure - include MsRest::JSONable # @return [BusinessIdentity] The sender business identity attr_accessor :sender_business_identity diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2protocol_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2protocol_settings.rb old mode 100755 new mode 100644 index b6d5c1c06c..1008586586 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2protocol_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2protocol_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2ProtocolSettings include MsRestAzure - include MsRest::JSONable # @return [AS2MessageConnectionSettings] The message connection settings. attr_accessor :message_connection_settings diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2security_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2security_settings.rb old mode 100755 new mode 100644 index 0c98613bcc..b47bc0bb9d --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2security_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2security_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2SecuritySettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to send or request a # MDN. attr_accessor :override_group_signing_certificate diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2validation_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2validation_settings.rb old mode 100755 new mode 100644 index b559d863db..b286215bed --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2validation_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/as2validation_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AS2ValidationSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to override incoming # message properties with those in agreement. attr_accessor :override_message_properties diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/b2bpartner_content.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/b2bpartner_content.rb old mode 100755 new mode 100644 index a05b5c97fd..fa0922bd92 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/b2bpartner_content.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/b2bpartner_content.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class B2BPartnerContent include MsRestAzure - include MsRest::JSONable # @return [Array] The list of partner business # identities. attr_accessor :business_identities diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/business_identity.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/business_identity.rb old mode 100755 new mode 100644 index e0d53fa9f3..30ee854928 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/business_identity.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/business_identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BusinessIdentity include MsRestAzure - include MsRest::JSONable # @return [String] The business identity qualifier e.g. as2identity, ZZ, # ZZZ, 31, 32 attr_accessor :qualifier diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/callback_url.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/callback_url.rb old mode 100755 new mode 100644 index 1a33c64f68..6289d9835a --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/callback_url.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/callback_url.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CallbackUrl include MsRestAzure - include MsRest::JSONable # @return [String] The URL value. attr_accessor :value diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_hash.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_hash.rb old mode 100755 new mode 100644 index d029c77970..c864f98eca --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_hash.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_hash.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContentHash include MsRestAzure - include MsRest::JSONable # @return [String] The algorithm of the content hash. attr_accessor :algorithm diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_link.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_link.rb old mode 100755 new mode 100644 index 6d1c35fb4e..7f170e3e79 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_link.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/content_link.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ContentLink include MsRestAzure - include MsRest::JSONable # @return [String] The content link URI. attr_accessor :uri diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/correlation.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/correlation.rb old mode 100755 new mode 100644 index ebc981bab7..8da8ca60dc --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/correlation.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/correlation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Correlation include MsRestAzure - include MsRest::JSONable # @return [String] The client tracking id. attr_accessor :client_tracking_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/day_of_week.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/day_of_week.rb old mode 100755 new mode 100644 index 0f3afb786f..139c67d386 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/day_of_week.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/day_of_week.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/days_of_week.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/days_of_week.rb old mode 100755 new mode 100644 index 71f3d9c265..2c3a75e6c7 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/days_of_week.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/days_of_week.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_acknowledgement_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_acknowledgement_settings.rb old mode 100755 new mode 100644 index de9f955413..27943b34ce --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_acknowledgement_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_acknowledgement_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactAcknowledgementSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether technical # acknowledgement is needed. attr_accessor :need_technical_acknowledgement diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_agreement_content.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_agreement_content.rb old mode 100755 new mode 100644 index 83ae07786d..6fb4231071 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_agreement_content.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_agreement_content.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactAgreementContent include MsRestAzure - include MsRest::JSONable # @return [EdifactOneWayAgreement] The EDIFACT one-way receive agreement. attr_accessor :receive_agreement diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_character_set.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_character_set.rb old mode 100755 new mode 100644 index 389fc4f474..2ca98a3191 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_character_set.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_character_set.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_decimal_indicator.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_decimal_indicator.rb old mode 100755 new mode 100644 index 543b45cdae..25d1d9c72c --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_decimal_indicator.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_decimal_indicator.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_delimiter_override.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_delimiter_override.rb old mode 100755 new mode 100644 index f8c0cfe361..12bcd44aae --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_delimiter_override.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_delimiter_override.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactDelimiterOverride include MsRestAzure - include MsRest::JSONable # @return [String] The message id. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_override.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_override.rb old mode 100755 new mode 100644 index d11319a526..9a98b16f37 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_override.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_override.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactEnvelopeOverride include MsRestAzure - include MsRest::JSONable # @return [String] The message id on which this envelope settings has to # be applied. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_settings.rb old mode 100755 new mode 100644 index 974e4e111f..c9db83d390 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_envelope_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactEnvelopeSettings include MsRestAzure - include MsRest::JSONable # @return [String] The group association assigned code. attr_accessor :group_association_assigned_code diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_framing_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_framing_settings.rb old mode 100755 new mode 100644 index 1589af9d99..60947cd227 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_framing_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_framing_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactFramingSettings include MsRestAzure - include MsRest::JSONable # @return [String] The service code list directory version. attr_accessor :service_code_list_directory_version diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_filter.rb old mode 100755 new mode 100644 index 2d355cf6d4..db558144a1 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactMessageFilter include MsRestAzure - include MsRest::JSONable # @return [MessageFilterType] The message filter type. Possible values # include: 'NotSpecified', 'Include', 'Exclude' attr_accessor :message_filter_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_identifier.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_identifier.rb old mode 100755 new mode 100644 index d71005fd5d..619f49c0b4 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_identifier.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_message_identifier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactMessageIdentifier include MsRestAzure - include MsRest::JSONable # @return [String] The message id on which this envelope settings has to # be applied. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_one_way_agreement.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_one_way_agreement.rb old mode 100755 new mode 100644 index 41392cfc27..83a4e16343 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_one_way_agreement.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_one_way_agreement.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactOneWayAgreement include MsRestAzure - include MsRest::JSONable # @return [BusinessIdentity] The sender business identity attr_accessor :sender_business_identity diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_processing_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_processing_settings.rb old mode 100755 new mode 100644 index ad4e1427b2..44afe7bda3 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_processing_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_processing_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactProcessingSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to mask security # information. attr_accessor :mask_security_info diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_protocol_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_protocol_settings.rb old mode 100755 new mode 100644 index fe49c232d4..1dd8773972 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_protocol_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_protocol_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactProtocolSettings include MsRestAzure - include MsRest::JSONable # @return [EdifactValidationSettings] The EDIFACT validation settings. attr_accessor :validation_settings diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_schema_reference.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_schema_reference.rb old mode 100755 new mode 100644 index 37ff833fc3..9987a6ce99 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_schema_reference.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_schema_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactSchemaReference include MsRestAzure - include MsRest::JSONable # @return [String] The message id. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_override.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_override.rb old mode 100755 new mode 100644 index 36867324bb..07f2a9d70e --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_override.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_override.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactValidationOverride include MsRestAzure - include MsRest::JSONable # @return [String] The message id on which the validation settings has to # be applied. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_settings.rb old mode 100755 new mode 100644 index ace279fa66..047e701c19 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/edifact_validation_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EdifactValidationSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to validate character # set in the message. attr_accessor :validate_character_set diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/encryption_algorithm.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/encryption_algorithm.rb old mode 100755 new mode 100644 index cba298439a..d3558c2889 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/encryption_algorithm.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/encryption_algorithm.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_properties.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_properties.rb old mode 100755 new mode 100644 index 5a97d7a474..522683e1d3 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_properties.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ErrorProperties include MsRestAzure - include MsRest::JSONable # @return [String] Error code. attr_accessor :code diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_response.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_response.rb old mode 100755 new mode 100644 index 24f7f0a099..665b02acb6 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_response.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/error_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ErrorResponse include MsRestAzure - include MsRest::JSONable # @return [ErrorProperties] The error properties. attr_accessor :error diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/generate_upgraded_definition_parameters.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/generate_upgraded_definition_parameters.rb old mode 100755 new mode 100644 index 806adf38f1..d4ef2742bd --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/generate_upgraded_definition_parameters.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/generate_upgraded_definition_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GenerateUpgradedDefinitionParameters include MsRestAzure - include MsRest::JSONable # @return [String] The target schema version. attr_accessor :target_schema_version diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/get_callback_url_parameters.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/get_callback_url_parameters.rb old mode 100755 new mode 100644 index d35f5d0093..411fbe6efb --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/get_callback_url_parameters.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/get_callback_url_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GetCallbackUrlParameters include MsRestAzure - include MsRest::JSONable # @return [DateTime] The expiry time. attr_accessor :not_after diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/hashing_algorithm.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/hashing_algorithm.rb old mode 100755 new mode 100644 index 30213d41a2..c4f394d3b7 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/hashing_algorithm.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/hashing_algorithm.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account.rb old mode 100755 new mode 100644 index 1117b07740..f3978f3073 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The integration account. # - class IntegrationAccount < MsRestAzure::Resource + class IntegrationAccount < Resource include MsRestAzure - include MsRest::JSONable # @return The integration account properties. attr_accessor :properties diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement.rb old mode 100755 new mode 100644 index 580c4a5a28..24acb53f96 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The integration account agreement. # - class IntegrationAccountAgreement < MsRestAzure::Resource + class IntegrationAccountAgreement < Resource include MsRestAzure - include MsRest::JSONable # @return [DateTime] The created time. attr_accessor :created_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_filter.rb old mode 100755 new mode 100644 index 47404d5589..efc3744aac --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegrationAccountAgreementFilter include MsRestAzure - include MsRest::JSONable # @return [AgreementType] The agreement type of integration account # agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', # 'Edifact' diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_list_result.rb old mode 100755 new mode 100644 index b888745237..c448d5b03f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_agreement_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate.rb old mode 100755 new mode 100644 index 41abf13ee8..43747daf69 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The integration account certificate. # - class IntegrationAccountCertificate < MsRestAzure::Resource + class IntegrationAccountCertificate < Resource include MsRestAzure - include MsRest::JSONable # @return [DateTime] The created time. attr_accessor :created_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate_list_result.rb old mode 100755 new mode 100644 index 40544df910..753aa3c9b6 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_certificate_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_list_result.rb old mode 100755 new mode 100644 index 2fbc2b5652..19a8741189 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map.rb old mode 100755 new mode 100644 index 7789c7d5fc..81510cdc53 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The integration account map. # - class IntegrationAccountMap < MsRestAzure::Resource + class IntegrationAccountMap < Resource include MsRestAzure - include MsRest::JSONable # @return [MapType] The map type. Possible values include: # 'NotSpecified', 'Xslt' attr_accessor :map_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_filter.rb old mode 100755 new mode 100644 index d411b38f19..82935ea4b7 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegrationAccountMapFilter include MsRestAzure - include MsRest::JSONable # @return [MapType] The map type of integration account map. Possible # values include: 'NotSpecified', 'Xslt' attr_accessor :map_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_list_result.rb old mode 100755 new mode 100644 index 5ea1155362..aabf9c9b9a --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_properties_parameters_schema.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_properties_parameters_schema.rb old mode 100755 new mode 100644 index fbc021c72d..605581b6cb --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_properties_parameters_schema.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_map_properties_parameters_schema.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegrationAccountMapPropertiesParametersSchema include MsRestAzure - include MsRest::JSONable # @return [String] The reference name. attr_accessor :ref diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner.rb old mode 100755 new mode 100644 index 12c99852d0..ba3479f824 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The integration account partner. # - class IntegrationAccountPartner < MsRestAzure::Resource + class IntegrationAccountPartner < Resource include MsRestAzure - include MsRest::JSONable # @return [PartnerType] The partner type. Possible values include: # 'NotSpecified', 'B2B' attr_accessor :partner_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_filter.rb old mode 100755 new mode 100644 index 379e2b1fe0..c6c7ad603e --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegrationAccountPartnerFilter include MsRestAzure - include MsRest::JSONable # @return [PartnerType] The partner type of integration account partner. # Possible values include: 'NotSpecified', 'B2B' attr_accessor :partner_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_list_result.rb old mode 100755 new mode 100644 index af281e7f43..4aef88c87c --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_partner_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema.rb old mode 100755 new mode 100644 index b7db21ec4b..c831debcd7 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The integration account schema. # - class IntegrationAccountSchema < MsRestAzure::Resource + class IntegrationAccountSchema < Resource include MsRestAzure - include MsRest::JSONable # @return [SchemaType] The schema type. Possible values include: # 'NotSpecified', 'Xml' attr_accessor :schema_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_filter.rb old mode 100755 new mode 100644 index 3c1caf7c37..ad96c7fdbc --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegrationAccountSchemaFilter include MsRestAzure - include MsRest::JSONable # @return [SchemaType] The schema type of integration account schema. # Possible values include: 'NotSpecified', 'Xml' attr_accessor :schema_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_list_result.rb old mode 100755 new mode 100644 index b65e7e1f5d..763172660a --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_schema_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session.rb old mode 100755 new mode 100644 index 2aa1368534..0ff959ef0b --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The integration account session. # - class IntegrationAccountSession < MsRestAzure::Resource + class IntegrationAccountSession < Resource include MsRestAzure - include MsRest::JSONable # @return [DateTime] The created time. attr_accessor :created_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_filter.rb old mode 100755 new mode 100644 index 41e35b9238..0c201fba3f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegrationAccountSessionFilter include MsRestAzure - include MsRest::JSONable # @return [DateTime] The changed time of integration account sessions. attr_accessor :changed_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_list_result.rb old mode 100755 new mode 100644 index 2e39bc7bc8..106f02f32e --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_session_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku.rb old mode 100755 new mode 100644 index c711c9ce22..e888fc2c2b --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegrationAccountSku include MsRestAzure - include MsRest::JSONable # @return [IntegrationAccountSkuName] The sku name. Possible values # include: 'NotSpecified', 'Free', 'Standard' attr_accessor :name diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku_name.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku_name.rb old mode 100755 new mode 100644 index 1e971b5c0e..db155a9f78 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku_name.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/integration_account_sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_type.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_type.rb old mode 100755 new mode 100644 index 0e903a1842..a22602db47 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_type.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference.rb old mode 100755 new mode 100644 index dcdc1a28c5..50213bb798 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyVaultKeyReference include MsRestAzure - include MsRest::JSONable # @return [KeyVaultKeyReferenceKeyVault] The key vault reference. attr_accessor :key_vault diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference_key_vault.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference_key_vault.rb old mode 100755 new mode 100644 index 28c8ed1f0b..ff6e9fc4c9 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference_key_vault.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/key_vault_key_reference_key_vault.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyVaultKeyReferenceKeyVault include MsRestAzure - include MsRest::JSONable # @return [String] The resource id. attr_accessor :id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/map_type.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/map_type.rb old mode 100755 new mode 100644 index 8f3819e8e5..530f16219f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/map_type.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/map_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/message_filter_type.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/message_filter_type.rb old mode 100755 new mode 100644 index 1f33776ad0..c97b15b3fb --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/message_filter_type.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/message_filter_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation.rb old mode 100755 new mode 100644 index c6267ebc01..59fed5e4a0 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] Operation name: {provider}/{resource}/{operation} attr_accessor :name diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_display.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_display.rb old mode 100755 new mode 100644 index fd1729a9e9..c00eb67ed5 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_display.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable # @return [String] Service provider: Microsoft.Logic attr_accessor :provider diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_list_result.rb old mode 100755 new mode 100644 index c6611d0824..32d9105ca2 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/operation_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/parameter_type.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/parameter_type.rb old mode 100755 new mode 100644 index f5b3edfae8..bbc6ecd8d8 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/parameter_type.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/parameter_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_content.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_content.rb old mode 100755 new mode 100644 index 4e6f5231c4..11a689852f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_content.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_content.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PartnerContent include MsRestAzure - include MsRest::JSONable # @return [B2BPartnerContent] The B2B partner content. attr_accessor :b2b diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_type.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_type.rb old mode 100755 new mode 100644 index ef2e76b78a..4fb7f3bf8f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_type.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/partner_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_frequency.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_frequency.rb old mode 100755 new mode 100644 index 06696b1e98..a94a3a2dc3 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_frequency.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_frequency.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule.rb old mode 100755 new mode 100644 index 8241f87cd6..4a84506b66 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecurrenceSchedule include MsRestAzure - include MsRest::JSONable # @return [Array] The minutes. attr_accessor :minutes diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule_occurrence.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule_occurrence.rb old mode 100755 new mode 100644 index 378ad32461..4536adc826 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule_occurrence.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/recurrence_schedule_occurrence.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecurrenceScheduleOccurrence include MsRestAzure - include MsRest::JSONable # @return [DayOfWeek] The day of the week. Possible values include: # 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', # 'Saturday' diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/regenerate_action_parameter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/regenerate_action_parameter.rb old mode 100755 new mode 100644 index 1038619bfd..6dfafb474c --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/regenerate_action_parameter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/regenerate_action_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RegenerateActionParameter include MsRestAzure - include MsRest::JSONable # @return [KeyType] The key type. Possible values include: # 'NotSpecified', 'Primary', 'Secondary' attr_accessor :key_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/resource.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/resource.rb new file mode 100644 index 0000000000..ed6305fa9b --- /dev/null +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/resource.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::ARM::Logic + module Models + # + # The base resource type. + # + class Resource + + include MsRestAzure + + # @return [String] The resource id. + attr_accessor :id + + # @return [String] Gets the resource name. + attr_accessor :name + + # @return [String] Gets the resource type. + attr_accessor :type + + # @return [String] The resource location. + attr_accessor :location + + # @return [Hash{String => String}] The resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/resource_reference.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/resource_reference.rb old mode 100755 new mode 100644 index 1310ee15e0..7bd6e4c6cd --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/resource_reference.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/resource_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceReference include MsRestAzure - include MsRest::JSONable # @return [String] The resource id. attr_accessor :id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/retry_history.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/retry_history.rb old mode 100755 new mode 100644 index 88e6122eba..78ae03bbec --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/retry_history.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/retry_history.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RetryHistory include MsRestAzure - include MsRest::JSONable # @return [DateTime] Gets the start time. attr_accessor :start_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/schema_type.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/schema_type.rb old mode 100755 new mode 100644 index 55e4e8ad25..f9bdb019b4 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/schema_type.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/schema_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/segment_terminator_suffix.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/segment_terminator_suffix.rb old mode 100755 new mode 100644 index 2740ea4e02..689bdbba0c --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/segment_terminator_suffix.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/segment_terminator_suffix.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/signing_algorithm.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/signing_algorithm.rb old mode 100755 new mode 100644 index ab450c40ea..04e7198f50 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/signing_algorithm.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/signing_algorithm.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku.rb old mode 100755 new mode 100644 index 8182ab9440..ee4a7de813 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] The name. Possible values include: 'NotSpecified', # 'Free', 'Shared', 'Basic', 'Standard', 'Premium' attr_accessor :name diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku_name.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku_name.rb old mode 100755 new mode 100644 index 999aead5d7..67014f5570 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku_name.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sub_resource.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sub_resource.rb similarity index 62% rename from management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sub_resource.rb rename to management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sub_resource.rb index 9f1a03a607..075308fcc5 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sub_resource.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/sub_resource.rb @@ -1,20 +1,19 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. -module Azure::ARM::SQL +module Azure::ARM::Logic module Models # - # Subresource properties + # The sub resource type. # - class SubResource < MsRestAzure::SubResource + class SubResource include MsRestAzure - include MsRest::JSONable - # @return [String] Resource name - attr_accessor :name + # @return [String] The resource id. + attr_accessor :id # @@ -29,14 +28,6 @@ def self.mapper() name: 'Composite', class_name: 'SubResource', model_properties: { - name: { - required: false, - read_only: true, - serialized_name: 'name', - type: { - name: 'String' - } - }, id: { required: false, read_only: true, diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/trailing_separator_policy.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/trailing_separator_policy.rb old mode 100755 new mode 100644 index 855bde8041..0d091e6364 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/trailing_separator_policy.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/trailing_separator_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/usage_indicator.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/usage_indicator.rb old mode 100755 new mode 100644 index 2133e93f34..3a591222bf --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/usage_indicator.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/usage_indicator.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow.rb old mode 100755 new mode 100644 index c056190ac4..aaa003ea5d --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The workflow type. # - class Workflow < MsRestAzure::Resource + class Workflow < Resource include MsRestAzure - include MsRest::JSONable # @return [WorkflowProvisioningState] Gets the provisioning state. # Possible values include: 'NotSpecified', 'Accepted', 'Running', # 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_filter.rb old mode 100755 new mode 100644 index b0a954909b..949acb5187 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowFilter include MsRestAzure - include MsRest::JSONable # @return [WorkflowState] The state of workflows. Possible values # include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', # 'Suspended' diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_list_result.rb old mode 100755 new mode 100644 index a079010177..cc682a9106 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_output_parameter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_output_parameter.rb old mode 100755 new mode 100644 index 90f9e0528e..bcf8a6d305 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_output_parameter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_output_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowOutputParameter < WorkflowParameter include MsRestAzure - include MsRest::JSONable # @return Gets the error. attr_accessor :error diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_parameter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_parameter.rb old mode 100755 new mode 100644 index 916ce0cd19..c96096f094 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_parameter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowParameter include MsRestAzure - include MsRest::JSONable # @return [ParameterType] The type. Possible values include: # 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', 'Bool', # 'Array', 'Object', 'SecureObject' diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_provisioning_state.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_provisioning_state.rb old mode 100755 new mode 100644 index 18a3017f42..0d04af2d39 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_provisioning_state.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run.rb old mode 100755 new mode 100644 index 96b13c7a77..abe13c4be4 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The workflow run. # - class WorkflowRun < MsRestAzure::SubResource + class WorkflowRun < SubResource include MsRestAzure - include MsRest::JSONable # @return [DateTime] Gets the start time. attr_accessor :start_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action.rb old mode 100755 new mode 100644 index 125fefe539..8b6a845653 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The workflow run action. # - class WorkflowRunAction < MsRestAzure::SubResource + class WorkflowRunAction < SubResource include MsRestAzure - include MsRest::JSONable # @return [DateTime] Gets the start time. attr_accessor :start_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_filter.rb old mode 100755 new mode 100644 index 206e110d8f..4e2377b902 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowRunActionFilter include MsRestAzure - include MsRest::JSONable # @return [WorkflowStatus] The status of workflow run action. Possible # values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', # 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_list_result.rb old mode 100755 new mode 100644 index 6e5861a018..74dc319c9e --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_action_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_filter.rb old mode 100755 new mode 100644 index 6b8900f23a..81da0b986a --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowRunFilter include MsRestAzure - include MsRest::JSONable # @return [WorkflowStatus] The status of workflow run. Possible values # include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', # 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_list_result.rb old mode 100755 new mode 100644 index 74a45d494e..0e1c727188 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_trigger.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_trigger.rb old mode 100755 new mode 100644 index 4403536fdb..a3300a4561 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_trigger.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_run_trigger.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowRunTrigger include MsRestAzure - include MsRest::JSONable # @return [String] Gets the name. attr_accessor :name diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_state.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_state.rb old mode 100755 new mode 100644 index a1691c63a2..dd92d0f2d5 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_state.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_status.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_status.rb old mode 100755 new mode 100644 index b3c04be771..38ee560df1 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_status.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger.rb old mode 100755 new mode 100644 index 6319961322..17b1e9914e --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The workflow trigger. # - class WorkflowTrigger < MsRestAzure::SubResource + class WorkflowTrigger < SubResource include MsRestAzure - include MsRest::JSONable # @return [WorkflowTriggerProvisioningState] Gets the provisioning state. # Possible values include: 'NotSpecified', 'Accepted', 'Running', # 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_callback_url.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_callback_url.rb old mode 100755 new mode 100644 index 7326d914ff..bb948e33cc --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_callback_url.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_callback_url.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowTriggerCallbackUrl include MsRestAzure - include MsRest::JSONable # @return [String] Gets the workflow trigger callback URL. attr_accessor :value diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_filter.rb old mode 100755 new mode 100644 index 982851ede1..316d233165 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowTriggerFilter include MsRestAzure - include MsRest::JSONable # @return [WorkflowState] The state of workflow trigger. Possible values # include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', # 'Suspended' diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history.rb old mode 100755 new mode 100644 index 66c46735b2..995fc764f4 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The workflow trigger history. # - class WorkflowTriggerHistory < MsRestAzure::SubResource + class WorkflowTriggerHistory < SubResource include MsRestAzure - include MsRest::JSONable # @return [DateTime] Gets the start time. attr_accessor :start_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_filter.rb old mode 100755 new mode 100644 index 851cc08e63..022bb2a6ce --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowTriggerHistoryFilter include MsRestAzure - include MsRest::JSONable # @return [WorkflowStatus] The status of workflow trigger history. # Possible values include: 'NotSpecified', 'Paused', 'Running', # 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_list_result.rb old mode 100755 new mode 100644 index ad84d81ed3..79705f6fd0 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_callback_url_queries.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_callback_url_queries.rb old mode 100755 new mode 100644 index 39e5729867..7df62faac8 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_callback_url_queries.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_callback_url_queries.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowTriggerListCallbackUrlQueries include MsRestAzure - include MsRest::JSONable # @return [String] The api version. attr_accessor :api_version diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_result.rb old mode 100755 new mode 100644 index 9871eba5a0..0b4de2571a --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_provisioning_state.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_provisioning_state.rb old mode 100755 new mode 100644 index c03a8cf670..cc7da5c12f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_provisioning_state.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_recurrence.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_recurrence.rb old mode 100755 new mode 100644 index 1f94ea9255..b80c4ac976 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_recurrence.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_trigger_recurrence.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkflowTriggerRecurrence include MsRestAzure - include MsRest::JSONable # @return [RecurrenceFrequency] The frequency. Possible values include: # 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', # 'Year' diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version.rb old mode 100755 new mode 100644 index 49f884ccd2..dbe2b4b40e --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The workflow version. # - class WorkflowVersion < MsRestAzure::Resource + class WorkflowVersion < Resource include MsRestAzure - include MsRest::JSONable # @return [DateTime] Gets the created time. attr_accessor :created_time diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version_list_result.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version_list_result.rb old mode 100755 new mode 100644 index a1bfd0f892..6ae54dd4bb --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version_list_result.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/workflow_version_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12acknowledgement_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12acknowledgement_settings.rb old mode 100755 new mode 100644 index 8031ef3bc6..32760bb697 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12acknowledgement_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12acknowledgement_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12AcknowledgementSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether technical # acknowledgement is needed. attr_accessor :need_technical_acknowledgement diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12agreement_content.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12agreement_content.rb old mode 100755 new mode 100644 index d990a37364..993c339b60 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12agreement_content.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12agreement_content.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12AgreementContent include MsRestAzure - include MsRest::JSONable # @return [X12OneWayAgreement] The X12 one-way receive agreement. attr_accessor :receive_agreement diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12character_set.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12character_set.rb old mode 100755 new mode 100644 index 7496ba52c3..9b763b5e06 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12character_set.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12character_set.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12date_format.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12date_format.rb old mode 100755 new mode 100644 index fe37cf7411..e21b7d36aa --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12date_format.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12date_format.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12delimiter_overrides.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12delimiter_overrides.rb old mode 100755 new mode 100644 index b2a4006f7a..4898f39e89 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12delimiter_overrides.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12delimiter_overrides.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12DelimiterOverrides include MsRestAzure - include MsRest::JSONable # @return [String] The protocol version. attr_accessor :protocol_version diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_override.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_override.rb old mode 100755 new mode 100644 index 62208f2ff8..7a25c928e0 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_override.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_override.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12EnvelopeOverride include MsRestAzure - include MsRest::JSONable # @return [String] The target namespace on which this envelope settings # has to be applied. attr_accessor :target_namespace diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_settings.rb old mode 100755 new mode 100644 index 937ae3a513..0ebde90c27 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12envelope_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12EnvelopeSettings include MsRestAzure - include MsRest::JSONable # @return [Integer] The controls standards id. attr_accessor :control_standards_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12framing_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12framing_settings.rb old mode 100755 new mode 100644 index 4b1a92488c..5d1d3d4d63 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12framing_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12framing_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12FramingSettings include MsRestAzure - include MsRest::JSONable # @return [Integer] The data element separator. attr_accessor :data_element_separator diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_filter.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_filter.rb old mode 100755 new mode 100644 index a5950d0ea6..230c5f5084 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_filter.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12MessageFilter include MsRestAzure - include MsRest::JSONable # @return [MessageFilterType] The message filter type. Possible values # include: 'NotSpecified', 'Include', 'Exclude' attr_accessor :message_filter_type diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_identifier.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_identifier.rb old mode 100755 new mode 100644 index 63df466b4c..3b93c3bc56 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_identifier.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12message_identifier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12MessageIdentifier include MsRestAzure - include MsRest::JSONable # @return [String] The message id. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12one_way_agreement.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12one_way_agreement.rb old mode 100755 new mode 100644 index deb8d8dcf7..499e82dce4 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12one_way_agreement.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12one_way_agreement.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12OneWayAgreement include MsRestAzure - include MsRest::JSONable # @return [BusinessIdentity] The sender business identity attr_accessor :sender_business_identity diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12processing_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12processing_settings.rb old mode 100755 new mode 100644 index 8e71090246..ebfda509cb --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12processing_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12processing_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12ProcessingSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to mask security # information. attr_accessor :mask_security_info diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12protocol_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12protocol_settings.rb old mode 100755 new mode 100644 index 995f154286..79c8d60abc --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12protocol_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12protocol_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12ProtocolSettings include MsRestAzure - include MsRest::JSONable # @return [X12ValidationSettings] The X12 validation settings. attr_accessor :validation_settings diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12schema_reference.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12schema_reference.rb old mode 100755 new mode 100644 index 61a6f4f4d0..e0240f9244 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12schema_reference.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12schema_reference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12SchemaReference include MsRestAzure - include MsRest::JSONable # @return [String] The message id. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12security_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12security_settings.rb old mode 100755 new mode 100644 index ce5e1962eb..813b59b6c0 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12security_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12security_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12SecuritySettings include MsRestAzure - include MsRest::JSONable # @return [String] The authorization qualifier. attr_accessor :authorization_qualifier diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12time_format.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12time_format.rb old mode 100755 new mode 100644 index 08b1b4c13c..0ae5a45c35 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12time_format.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12time_format.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_override.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_override.rb old mode 100755 new mode 100644 index 929f9b3f62..8a8226cdbb --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_override.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_override.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12ValidationOverride include MsRestAzure - include MsRest::JSONable # @return [String] The message id on which the validation settings has to # be applied. attr_accessor :message_id diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_settings.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_settings.rb old mode 100755 new mode 100644 index 332c23fff5..c492231e3c --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_settings.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/models/x12validation_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class X12ValidationSettings include MsRestAzure - include MsRest::JSONable # @return [Boolean] The value indicating whether to validate character # set in the message. attr_accessor :validate_character_set diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/module_definition.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/module_definition.rb old mode 100755 new mode 100644 index 3b80fac418..de122218e5 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/module_definition.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/partners.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/partners.rb old mode 100755 new mode 100644 index 79be6d040d..041d5af925 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/partners.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/partners.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/schemas.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/schemas.rb old mode 100755 new mode 100644 index 732eee450b..ae90630d2f --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/schemas.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/schemas.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/sessions.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/sessions.rb old mode 100755 new mode 100644 index 35f8fd73b7..7fb640bbee --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/sessions.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/sessions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/version.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/version.rb old mode 100755 new mode 100644 index e546140954..811f84ae02 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/version.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Logic - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_run_actions.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_run_actions.rb old mode 100755 new mode 100644 index 0b649d1e0f..202729fb30 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_run_actions.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_run_actions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_runs.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_runs.rb old mode 100755 new mode 100644 index 4698b61bc1..808a0ba533 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_runs.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_runs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_trigger_histories.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_trigger_histories.rb old mode 100755 new mode 100644 index 8f4a7d203d..907b58a6d5 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_trigger_histories.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_trigger_histories.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_triggers.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_triggers.rb old mode 100755 new mode 100644 index 4ecb95642e..0ffd38d409 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_triggers.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_triggers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_versions.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_versions.rb old mode 100755 new mode 100644 index 5c684540cd..2b0ce54850 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_versions.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflow_versions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflows.rb b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflows.rb old mode 100755 new mode 100644 index bd3677d499..30a31a6044 --- a/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflows.rb +++ b/management/azure_mgmt_logic/lib/generated/azure_mgmt_logic/workflows.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/azure_mgmt_machine_learning.gemspec b/management/azure_mgmt_machine_learning/azure_mgmt_machine_learning.gemspec index 967ee70f7a..2b80e0da17 100644 --- a/management/azure_mgmt_machine_learning/azure_mgmt_machine_learning.gemspec +++ b/management/azure_mgmt_machine_learning/azure_mgmt_machine_learning.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning.rb index 6f24ff3686..084bf4a2e6 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -47,6 +47,7 @@ module Models autoload :GraphPackage, 'generated/azure_mgmt_machine_learning/models/graph_package.rb' autoload :StorageAccount, 'generated/azure_mgmt_machine_learning/models/storage_account.rb' autoload :AsyncOperationStatus, 'generated/azure_mgmt_machine_learning/models/async_operation_status.rb' + autoload :Resource, 'generated/azure_mgmt_machine_learning/models/resource.rb' autoload :PaginatedWebServicesList, 'generated/azure_mgmt_machine_learning/models/paginated_web_services_list.rb' autoload :ExampleRequest, 'generated/azure_mgmt_machine_learning/models/example_request.rb' autoload :AsyncOperationErrorInfo, 'generated/azure_mgmt_machine_learning/models/async_operation_error_info.rb' diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/azure_mlweb_services_management_client.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/azure_mlweb_services_management_client.rb index 868abac9e8..42a1cd317b 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/azure_mlweb_services_management_client.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/azure_mlweb_services_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_item.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_item.rb index 7169240b91..0b820457e7 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_item.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_item.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AssetItem include MsRestAzure - include MsRest::JSONable # @return [String] Asset's friendly name. attr_accessor :name diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_type.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_type.rb index 0e7f3c579a..facb4223b0 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_type.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/asset_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_error_info.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_error_info.rb index 029499a584..c0cf4d8c41 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_error_info.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_error_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AsyncOperationErrorInfo include MsRestAzure - include MsRest::JSONable # @return [String] The error code. attr_accessor :code diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_status.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_status.rb index c0720ef0d4..e2e22afbaa 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_status.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/async_operation_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AsyncOperationStatus include MsRestAzure - include MsRest::JSONable # @return [String] Async operation id. attr_accessor :id diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/blob_location.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/blob_location.rb index bfec646c71..c8512307ac 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/blob_location.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/blob_location.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BlobLocation include MsRestAzure - include MsRest::JSONable # @return [String] The URI from which the blob is accessible from. For # example, aml://abc for system assets or https://xyz for user assets or # payload. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_format.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_format.rb index 763705f82e..83bcc9f284 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_format.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_format.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_specification.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_specification.rb index db0ebf6a40..464fabc286 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_specification.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_specification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -14,7 +14,6 @@ class ColumnSpecification include MsRestAzure - include MsRest::JSONable # @return [ColumnType] Data type of the column. Possible values include: # 'Boolean', 'Integer', 'Number', 'String' attr_accessor :type diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_type.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_type.rb index 7de40d8815..478172a672 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_type.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/column_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/commitment_plan.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/commitment_plan.rb index 1f75262564..4a7d1bf4c0 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/commitment_plan.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/commitment_plan.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CommitmentPlan include MsRestAzure - include MsRest::JSONable # @return [String] Specifies the Azure Resource Manager ID of the # commitment plan associated with the web service. attr_accessor :id diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_configuration.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_configuration.rb index e8fa91fff7..96342799e9 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_configuration.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DiagnosticsConfiguration include MsRestAzure - include MsRest::JSONable # @return [DiagnosticsLevel] Specifies the verbosity of the diagnostic # output. Valid values are: None - disables tracing; Error - collects # only error (stderr) traces; All - collects all traces (stdout and diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_level.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_level.rb index c6ba9b974d..b856415e70 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_level.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/diagnostics_level.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/example_request.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/example_request.rb index c2bb48768f..e6ba56af13 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/example_request.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/example_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExampleRequest include MsRestAzure - include MsRest::JSONable # @return Sample input data for the web service's input(s) given as an # input name to sample input values matrix map. attr_accessor :inputs diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_edge.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_edge.rb index 2403ebe808..a30b842f0d 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_edge.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_edge.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GraphEdge include MsRestAzure - include MsRest::JSONable # @return [String] The source graph node's identifier. attr_accessor :source_node_id diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_node.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_node.rb index b50677aee5..e2b4c293d2 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_node.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_node.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -14,7 +14,6 @@ class GraphNode include MsRestAzure - include MsRest::JSONable # @return [String] The id of the asset represented by this node. attr_accessor :asset_id diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_package.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_package.rb index 909721674f..64c9a081ff 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_package.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_package.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GraphPackage include MsRestAzure - include MsRest::JSONable # @return [Hash{String => GraphNode}] The set of nodes making up the # graph, provided as a nodeId to GraphNode map attr_accessor :nodes diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter.rb index 56c90ab45d..a2bfd62f1d 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GraphParameter include MsRestAzure - include MsRest::JSONable # @return [String] Description of this graph parameter. attr_accessor :description diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter_link.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter_link.rb index ce72a1787b..7bf2b6dd79 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter_link.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/graph_parameter_link.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GraphParameterLink include MsRestAzure - include MsRest::JSONable # @return [String] The graph node's identifier attr_accessor :node_id diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port.rb index 4b90131981..79cc9d4233 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class InputPort include MsRestAzure - include MsRest::JSONable # @return [InputPortType] Port data type. Possible values include: # 'Dataset'. Default value: 'Dataset' . attr_accessor :type diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port_type.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port_type.rb index 7f50ca11a1..2eb59d3b91 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port_type.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/input_port_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/machine_learning_workspace.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/machine_learning_workspace.rb index 7f6597026e..dc904e3e7d 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/machine_learning_workspace.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/machine_learning_workspace.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class MachineLearningWorkspace include MsRestAzure - include MsRest::JSONable # @return [String] Specifies the workspace ID of the machine learning # workspace associated with the web service attr_accessor :id diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/mode_value_info.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/mode_value_info.rb index abd61bc8f5..210e3319b6 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/mode_value_info.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/mode_value_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ModeValueInfo include MsRestAzure - include MsRest::JSONable # @return [String] The interface string name for the nested parameter. attr_accessor :interface_string diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/module_asset_parameter.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/module_asset_parameter.rb index dc28853bbb..f0f94716f3 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/module_asset_parameter.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/module_asset_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ModuleAssetParameter include MsRestAzure - include MsRest::JSONable # @return [String] Parameter name. attr_accessor :name diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port.rb index b28213cf5c..4a35026454 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OutputPort include MsRestAzure - include MsRest::JSONable # @return [OutputPortType] Port data type. Possible values include: # 'Dataset'. Default value: 'Dataset' . attr_accessor :type diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port_type.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port_type.rb index 7d5a42f5b6..e0230aa1f7 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port_type.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/output_port_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/paginated_web_services_list.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/paginated_web_services_list.rb index e4d474c6d2..1ffca859db 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/paginated_web_services_list.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/paginated_web_services_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/parameter_type.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/parameter_type.rb index 9c3febee4b..fdcd0942bf 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/parameter_type.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/parameter_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/provisioning_state.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/provisioning_state.rb index df76584ca5..12534f5cbf 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/provisioning_state.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/realtime_configuration.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/realtime_configuration.rb index aa6e1dc486..259177c6a9 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/realtime_configuration.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/realtime_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RealtimeConfiguration include MsRestAzure - include MsRest::JSONable # @return [Integer] Specifies the maximum concurrent calls that can be # made to the web service. Minimum value: 4, Maximum value: 200. attr_accessor :max_concurrent_calls diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/resource.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/resource.rb new file mode 100644 index 0000000000..f456d26add --- /dev/null +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/resource.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::ARM::MachineLearning + module Models + # + # Azure resource. + # + class Resource + + include MsRestAzure + + # @return [String] Specifies the resource ID. + attr_accessor :id + + # @return [String] Specifies the name of the resource. + attr_accessor :name + + # @return [String] Specifies the location of the resource. + attr_accessor :location + + # @return [String] Specifies the type of the resource. + attr_accessor :type + + # @return [Hash{String => String}] Contains resource tags defined as + # key/value pairs. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + 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_machine_learning/lib/generated/azure_mgmt_machine_learning/models/service_input_output_specification.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/service_input_output_specification.rb index dffa1fd298..ac727d60f8 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/service_input_output_specification.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/service_input_output_specification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ServiceInputOutputSpecification include MsRestAzure - include MsRest::JSONable # @return [String] The title of your Swagger schema. attr_accessor :title diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/storage_account.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/storage_account.rb index bfbbf26be8..404bf36000 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/storage_account.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/storage_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccount include MsRestAzure - include MsRest::JSONable # @return [String] Specifies the name of the storage account. attr_accessor :name diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/table_specification.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/table_specification.rb index d3b1559c5b..64b8bfb551 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/table_specification.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/table_specification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class TableSpecification include MsRestAzure - include MsRest::JSONable # @return [String] Swagger schema title. attr_accessor :title diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service.rb index a0895e6dfa..5f9fc65a0e 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Instance of an Azure ML web service resource. # - class WebService < MsRestAzure::Resource + class WebService < Resource include MsRestAzure - include MsRest::JSONable # @return [WebServiceProperties] Contains the property payload that # describes the web service. attr_accessor :properties diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_keys.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_keys.rb index 8437a573cb..e4ec680e46 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_keys.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WebServiceKeys include MsRestAzure - include MsRest::JSONable # @return [String] The primary access key. attr_accessor :primary diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_parameter.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_parameter.rb index 5032928244..8651d018e8 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_parameter.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WebServiceParameter include MsRestAzure - include MsRest::JSONable # @return The parameter value attr_accessor :value diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties.rb index 9d77c37747..3c70367600 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WebServiceProperties include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Graph"] = "WebServicePropertiesForGraph" diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties_for_graph.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties_for_graph.rb index d78cc78135..2890c22f13 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties_for_graph.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/models/web_service_properties_for_graph.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WebServicePropertiesForGraph < WebServiceProperties include MsRestAzure - include MsRest::JSONable def initialize @packageType = "Graph" diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/module_definition.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/module_definition.rb index c0eb260484..ed5f01b912 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/module_definition.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/version.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/version.rb index 3a9ff52d5f..5713111b83 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/version.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::MachineLearning - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/web_services.rb b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/web_services.rb index 8193adf246..7115646dbd 100644 --- a/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/web_services.rb +++ b/management/azure_mgmt_machine_learning/lib/generated/azure_mgmt_machine_learning/web_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_managed_applications/.rspec b/management/azure_mgmt_managed_applications/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_managed_applications/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_managed_applications/LICENSE.txt b/management/azure_mgmt_managed_applications/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_managed_applications/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_managed_applications/Rakefile b/management/azure_mgmt_managed_applications/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_managed_applications/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_managed_applications/azure_mgmt_managed_applications.gemspec b/management/azure_mgmt_managed_applications/azure_mgmt_managed_applications.gemspec new file mode 100644 index 0000000000..cc1d74f323 --- /dev/null +++ b/management/azure_mgmt_managed_applications/azure_mgmt_managed_applications.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_managed_applications/module_definition' +require 'generated/azure_mgmt_managed_applications/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_managed_applications' + spec.version = Azure::ARM::ManagedApplications::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Managed Applications Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Managed Applications.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_managed_applications/lib/azure_mgmt_managed_applications.rb b/management/azure_mgmt_managed_applications/lib/azure_mgmt_managed_applications.rb new file mode 100644 index 0000000000..60f7350d42 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/azure_mgmt_managed_applications.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_managed_applications' + + diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications.rb new file mode 100644 index 0000000000..5669201813 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications.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. + +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 'generated/azure_mgmt_managed_applications/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::ManagedApplications + autoload :Appliances, 'generated/azure_mgmt_managed_applications/appliances.rb' + autoload :ApplianceDefinitions, 'generated/azure_mgmt_managed_applications/appliance_definitions.rb' + autoload :ManagedApplicationClient, 'generated/azure_mgmt_managed_applications/managed_application_client.rb' + + module Models + autoload :Sku, 'generated/azure_mgmt_managed_applications/models/sku.rb' + autoload :Plan, 'generated/azure_mgmt_managed_applications/models/plan.rb' + autoload :Identity, 'generated/azure_mgmt_managed_applications/models/identity.rb' + autoload :PlanPatchable, 'generated/azure_mgmt_managed_applications/models/plan_patchable.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_managed_applications/models/error_response.rb' + autoload :ApplianceProviderAuthorization, 'generated/azure_mgmt_managed_applications/models/appliance_provider_authorization.rb' + autoload :ApplianceDefinitionListResult, 'generated/azure_mgmt_managed_applications/models/appliance_definition_list_result.rb' + autoload :ApplianceListResult, 'generated/azure_mgmt_managed_applications/models/appliance_list_result.rb' + autoload :ApplianceArtifact, 'generated/azure_mgmt_managed_applications/models/appliance_artifact.rb' + autoload :Resource, 'generated/azure_mgmt_managed_applications/models/resource.rb' + autoload :GenericResource, 'generated/azure_mgmt_managed_applications/models/generic_resource.rb' + autoload :Appliance, 'generated/azure_mgmt_managed_applications/models/appliance.rb' + autoload :AppliancePatchable, 'generated/azure_mgmt_managed_applications/models/appliance_patchable.rb' + autoload :ApplianceDefinition, 'generated/azure_mgmt_managed_applications/models/appliance_definition.rb' + autoload :ProvisioningState, 'generated/azure_mgmt_managed_applications/models/provisioning_state.rb' + autoload :ApplianceLockLevel, 'generated/azure_mgmt_managed_applications/models/appliance_lock_level.rb' + autoload :ApplianceArtifactType, 'generated/azure_mgmt_managed_applications/models/appliance_artifact_type.rb' + autoload :ResourceIdentityType, 'generated/azure_mgmt_managed_applications/models/resource_identity_type.rb' + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/appliance_definitions.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/appliance_definitions.rb new file mode 100644 index 0000000000..ad0255c8e1 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/appliance_definitions.rb @@ -0,0 +1,1014 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + # + # ARM managed applications (appliances) + # + class ApplianceDefinitions + include MsRestAzure + + # + # Creates and initializes a new instance of the ApplianceDefinitions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ManagedApplicationClient] reference to the ManagedApplicationClient + attr_reader :client + + # + # Gets the appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinition] operation results. + # + def get(resource_group_name, appliance_definition_name, custom_headers = nil) + response = get_async(resource_group_name, appliance_definition_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param custom_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, appliance_definition_name, custom_headers = nil) + get_async(resource_group_name, appliance_definition_name, custom_headers).value! + end + + # + # Gets the appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param [Hash{String => String}] 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, appliance_definition_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'appliance_definition_name is nil' if appliance_definition_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.Solutions/applianceDefinitions/{applianceDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applianceDefinitionName' => appliance_definition_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, appliance_definition_name, custom_headers = nil) + response = delete_async(resource_group_name, appliance_definition_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, appliance_definition_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, appliance_definition_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates a new appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinition] operation results. + # + def create_or_update(resource_group_name, appliance_definition_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, appliance_definition_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @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, appliance_definition_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, appliance_definition_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists the appliance definitions in a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @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 + + # + # Lists the appliance definitions in a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param custom_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 + + # + # Lists the appliance definitions in a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param [Hash{String => String}] 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.Solutions/applianceDefinitions' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinition] operation results. + # + def get_by_id(appliance_definition_id, custom_headers = nil) + response = get_by_id_async(appliance_definition_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_by_id_with_http_info(appliance_definition_id, custom_headers = nil) + get_by_id_async(appliance_definition_id, custom_headers).value! + end + + # + # Gets the appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_by_id_async(appliance_definition_id, custom_headers = nil) + fail ArgumentError, 'appliance_definition_id is nil' if appliance_definition_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{applianceDefinitionId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'applianceDefinitionId' => appliance_definition_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete_by_id(appliance_definition_id, custom_headers = nil) + response = delete_by_id_async(appliance_definition_id, custom_headers).value! + nil + end + + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_by_id_async(appliance_definition_id, custom_headers = nil) + # Send request + promise = begin_delete_by_id_async(appliance_definition_id, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates a new appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinition] operation results. + # + def create_or_update_by_id(appliance_definition_id, parameters, custom_headers = nil) + response = create_or_update_by_id_async(appliance_definition_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @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_by_id_async(appliance_definition_id, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_by_id_async(appliance_definition_id, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, appliance_definition_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, appliance_definition_name, custom_headers).value! + nil + end + + # + # Deletes the appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, appliance_definition_name, custom_headers = nil) + begin_delete_async(resource_group_name, appliance_definition_name, custom_headers).value! + end + + # + # Deletes the appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition to delete. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, appliance_definition_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'appliance_definition_name is nil' if appliance_definition_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.Solutions/applianceDefinitions/{applianceDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applianceDefinitionName' => appliance_definition_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 == 204 || status_code == 200 || 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 + + # + # Creates a new appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinition] operation results. + # + def begin_create_or_update(resource_group_name, appliance_definition_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, appliance_definition_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param custom_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, appliance_definition_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, appliance_definition_name, parameters, custom_headers).value! + end + + # + # Creates a new appliance definition. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_definition_name [String] The name of the appliance + # definition. + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param [Hash{String => String}] 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, appliance_definition_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'appliance_definition_name is nil' if appliance_definition_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.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.Solutions/applianceDefinitions/{applianceDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applianceDefinitionName' => appliance_definition_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete_by_id(appliance_definition_id, custom_headers = nil) + response = begin_delete_by_id_async(appliance_definition_id, custom_headers).value! + nil + end + + # + # Deletes the appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_by_id_with_http_info(appliance_definition_id, custom_headers = nil) + begin_delete_by_id_async(appliance_definition_id, custom_headers).value! + end + + # + # Deletes the appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_by_id_async(appliance_definition_id, custom_headers = nil) + fail ArgumentError, 'appliance_definition_id is nil' if appliance_definition_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{applianceDefinitionId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'applianceDefinitionId' => appliance_definition_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 == 204 || status_code == 200 || 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 + + # + # Creates a new appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinition] operation results. + # + def begin_create_or_update_by_id(appliance_definition_id, parameters, custom_headers = nil) + response = begin_create_or_update_by_id_async(appliance_definition_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param custom_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_by_id_with_http_info(appliance_definition_id, parameters, custom_headers = nil) + begin_create_or_update_by_id_async(appliance_definition_id, parameters, custom_headers).value! + end + + # + # Creates a new appliance definition. + # + # @param appliance_definition_id [String] The fully qualified ID of the + # appliance definition, including the appliance name and the appliance + # definition resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} + # @param parameters [ApplianceDefinition] Parameters supplied to the create or + # update an appliance definition. + # @param [Hash{String => String}] 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_by_id_async(appliance_definition_id, parameters, custom_headers = nil) + fail ArgumentError, 'appliance_definition_id is nil' if appliance_definition_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '{applianceDefinitionId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'applianceDefinitionId' => appliance_definition_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::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance definitions in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinitionListResult] operation results. + # + def list_by_resource_group_next(next_page_link, custom_headers = nil) + response = list_by_resource_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the appliance definitions in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_resource_group_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the appliance definitions in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance definitions in a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceDefinitionListResult] which provide lazy access to pages of + # the response. + # + def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_resource_group_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/appliances.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/appliances.rb new file mode 100644 index 0000000000..41cca140fd --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/appliances.rb @@ -0,0 +1,1400 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + # + # ARM managed applications (appliances) + # + class Appliances + include MsRestAzure + + # + # Creates and initializes a new instance of the Appliances class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ManagedApplicationClient] reference to the ManagedApplicationClient + attr_reader :client + + # + # Gets the appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def get(resource_group_name, appliance_name, custom_headers = nil) + response = get_async(resource_group_name, appliance_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param custom_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, appliance_name, custom_headers = nil) + get_async(resource_group_name, appliance_name, custom_headers).value! + end + + # + # Gets the appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param [Hash{String => String}] 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, appliance_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'appliance_name is nil' if appliance_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.Solutions/appliances/{applianceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applianceName' => appliance_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, appliance_name, custom_headers = nil) + response = delete_async(resource_group_name, appliance_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, appliance_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, appliance_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates a new appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def create_or_update(resource_group_name, appliance_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, appliance_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @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, appliance_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, appliance_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.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 appliance. The only value that can be updated via PATCH + # currently is the tags. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to update an existing + # appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def update(resource_group_name, appliance_name, parameters = nil, custom_headers = nil) + response = update_async(resource_group_name, appliance_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an existing appliance. The only value that can be updated via PATCH + # currently is the tags. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to update an existing + # appliance. + # @param custom_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, appliance_name, parameters = nil, custom_headers = nil) + update_async(resource_group_name, appliance_name, parameters, custom_headers).value! + end + + # + # Updates an existing appliance. The only value that can be updated via PATCH + # currently is the tags. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to update an existing + # appliance. + # @param [Hash{String => String}] 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, appliance_name, parameters = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'appliance_name is nil' if appliance_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::ARM::ManagedApplications::Models::Appliance.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.Solutions/appliances/{applianceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applianceName' => appliance_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the appliances within a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_resource_group(resource_group_name, custom_headers = nil) + first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the appliances within a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) + list_by_resource_group_async(resource_group_name, custom_headers).value! + end + + # + # Gets all the appliances within a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param [Hash{String => String}] 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.Solutions/appliances' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the appliances within a 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_by_subscription(custom_headers = nil) + first_page = list_by_subscription_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets all the appliances within a 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_by_subscription_with_http_info(custom_headers = nil) + list_by_subscription_async(custom_headers).value! + end + + # + # Gets all the appliances within a 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_by_subscription_async(custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_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.Solutions/appliances' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def get_by_id(appliance_id, custom_headers = nil) + response = get_by_id_async(appliance_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_by_id_with_http_info(appliance_id, custom_headers = nil) + get_by_id_async(appliance_id, custom_headers).value! + end + + # + # Gets the appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_by_id_async(appliance_id, custom_headers = nil) + fail ArgumentError, 'appliance_id is nil' if appliance_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{applianceId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'applianceId' => appliance_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete_by_id(appliance_id, custom_headers = nil) + response = delete_by_id_async(appliance_id, custom_headers).value! + nil + end + + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_by_id_async(appliance_id, custom_headers = nil) + # Send request + promise = begin_delete_by_id_async(appliance_id, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates a new appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def create_or_update_by_id(appliance_id, parameters, custom_headers = nil) + response = create_or_update_by_id_async(appliance_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @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_by_id_async(appliance_id, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_by_id_async(appliance_id, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.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 appliance. The only value that can be updated via PATCH + # currently is the tags. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to update an existing + # appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def update_by_id(appliance_id, parameters = nil, custom_headers = nil) + response = update_by_id_async(appliance_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an existing appliance. The only value that can be updated via PATCH + # currently is the tags. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to update an existing + # appliance. + # @param custom_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_by_id_with_http_info(appliance_id, parameters = nil, custom_headers = nil) + update_by_id_async(appliance_id, parameters, custom_headers).value! + end + + # + # Updates an existing appliance. The only value that can be updated via PATCH + # currently is the tags. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to update an existing + # appliance. + # @param [Hash{String => String}] 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_by_id_async(appliance_id, parameters = nil, custom_headers = nil) + fail ArgumentError, 'appliance_id is nil' if appliance_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '{applianceId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'applianceId' => appliance_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, appliance_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, appliance_name, custom_headers).value! + nil + end + + # + # Deletes the appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, appliance_name, custom_headers = nil) + begin_delete_async(resource_group_name, appliance_name, custom_headers).value! + end + + # + # Deletes the appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, appliance_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'appliance_name is nil' if appliance_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.Solutions/appliances/{applianceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applianceName' => appliance_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 == 204 || 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 + + # + # Creates a new appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def begin_create_or_update(resource_group_name, appliance_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, appliance_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param custom_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, appliance_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, appliance_name, parameters, custom_headers).value! + end + + # + # Creates a new appliance. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param appliance_name [String] The name of the appliance. + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param [Hash{String => String}] 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, appliance_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'appliance_name is nil' if appliance_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ManagedApplications::Models::Appliance.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.Solutions/appliances/{applianceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applianceName' => appliance_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete_by_id(appliance_id, custom_headers = nil) + response = begin_delete_by_id_async(appliance_id, custom_headers).value! + nil + end + + # + # Deletes the appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_by_id_with_http_info(appliance_id, custom_headers = nil) + begin_delete_by_id_async(appliance_id, custom_headers).value! + end + + # + # Deletes the appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_by_id_async(appliance_id, custom_headers = nil) + fail ArgumentError, 'appliance_id is nil' if appliance_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{applianceId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'applianceId' => appliance_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 == 204 || 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 + + # + # Creates a new appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Appliance] operation results. + # + def begin_create_or_update_by_id(appliance_id, parameters, custom_headers = nil) + response = begin_create_or_update_by_id_async(appliance_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param custom_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_by_id_with_http_info(appliance_id, parameters, custom_headers = nil) + begin_create_or_update_by_id_async(appliance_id, parameters, custom_headers).value! + end + + # + # Creates a new appliance. + # + # @param appliance_id [String] The fully qualified ID of the appliance, + # including the appliance name and the appliance resource type. Use the format, + # /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} + # @param parameters [Appliance] Parameters supplied to the create or update an + # appliance. + # @param [Hash{String => String}] 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_by_id_async(appliance_id, parameters, custom_headers = nil) + fail ArgumentError, 'appliance_id is nil' if appliance_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = '{applianceId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'applianceId' => appliance_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::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::Appliance.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the appliances 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 [ApplianceListResult] operation results. + # + def list_by_resource_group_next(next_page_link, custom_headers = nil) + response = list_by_resource_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the appliances 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 + + # + # Gets all the appliances 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the appliances within a 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 [ApplianceListResult] 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 + + # + # Gets all the appliances within a 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 + + # + # Gets all the appliances within a 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ManagedApplications::Models::ApplianceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the appliances within a resource group. + # + # @param resource_group_name [String] The name of the resource group. The name + # is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceListResult] 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 + + # + # Gets all the appliances within a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplianceListResult] which provide lazy access to pages of the + # response. + # + def list_by_subscription_as_lazy(custom_headers = nil) + response = list_by_subscription_async(custom_headers).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 + + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/managed_application_client.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/managed_application_client.rb new file mode 100644 index 0000000000..4f6cb74404 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/managed_application_client.rb @@ -0,0 +1,133 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + # + # A service client - single point of access to the REST API. + # + class ManagedApplicationClient < 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] The ID of the target subscription. + attr_accessor :subscription_id + + # @return [String] The API version to use for this operation. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Appliances] appliances + attr_reader :appliances + + # @return [ApplianceDefinitions] appliance_definitions + attr_reader :appliance_definitions + + # + # Creates initializes a new instance of the ManagedApplicationClient 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 + + @appliances = Appliances.new(self) + @appliance_definitions = ApplianceDefinitions.new(self) + @api_version = '2016-09-01-preview' + @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_managed_applications' + if defined? Azure::ARM::ManagedApplications::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::ManagedApplications::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance.rb new file mode 100644 index 0000000000..e98a8c7ba6 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance.rb @@ -0,0 +1,192 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # Information about appliance. + # + class Appliance < GenericResource + + include MsRestAzure + + # @return [String] The managed resource group Id. + attr_accessor :managed_resource_group_id + + # @return [String] The fully qualified path of appliance definition Id. + attr_accessor :appliance_definition_id + + # @return Name and value pairs that define the appliance parameters. It + # can be a JObject or a well formed JSON string. + attr_accessor :parameters + + # @return Name and value pairs that define the appliance outputs. + attr_accessor :outputs + + # @return [ProvisioningState] The appliance provisioning state. Possible + # values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', + # 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + attr_accessor :provisioning_state + + # @return [String] The blob URI where the UI definition file is located. + attr_accessor :ui_definition_uri + + # @return [Plan] The plan information. + attr_accessor :plan + + # @return [String] The kind of the appliance. Allowed values are + # MarketPlace and ServiceCatalog. + attr_accessor :kind + + + # + # Mapper for Appliance class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Appliance', + type: { + name: 'Composite', + class_name: 'Appliance', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + managed_by: { + required: false, + serialized_name: 'managedBy', + type: { + name: 'String' + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + identity: { + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'Identity' + } + }, + managed_resource_group_id: { + required: true, + serialized_name: 'properties.managedResourceGroupId', + type: { + name: 'String' + } + }, + appliance_definition_id: { + required: false, + serialized_name: 'properties.applianceDefinitionId', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Object' + } + }, + outputs: { + required: false, + read_only: true, + serialized_name: 'properties.outputs', + type: { + name: 'Object' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + ui_definition_uri: { + required: false, + serialized_name: 'properties.uiDefinitionUri', + type: { + name: 'String' + } + }, + plan: { + required: false, + serialized_name: 'plan', + type: { + name: 'Composite', + class_name: 'Plan' + } + }, + kind: { + required: true, + serialized_name: 'kind', + constraints: { + Pattern: '^[-\w\._,\(\)]+$' + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_artifact.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_artifact.rb new file mode 100644 index 0000000000..b701fe1117 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_artifact.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::ARM::ManagedApplications + module Models + # + # Appliance artifact. + # + class ApplianceArtifact + + include MsRestAzure + + # @return [String] The appliance artifact name. + attr_accessor :name + + # @return [String] The appliance artifact blob uri. + attr_accessor :uri + + # @return [ApplianceArtifactType] The the appliance artifact type. + # Possible values include: 'Template', 'Custom' + attr_accessor :type + + + # + # Mapper for ApplianceArtifact class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplianceArtifact', + type: { + name: 'Composite', + class_name: 'ApplianceArtifact', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + uri: { + required: false, + serialized_name: 'uri', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'ApplianceArtifactType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_artifact_type.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_artifact_type.rb new file mode 100644 index 0000000000..4dfe1b2943 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_artifact_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::ARM::ManagedApplications + module Models + # + # Defines values for ApplianceArtifactType + # + module ApplianceArtifactType + Template = "Template" + Custom = "Custom" + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_definition.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_definition.rb new file mode 100644 index 0000000000..feb192629c --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_definition.rb @@ -0,0 +1,184 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # Information about appliance definition. + # + class ApplianceDefinition < GenericResource + + include MsRestAzure + + # @return [ApplianceLockLevel] The appliance lock level. Possible values + # include: 'CanNotDelete', 'ReadOnly', 'None' + attr_accessor :lock_level + + # @return [String] The appliance definition display name. + attr_accessor :display_name + + # @return [Array] The appliance provider + # authorizations. + attr_accessor :authorizations + + # @return [Array] The collection of appliance + # artifacts. The portal will use the files specified as artifacts to + # construct the user experience of creating an appliance from an + # appliance definition. + attr_accessor :artifacts + + # @return [String] The appliance definition description. + attr_accessor :description + + # @return [String] The appliance definition package file Uri. + attr_accessor :package_file_uri + + + # + # Mapper for ApplianceDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplianceDefinition', + type: { + name: 'Composite', + class_name: 'ApplianceDefinition', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + managed_by: { + required: false, + serialized_name: 'managedBy', + type: { + name: 'String' + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + identity: { + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'Identity' + } + }, + lock_level: { + required: true, + serialized_name: 'properties.lockLevel', + type: { + name: 'Enum', + module: 'ApplianceLockLevel' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + authorizations: { + required: true, + serialized_name: 'properties.authorizations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplianceProviderAuthorizationElementType', + type: { + name: 'Composite', + class_name: 'ApplianceProviderAuthorization' + } + } + } + }, + artifacts: { + required: false, + serialized_name: 'properties.artifacts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplianceArtifactElementType', + type: { + name: 'Composite', + class_name: 'ApplianceArtifact' + } + } + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + package_file_uri: { + required: true, + serialized_name: 'properties.packageFileUri', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_definition_list_result.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_definition_list_result.rb new file mode 100644 index 0000000000..c7111e61f0 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_definition_list_result.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::ARM::ManagedApplications + module Models + # + # List of appliance definitions. + # + class ApplianceDefinitionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The array of appliance + # definitions. + attr_accessor :value + + # @return [String] The URL to use for getting the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ApplianceDefinitionListResult] 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 ApplianceDefinitionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplianceDefinitionListResult', + type: { + name: 'Composite', + class_name: 'ApplianceDefinitionListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplianceDefinitionElementType', + type: { + name: 'Composite', + class_name: 'ApplianceDefinition' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_list_result.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_list_result.rb new file mode 100644 index 0000000000..3aa970f9b2 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_list_result.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::ARM::ManagedApplications + module Models + # + # List of appliances. + # + class ApplianceListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The array of appliances. + attr_accessor :value + + # @return [String] The URL to use for getting the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ApplianceListResult] 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 ApplianceListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplianceListResult', + type: { + name: 'Composite', + class_name: 'ApplianceListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplianceElementType', + type: { + name: 'Composite', + class_name: 'Appliance' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_lock_level.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_lock_level.rb new file mode 100644 index 0000000000..fcde17bc19 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_lock_level.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::ARM::ManagedApplications + module Models + # + # Defines values for ApplianceLockLevel + # + module ApplianceLockLevel + CanNotDelete = "CanNotDelete" + ReadOnly = "ReadOnly" + None = "None" + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_patchable.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_patchable.rb new file mode 100644 index 0000000000..7094b66058 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_patchable.rb @@ -0,0 +1,192 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # Information about appliance. + # + class AppliancePatchable < GenericResource + + include MsRestAzure + + # @return [String] The managed resource group Id. + attr_accessor :managed_resource_group_id + + # @return [String] The fully qualified path of appliance definition Id. + attr_accessor :appliance_definition_id + + # @return Name and value pairs that define the appliance parameters. It + # can be a JObject or a well formed JSON string. + attr_accessor :parameters + + # @return Name and value pairs that define the appliance outputs. + attr_accessor :outputs + + # @return [ProvisioningState] The appliance provisioning state. Possible + # values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', + # 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + attr_accessor :provisioning_state + + # @return [String] The blob URI where the UI definition file is located. + attr_accessor :ui_definition_uri + + # @return [PlanPatchable] The plan information. + attr_accessor :plan + + # @return [String] The kind of the appliance. Allowed values are + # MarketPlace and ServiceCatalog. + attr_accessor :kind + + + # + # Mapper for AppliancePatchable class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AppliancePatchable', + type: { + name: 'Composite', + class_name: 'AppliancePatchable', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + managed_by: { + required: false, + serialized_name: 'managedBy', + type: { + name: 'String' + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + identity: { + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'Identity' + } + }, + managed_resource_group_id: { + required: false, + serialized_name: 'properties.managedResourceGroupId', + type: { + name: 'String' + } + }, + appliance_definition_id: { + required: false, + serialized_name: 'properties.applianceDefinitionId', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Object' + } + }, + outputs: { + required: false, + read_only: true, + serialized_name: 'properties.outputs', + type: { + name: 'Object' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + ui_definition_uri: { + required: false, + serialized_name: 'properties.uiDefinitionUri', + type: { + name: 'String' + } + }, + plan: { + required: false, + serialized_name: 'plan', + type: { + name: 'Composite', + class_name: 'PlanPatchable' + } + }, + kind: { + required: false, + serialized_name: 'kind', + constraints: { + Pattern: '^[-\w\._,\(\)]+$' + }, + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_provider_authorization.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_provider_authorization.rb new file mode 100644 index 0000000000..65cb9495e2 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/appliance_provider_authorization.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # The appliance provider authorization. + # + class ApplianceProviderAuthorization + + include MsRestAzure + + # @return [String] The provider's principal identifier. This is the + # identity that the provider will use to call ARM to manage the appliance + # resources. + attr_accessor :principal_id + + # @return [String] The provider's role definition identifier. This role + # will define all the permissions that the provider must have on the + # appliance's container resource group. This role definition cannot have + # permission to delete the resource group. + attr_accessor :role_definition_id + + + # + # Mapper for ApplianceProviderAuthorization class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplianceProviderAuthorization', + type: { + name: 'Composite', + class_name: 'ApplianceProviderAuthorization', + model_properties: { + principal_id: { + required: true, + serialized_name: 'principalId', + type: { + name: 'String' + } + }, + role_definition_id: { + required: true, + serialized_name: 'roleDefinitionId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/error_response.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/error_response.rb new file mode 100644 index 0000000000..dea0d7974f --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/error_response.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::ARM::ManagedApplications + module Models + # + # Error reponse indicates ARM appliance is not able to process the incoming + # request. The reason is provided in the error message. + # + class ErrorResponse + + include MsRestAzure + + # @return [String] Http status code. + attr_accessor :http_status + + # @return [String] Error code. + attr_accessor :error_code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :error_message + + + # + # 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: { + http_status: { + required: false, + serialized_name: 'httpStatus', + type: { + name: 'String' + } + }, + error_code: { + required: false, + serialized_name: 'errorCode', + type: { + name: 'String' + } + }, + error_message: { + required: false, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_health_metadata.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/generic_resource.rb old mode 100755 new mode 100644 similarity index 61% rename from management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_health_metadata.rb rename to management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/generic_resource.rb index 44d52bdefe..579855879c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_health_metadata.rb +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/generic_resource.rb @@ -1,40 +1,38 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. -module Azure::ARM::Web +module Azure::ARM::ManagedApplications module Models # - # Used for getting ResourceHealthCheck settings. + # Resource information. # - class ResourceHealthMetadata < MsRestAzure::Resource + class GenericResource < Resource include MsRestAzure - include MsRest::JSONable - # @return [String] ARM Resource Id - attr_accessor :resource_health_metadata_id + # @return [String] ID of the resource that manages this resource. + attr_accessor :managed_by - # @return [String] The category that the resource matches in the RHC - # Policy File - attr_accessor :category + # @return [Sku] The SKU of the resource. + attr_accessor :sku - # @return [Boolean] Is there a health signal for the resource - attr_accessor :signal_availability + # @return [Identity] The identity of the resource. + attr_accessor :identity # - # Mapper for ResourceHealthMetadata class as Ruby Hash. + # Mapper for GenericResource class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'ResourceHealthMetadata', + serialized_name: 'GenericResource', type: { name: 'Composite', - class_name: 'ResourceHealthMetadata', + class_name: 'GenericResource', model_properties: { id: { required: false, @@ -46,28 +44,23 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' } }, - kind: { + type: { required: false, - serialized_name: 'kind', + read_only: true, + serialized_name: 'type', type: { name: 'String' } }, location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, - type: { required: false, - serialized_name: 'type', + serialized_name: 'location', type: { name: 'String' } @@ -86,25 +79,27 @@ def self.mapper() } } }, - resource_health_metadata_id: { + managed_by: { required: false, - serialized_name: 'properties.id', + serialized_name: 'managedBy', type: { name: 'String' } }, - category: { + sku: { required: false, - serialized_name: 'properties.category', + serialized_name: 'sku', type: { - name: 'String' + name: 'Composite', + class_name: 'Sku' } }, - signal_availability: { + identity: { required: false, - serialized_name: 'properties.signalAvailability', + serialized_name: 'identity', type: { - name: 'Boolean' + name: 'Composite', + class_name: 'Identity' } } } diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/identity.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/identity.rb new file mode 100644 index 0000000000..9e74dc2429 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/identity.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::ARM::ManagedApplications + module Models + # + # Identity for the resource. + # + class Identity + + include MsRestAzure + + # @return [String] The principal ID of resource identity. + attr_accessor :principal_id + + # @return [String] The tenant ID of resource. + attr_accessor :tenant_id + + # @return [ResourceIdentityType] The identity type. Possible values + # include: 'SystemAssigned' + attr_accessor :type + + + # + # Mapper for Identity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Identity', + type: { + name: 'Composite', + class_name: 'Identity', + model_properties: { + 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' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'ResourceIdentityType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/plan.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/plan.rb new file mode 100644 index 0000000000..46d894542d --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/plan.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # Plan for the appliance. + # + class Plan + + include MsRestAzure + + # @return [String] The plan name. + attr_accessor :name + + # @return [String] The publisher ID. + attr_accessor :publisher + + # @return [String] The product code. + attr_accessor :product + + # @return [String] The promotion code. + attr_accessor :promotion_code + + # @return [String] The plan's version. + attr_accessor :version + + + # + # Mapper for Plan class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Plan', + type: { + name: 'Composite', + class_name: 'Plan', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + publisher: { + required: true, + serialized_name: 'publisher', + type: { + name: 'String' + } + }, + product: { + required: true, + serialized_name: 'product', + type: { + name: 'String' + } + }, + promotion_code: { + required: false, + serialized_name: 'promotionCode', + type: { + name: 'String' + } + }, + version: { + required: true, + serialized_name: 'version', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/plan_patchable.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/plan_patchable.rb new file mode 100644 index 0000000000..739c43f00b --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/plan_patchable.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # Plan for the appliance. + # + class PlanPatchable + + include MsRestAzure + + # @return [String] The plan name. + attr_accessor :name + + # @return [String] The publisher ID. + attr_accessor :publisher + + # @return [String] The product code. + attr_accessor :product + + # @return [String] The promotion code. + attr_accessor :promotion_code + + # @return [String] The plan's version. + attr_accessor :version + + + # + # Mapper for PlanPatchable class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PlanPatchable', + type: { + name: 'Composite', + class_name: 'PlanPatchable', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + publisher: { + required: false, + serialized_name: 'publisher', + type: { + name: 'String' + } + }, + product: { + required: false, + serialized_name: 'product', + type: { + name: 'String' + } + }, + promotion_code: { + required: false, + serialized_name: 'promotionCode', + type: { + name: 'String' + } + }, + version: { + required: false, + serialized_name: 'version', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/provisioning_state.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/provisioning_state.rb new file mode 100644 index 0000000000..a2f8e59533 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/provisioning_state.rb @@ -0,0 +1,25 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # Defines values for ProvisioningState + # + module ProvisioningState + Accepted = "Accepted" + Running = "Running" + Ready = "Ready" + Creating = "Creating" + Created = "Created" + Deleting = "Deleting" + Deleted = "Deleted" + Canceled = "Canceled" + Failed = "Failed" + Succeeded = "Succeeded" + Updating = "Updating" + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/resource.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/resource.rb new file mode 100644 index 0000000000..188c427005 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/resource.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::ARM::ManagedApplications + module Models + # + # Resource information. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/resource_identity_type.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/resource_identity_type.rb new file mode 100644 index 0000000000..0b6850ef33 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/resource_identity_type.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ManagedApplications + module Models + # + # Defines values for ResourceIdentityType + # + module ResourceIdentityType + SystemAssigned = "SystemAssigned" + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/sku.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/sku.rb new file mode 100644 index 0000000000..b089a3c1f6 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/models/sku.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::ARM::ManagedApplications + module Models + # + # SKU for the resource. + # + class Sku + + include MsRestAzure + + # @return [String] The SKU name. + attr_accessor :name + + # @return [String] The SKU tier. + attr_accessor :tier + + # @return [String] The SKU size. + attr_accessor :size + + # @return [String] The SKU family. + attr_accessor :family + + # @return [String] The SKU model. + attr_accessor :model + + # @return [Integer] The SKU capacity. + attr_accessor :capacity + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tier: { + required: false, + serialized_name: 'tier', + type: { + name: 'String' + } + }, + size: { + required: false, + serialized_name: 'size', + type: { + name: 'String' + } + }, + family: { + required: false, + serialized_name: 'family', + type: { + name: 'String' + } + }, + model: { + required: false, + serialized_name: 'model', + type: { + name: 'String' + } + }, + capacity: { + required: false, + serialized_name: 'capacity', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/module_definition.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/module_definition.rb new file mode 100644 index 0000000000..4c2db37845 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/module_definition.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 end +module Azure::ARM end +module Azure::ARM::ManagedApplications end diff --git a/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/version.rb b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/version.rb new file mode 100644 index 0000000000..ec1c461ef7 --- /dev/null +++ b/management/azure_mgmt_managed_applications/lib/generated/azure_mgmt_managed_applications/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::ARM::ManagedApplications + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_managed_applications/spec/spec_helper.rb b/management/azure_mgmt_managed_applications/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_managed_applications/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_marketplace_ordering/.rspec b/management/azure_mgmt_marketplace_ordering/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_marketplace_ordering/LICENSE.txt b/management/azure_mgmt_marketplace_ordering/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_marketplace_ordering/Rakefile b/management/azure_mgmt_marketplace_ordering/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_marketplace_ordering/azure_mgmt_marketplace_ordering.gemspec b/management/azure_mgmt_marketplace_ordering/azure_mgmt_marketplace_ordering.gemspec new file mode 100644 index 0000000000..af578fe926 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/azure_mgmt_marketplace_ordering.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_marketplace_ordering/module_definition' +require 'generated/azure_mgmt_marketplace_ordering/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_marketplace_ordering' + spec.version = Azure::ARM::MarketplaceOrdering::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Marketplace Ordering Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Marketplace Ordering.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/azure_mgmt_marketplace_ordering.rb b/management/azure_mgmt_marketplace_ordering/lib/azure_mgmt_marketplace_ordering.rb new file mode 100644 index 0000000000..c080d6f988 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/azure_mgmt_marketplace_ordering.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_marketplace_ordering' + + diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering.rb new file mode 100644 index 0000000000..577faa41cd --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering.rb @@ -0,0 +1,36 @@ +# encoding: 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 'generated/azure_mgmt_marketplace_ordering/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::MarketplaceOrdering + autoload :MarketplaceAgreements, 'generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb' + autoload :Operations, 'generated/azure_mgmt_marketplace_ordering/operations.rb' + autoload :MarketplaceOrderingAgreements, 'generated/azure_mgmt_marketplace_ordering/marketplace_ordering_agreements.rb' + + module Models + autoload :OperationDisplay, 'generated/azure_mgmt_marketplace_ordering/models/operation_display.rb' + autoload :Operation, 'generated/azure_mgmt_marketplace_ordering/models/operation.rb' + autoload :ErrorResponseError, 'generated/azure_mgmt_marketplace_ordering/models/error_response_error.rb' + autoload :OperationListResult, 'generated/azure_mgmt_marketplace_ordering/models/operation_list_result.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_marketplace_ordering/models/error_response.rb' + autoload :Resource, 'generated/azure_mgmt_marketplace_ordering/models/resource.rb' + autoload :AgreementTerms, 'generated/azure_mgmt_marketplace_ordering/models/agreement_terms.rb' + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb new file mode 100644 index 0000000000..92fa045487 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb @@ -0,0 +1,239 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::MarketplaceOrdering + # + # REST API for MarketplaceOrdering Agreements. + # + class MarketplaceAgreements + include MsRestAzure + + # + # Creates and initializes a new instance of the MarketplaceAgreements class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [MarketplaceOrderingAgreements] reference to the MarketplaceOrderingAgreements + attr_reader :client + + # + # Get marketplace terms. + # + # @param publisher_id [String] Publisher identifier string of image being + # deployed. + # @param offer_id [String] Offer identifier string of image being deployed. + # @param plan_id [String] Plan identifier string of image being deployed. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AgreementTerms] operation results. + # + def get(publisher_id, offer_id, plan_id, custom_headers = nil) + response = get_async(publisher_id, offer_id, plan_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get marketplace terms. + # + # @param publisher_id [String] Publisher identifier string of image being + # deployed. + # @param offer_id [String] Offer identifier string of image being deployed. + # @param plan_id [String] Plan identifier string of image being deployed. + # @param custom_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(publisher_id, offer_id, plan_id, custom_headers = nil) + get_async(publisher_id, offer_id, plan_id, custom_headers).value! + end + + # + # Get marketplace terms. + # + # @param publisher_id [String] Publisher identifier string of image being + # deployed. + # @param offer_id [String] Offer identifier string of image being deployed. + # @param plan_id [String] Plan identifier string of image being deployed. + # @param [Hash{String => String}] 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(publisher_id, offer_id, plan_id, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + offer_type = 'virtualmachine' + fail ArgumentError, 'publisher_id is nil' if publisher_id.nil? + fail ArgumentError, 'offer_id is nil' if offer_id.nil? + fail ArgumentError, 'plan_id is nil' if plan_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.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'offerType' => offer_type,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::MarketplaceOrdering::Models::AgreementTerms.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Save marketplace terms. + # + # @param publisher_id [String] Publisher identifier string of image being + # deployed. + # @param offer_id [String] Offer identifier string of image being deployed. + # @param plan_id [String] Plan identifier string of image being deployed. + # @param parameters [AgreementTerms] Parameters supplied to the Create + # Marketplace Terms operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AgreementTerms] operation results. + # + def create(publisher_id, offer_id, plan_id, parameters, custom_headers = nil) + response = create_async(publisher_id, offer_id, plan_id, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Save marketplace terms. + # + # @param publisher_id [String] Publisher identifier string of image being + # deployed. + # @param offer_id [String] Offer identifier string of image being deployed. + # @param plan_id [String] Plan identifier string of image being deployed. + # @param parameters [AgreementTerms] Parameters supplied to the Create + # Marketplace Terms 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 create_with_http_info(publisher_id, offer_id, plan_id, parameters, custom_headers = nil) + create_async(publisher_id, offer_id, plan_id, parameters, custom_headers).value! + end + + # + # Save marketplace terms. + # + # @param publisher_id [String] Publisher identifier string of image being + # deployed. + # @param offer_id [String] Offer identifier string of image being deployed. + # @param plan_id [String] Plan identifier string of image being deployed. + # @param parameters [AgreementTerms] Parameters supplied to the Create + # Marketplace Terms 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 create_async(publisher_id, offer_id, plan_id, parameters, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + offer_type = 'virtualmachine' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'publisher_id is nil' if publisher_id.nil? + fail ArgumentError, 'offer_id is nil' if offer_id.nil? + fail ArgumentError, 'plan_id is nil' if plan_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::ARM::MarketplaceOrdering::Models::AgreementTerms.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.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'offerType' => offer_type,'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_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::ARM::MarketplaceOrdering::Models::AgreementTerms.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/marketplace_ordering_agreements.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/marketplace_ordering_agreements.rb new file mode 100644 index 0000000000..357163c532 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/marketplace_ordering_agreements.rb @@ -0,0 +1,134 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::MarketplaceOrdering + # + # A service client - single point of access to the REST API. + # + class MarketplaceOrderingAgreements < 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] The subscription ID that identifies an Azure + # subscription. + attr_accessor :subscription_id + + # @return [String] The API version to use for the request. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @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 [MarketplaceAgreements] marketplace_agreements + attr_reader :marketplace_agreements + + # @return [Operations] operations + attr_reader :operations + + # + # Creates initializes a new instance of the MarketplaceOrderingAgreements 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 + + @marketplace_agreements = MarketplaceAgreements.new(self) + @operations = Operations.new(self) + @api_version = '2015-06-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_marketplace_ordering' + if defined? Azure::ARM::MarketplaceOrdering::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::MarketplaceOrdering::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/agreement_terms.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/agreement_terms.rb new file mode 100644 index 0000000000..73e5b073fe --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/agreement_terms.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::ARM::MarketplaceOrdering + module Models + # + # Terms properties for provided Publisher/Offer/Plan tuple + # + class AgreementTerms < Resource + + include MsRestAzure + + # @return [String] Publisher identifier string of image being deployed. + attr_accessor :publisher + + # @return [String] Offer identifier string of image being deployed. + attr_accessor :product + + # @return [String] Plan identifier string of image being deployed. + attr_accessor :plan + + # @return [String] Link to HTML with Microsoft and Publisher terms. + attr_accessor :license_text_link + + # @return [String] Link to the privacy policy of the publisher. + attr_accessor :privacy_policy_link + + # @return [DateTime] Date and time in UTC of when the terms were + # accepted. This is empty if Accepted is false. + attr_accessor :retrieve_datetime + + # @return [String] Terms signature. + attr_accessor :signature + + # @return [Boolean] If any version of the terms have been accepted, + # otherwise false. + attr_accessor :accepted + + + # + # Mapper for AgreementTerms class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AgreementTerms', + type: { + name: 'Composite', + class_name: 'AgreementTerms', + 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' + } + }, + publisher: { + required: false, + serialized_name: 'properties.publisher', + type: { + name: 'String' + } + }, + product: { + required: false, + serialized_name: 'properties.product', + type: { + name: 'String' + } + }, + plan: { + required: false, + serialized_name: 'properties.plan', + type: { + name: 'String' + } + }, + license_text_link: { + required: false, + serialized_name: 'properties.licenseTextLink', + type: { + name: 'String' + } + }, + privacy_policy_link: { + required: false, + serialized_name: 'properties.privacyPolicyLink', + type: { + name: 'String' + } + }, + retrieve_datetime: { + required: false, + serialized_name: 'properties.retrieveDatetime', + type: { + name: 'DateTime' + } + }, + signature: { + required: false, + serialized_name: 'properties.signature', + type: { + name: 'String' + } + }, + accepted: { + required: false, + serialized_name: 'properties.accepted', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/error_response.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/error_response.rb new file mode 100644 index 0000000000..2e12f62529 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/error_response.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::ARM::MarketplaceOrdering + module Models + # + # Error reponse indicates Microsoft.MarketplaceOrdering service is not able + # to process the incoming request. The reason is provided in the error + # message. + # + class ErrorResponse + + include MsRestAzure + + # @return [ErrorResponseError] The details of the error. + attr_accessor :error + + + # + # 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: { + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'ErrorResponseError' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/error_response_error.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/error_response_error.rb new file mode 100644 index 0000000000..ee8b9a786b --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/error_response_error.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::ARM::MarketplaceOrdering + module Models + # + # The details of the error. + # + class ErrorResponseError + + include MsRestAzure + + # @return [String] Error code. + attr_accessor :code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :message + + + # + # Mapper for ErrorResponseError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorResponse_error', + type: { + name: 'Composite', + class_name: 'ErrorResponseError', + model_properties: { + code: { + required: false, + read_only: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation.rb new file mode 100644 index 0000000000..54aa67cbe2 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation.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::ARM::MarketplaceOrdering + module Models + # + # Microsoft.MarketplaceOrdering REST API operation + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation} + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation_display.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation_display.rb new file mode 100644 index 0000000000..9bf1eab4bd --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation_display.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::ARM::MarketplaceOrdering + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.MarketplaceOrdering + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: + # Agreement, virtualmachine, etc. + attr_accessor :resource + + # @return [String] Operation type: Get Agreement, Sign Agreement, Cancel + # Agreement etc. + attr_accessor :operation + + + # + # 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' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation_list_result.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation_list_result.rb new file mode 100644 index 0000000000..d383df2588 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/operation_list_result.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::ARM::MarketplaceOrdering + module Models + # + # Result of the request to list MarketplaceOrdering operations. It contains + # a list of operations and a URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of Microsoft.MarketplaceOrdering + # operations supported by the Microsoft.MarketplaceOrdering 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, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/resource.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/models/resource.rb new file mode 100644 index 0000000000..439c8bc3a6 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/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::ARM::MarketplaceOrdering + module Models + # + # ARM resource. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + + # + # Mapper for 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_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/module_definition.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/module_definition.rb new file mode 100644 index 0000000000..a910577234 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/module_definition.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 end +module Azure::ARM end +module Azure::ARM::MarketplaceOrdering end diff --git a/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/operations.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/operations.rb new file mode 100644 index 0000000000..5ce6b2b543 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/operations.rb @@ -0,0 +1,213 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::MarketplaceOrdering + # + # REST API for MarketplaceOrdering Agreements. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [MarketplaceOrderingAgreements] reference to the MarketplaceOrderingAgreements + attr_reader :client + + # + # Lists all of the available Microsoft.MarketplaceOrdering REST API operations. + # + # @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 Microsoft.MarketplaceOrdering REST API operations. + # + # @param custom_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 Microsoft.MarketplaceOrdering REST API operations. + # + # @param [Hash{String => String}] 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.MarketplaceOrdering/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::MarketplaceOrdering::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 Microsoft.MarketplaceOrdering REST 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 [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 Microsoft.MarketplaceOrdering REST 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_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 Microsoft.MarketplaceOrdering REST 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_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::ARM::MarketplaceOrdering::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 Microsoft.MarketplaceOrdering REST API operations. + # + # @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_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/version.rb b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/version.rb new file mode 100644 index 0000000000..9f93084287 --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/lib/generated/azure_mgmt_marketplace_ordering/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::ARM::MarketplaceOrdering + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_marketplace_ordering/spec/spec_helper.rb b/management/azure_mgmt_marketplace_ordering/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_marketplace_ordering/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_media_services/azure_mgmt_media_services.gemspec b/management/azure_mgmt_media_services/azure_mgmt_media_services.gemspec index d7179fafb7..5a77ddef42 100644 --- a/management/azure_mgmt_media_services/azure_mgmt_media_services.gemspec +++ b/management/azure_mgmt_media_services/azure_mgmt_media_services.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services.rb index 0f512be4a6..29ea034ff6 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -20,20 +20,25 @@ require 'ms_rest_azure' module Azure::ARM::MediaServices + autoload :Operations, 'generated/azure_mgmt_media_services/operations.rb' autoload :MediaServiceOperations, 'generated/azure_mgmt_media_services/media_service_operations.rb' autoload :MediaServicesManagementClient, 'generated/azure_mgmt_media_services/media_services_management_client.rb' module Models - autoload :MediaServiceCollection, 'generated/azure_mgmt_media_services/models/media_service_collection.rb' - autoload :ApiEndpoint, 'generated/azure_mgmt_media_services/models/api_endpoint.rb' autoload :RegenerateKeyInput, 'generated/azure_mgmt_media_services/models/regenerate_key_input.rb' - autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_media_services/models/check_name_availability_input.rb' autoload :RegenerateKeyOutput, 'generated/azure_mgmt_media_services/models/regenerate_key_output.rb' - autoload :StorageAccount, 'generated/azure_mgmt_media_services/models/storage_account.rb' autoload :ApiError, 'generated/azure_mgmt_media_services/models/api_error.rb' - autoload :ServiceKeys, 'generated/azure_mgmt_media_services/models/service_keys.rb' + autoload :Resource, 'generated/azure_mgmt_media_services/models/resource.rb' autoload :CheckNameAvailabilityOutput, 'generated/azure_mgmt_media_services/models/check_name_availability_output.rb' + autoload :ServiceKeys, 'generated/azure_mgmt_media_services/models/service_keys.rb' + autoload :MediaServiceCollection, 'generated/azure_mgmt_media_services/models/media_service_collection.rb' autoload :SyncStorageKeysInput, 'generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb' + autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_media_services/models/check_name_availability_input.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_media_services/models/operation_display.rb' + autoload :ApiEndpoint, 'generated/azure_mgmt_media_services/models/api_endpoint.rb' + autoload :Operation, 'generated/azure_mgmt_media_services/models/operation.rb' + autoload :StorageAccount, 'generated/azure_mgmt_media_services/models/storage_account.rb' + autoload :OperationListResult, 'generated/azure_mgmt_media_services/models/operation_list_result.rb' autoload :MediaService, 'generated/azure_mgmt_media_services/models/media_service.rb' autoload :ResourceType, 'generated/azure_mgmt_media_services/models/resource_type.rb' autoload :EntityNameUnavailabilityReason, 'generated/azure_mgmt_media_services/models/entity_name_unavailability_reason.rb' diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_service_operations.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_service_operations.rb index bf3c8adf7f..886bbdad65 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_service_operations.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_service_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -25,15 +25,15 @@ def initialize(client) # Checks whether the Media Service resource name is available. The name must be # globally unique. # - # @param check_name_availability_input [CheckNameAvailabilityInput] Properties - # needed to check the availability of a name. + # @param parameters [CheckNameAvailabilityInput] Properties needed to check the + # availability of a name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [CheckNameAvailabilityOutput] operation results. # - def check_name_availability(check_name_availability_input, custom_headers = nil) - response = check_name_availability_async(check_name_availability_input, 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 @@ -41,32 +41,32 @@ def check_name_availability(check_name_availability_input, custom_headers = nil) # Checks whether the Media Service resource name is available. The name must be # globally unique. # - # @param check_name_availability_input [CheckNameAvailabilityInput] Properties - # needed to check the availability of a name. + # @param parameters [CheckNameAvailabilityInput] Properties needed to check the + # availability of a name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def check_name_availability_with_http_info(check_name_availability_input, custom_headers = nil) - check_name_availability_async(check_name_availability_input, custom_headers).value! + def check_name_availability_with_http_info(parameters, custom_headers = nil) + check_name_availability_async(parameters, custom_headers).value! end # # Checks whether the Media Service resource name is available. The name must be # globally unique. # - # @param check_name_availability_input [CheckNameAvailabilityInput] Properties - # needed to check the availability of a name. + # @param parameters [CheckNameAvailabilityInput] Properties needed to check the + # availability of a name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def check_name_availability_async(check_name_availability_input, custom_headers = nil) + def check_name_availability_async(parameters, custom_headers = nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, 'check_name_availability_input is nil' if check_name_availability_input.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} @@ -79,7 +79,7 @@ def check_name_availability_async(check_name_availability_input, custom_headers # Serialize Request request_mapper = Azure::ARM::MediaServices::Models::CheckNameAvailabilityInput.mapper() - request_content = @client.serialize(request_mapper, check_name_availability_input) + 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.Media/CheckNameAvailability' @@ -313,15 +313,15 @@ def get_async(resource_group_name, media_service_name, custom_headers = nil) # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param media_service [MediaService] Media Service properties needed for + # @param parameters [MediaService] Media Service properties needed for # creation. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MediaService] operation results. # - def create(resource_group_name, media_service_name, media_service, custom_headers = nil) - response = create_async(resource_group_name, media_service_name, media_service, custom_headers).value! + def create(resource_group_name, media_service_name, parameters, custom_headers = nil) + response = create_async(resource_group_name, media_service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -331,15 +331,15 @@ def create(resource_group_name, media_service_name, media_service, custom_header # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param media_service [MediaService] Media Service properties needed for + # @param parameters [MediaService] Media Service properties needed for # creation. # @param custom_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, media_service_name, media_service, custom_headers = nil) - create_async(resource_group_name, media_service_name, media_service, custom_headers).value! + def create_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil) + create_async(resource_group_name, media_service_name, parameters, custom_headers).value! end # @@ -348,19 +348,19 @@ def create_with_http_info(resource_group_name, media_service_name, media_service # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param media_service [MediaService] Media Service properties needed for + # @param parameters [MediaService] Media Service properties needed for # creation. # @param [Hash{String => String}] 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, media_service_name, media_service, custom_headers = nil) + def create_async(resource_group_name, media_service_name, parameters, custom_headers = nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'media_service_name is nil' if media_service_name.nil? - fail ArgumentError, 'media_service is nil' if media_service.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} @@ -373,7 +373,7 @@ def create_async(resource_group_name, media_service_name, media_service, custom_ # Serialize Request request_mapper = Azure::ARM::MediaServices::Models::MediaService.mapper() - request_content = @client.serialize(request_mapper, media_service) + 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.Media/mediaservices/{mediaServiceName}' @@ -506,15 +506,14 @@ def delete_async(resource_group_name, media_service_name, custom_headers = nil) # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param media_service [MediaService] Media Service properties needed for - # update. + # @param parameters [MediaService] Media Service properties needed for update. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MediaService] operation results. # - def update(resource_group_name, media_service_name, media_service, custom_headers = nil) - response = update_async(resource_group_name, media_service_name, media_service, custom_headers).value! + def update(resource_group_name, media_service_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, media_service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -524,15 +523,14 @@ def update(resource_group_name, media_service_name, media_service, custom_header # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param media_service [MediaService] Media Service properties needed for - # update. + # @param parameters [MediaService] Media Service properties needed for 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, media_service_name, media_service, custom_headers = nil) - update_async(resource_group_name, media_service_name, media_service, custom_headers).value! + def update_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil) + update_async(resource_group_name, media_service_name, parameters, custom_headers).value! end # @@ -541,19 +539,18 @@ def update_with_http_info(resource_group_name, media_service_name, media_service # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param media_service [MediaService] Media Service properties needed for - # update. + # @param parameters [MediaService] Media Service properties needed for 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, media_service_name, media_service, custom_headers = nil) + def update_async(resource_group_name, media_service_name, parameters, custom_headers = nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'media_service_name is nil' if media_service_name.nil? - fail ArgumentError, 'media_service is nil' if media_service.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} @@ -566,7 +563,7 @@ def update_async(resource_group_name, media_service_name, media_service, custom_ # Serialize Request request_mapper = Azure::ARM::MediaServices::Models::MediaService.mapper() - request_content = @client.serialize(request_mapper, media_service) + 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.Media/mediaservices/{mediaServiceName}' @@ -616,15 +613,15 @@ def update_async(resource_group_name, media_service_name, media_service, custom_ # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param regenerate_key_input [RegenerateKeyInput] Properties needed to - # regenerate the Media Service key. + # @param parameters [RegenerateKeyInput] Properties needed to regenerate the + # Media Service key. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [RegenerateKeyOutput] operation results. # - def regenerate_key(resource_group_name, media_service_name, regenerate_key_input, custom_headers = nil) - response = regenerate_key_async(resource_group_name, media_service_name, regenerate_key_input, custom_headers).value! + def regenerate_key(resource_group_name, media_service_name, parameters, custom_headers = nil) + response = regenerate_key_async(resource_group_name, media_service_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -634,15 +631,15 @@ def regenerate_key(resource_group_name, media_service_name, regenerate_key_input # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param regenerate_key_input [RegenerateKeyInput] Properties needed to - # regenerate the Media Service key. + # @param parameters [RegenerateKeyInput] Properties needed to regenerate the + # Media Service 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 regenerate_key_with_http_info(resource_group_name, media_service_name, regenerate_key_input, custom_headers = nil) - regenerate_key_async(resource_group_name, media_service_name, regenerate_key_input, custom_headers).value! + def regenerate_key_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil) + regenerate_key_async(resource_group_name, media_service_name, parameters, custom_headers).value! end # @@ -651,19 +648,19 @@ def regenerate_key_with_http_info(resource_group_name, media_service_name, regen # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param regenerate_key_input [RegenerateKeyInput] Properties needed to - # regenerate the Media Service key. + # @param parameters [RegenerateKeyInput] Properties needed to regenerate the + # Media Service 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 regenerate_key_async(resource_group_name, media_service_name, regenerate_key_input, custom_headers = nil) + def regenerate_key_async(resource_group_name, media_service_name, parameters, custom_headers = nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'media_service_name is nil' if media_service_name.nil? - fail ArgumentError, 'regenerate_key_input is nil' if regenerate_key_input.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} @@ -676,7 +673,7 @@ def regenerate_key_async(resource_group_name, media_service_name, regenerate_key # Serialize Request request_mapper = Azure::ARM::MediaServices::Models::RegenerateKeyInput.mapper() - request_content = @client.serialize(request_mapper, regenerate_key_input) + 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.Media/mediaservices/{mediaServiceName}/regenerateKey' @@ -821,14 +818,14 @@ def list_keys_async(resource_group_name, media_service_name, custom_headers = ni # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param sync_storage_keys_input [SyncStorageKeysInput] Properties needed to - # synchronize the keys for a storage account to the Media Service. + # @param parameters [SyncStorageKeysInput] Properties needed to synchronize the + # keys for a storage account to the Media Service. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def sync_storage_keys(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers = nil) - response = sync_storage_keys_async(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers).value! + def sync_storage_keys(resource_group_name, media_service_name, parameters, custom_headers = nil) + response = sync_storage_keys_async(resource_group_name, media_service_name, parameters, custom_headers).value! nil end @@ -839,15 +836,15 @@ def sync_storage_keys(resource_group_name, media_service_name, sync_storage_keys # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param sync_storage_keys_input [SyncStorageKeysInput] Properties needed to - # synchronize the keys for a storage account to the Media Service. + # @param parameters [SyncStorageKeysInput] Properties needed to synchronize the + # keys for a storage account to the Media 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 sync_storage_keys_with_http_info(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers = nil) - sync_storage_keys_async(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers).value! + def sync_storage_keys_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil) + sync_storage_keys_async(resource_group_name, media_service_name, parameters, custom_headers).value! end # @@ -857,19 +854,19 @@ def sync_storage_keys_with_http_info(resource_group_name, media_service_name, sy # @param resource_group_name [String] Name of the resource group within the # Azure subscription. # @param media_service_name [String] Name of the Media Service. - # @param sync_storage_keys_input [SyncStorageKeysInput] Properties needed to - # synchronize the keys for a storage account to the Media Service. + # @param parameters [SyncStorageKeysInput] Properties needed to synchronize the + # keys for a storage account to the Media 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 sync_storage_keys_async(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers = nil) + def sync_storage_keys_async(resource_group_name, media_service_name, parameters, custom_headers = nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'media_service_name is nil' if media_service_name.nil? - fail ArgumentError, 'sync_storage_keys_input is nil' if sync_storage_keys_input.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} @@ -882,7 +879,7 @@ def sync_storage_keys_async(resource_group_name, media_service_name, sync_storag # Serialize Request request_mapper = Azure::ARM::MediaServices::Models::SyncStorageKeysInput.mapper() - request_content = @client.serialize(request_mapper, sync_storage_keys_input) + 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.Media/mediaservices/{mediaServiceName}/syncStorageKeys' diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_services_management_client.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_services_management_client.rb index 102f15617c..a96b8c70a7 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_services_management_client.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/media_services_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -22,7 +22,7 @@ class MediaServicesManagementClient < MsRestAzure::AzureServiceClient attr_accessor :subscription_id # @return [String] Version of the API to be used with the client request. - # Current version is 2015-10-01 + # The current version is 2015-10-01. attr_reader :api_version # @return [String] Gets or sets the preferred language for the response. @@ -36,6 +36,9 @@ class MediaServicesManagementClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id + # @return [Operations] operations + attr_reader :operations + # @return [MediaServiceOperations] media_service_operations attr_reader :media_service_operations @@ -52,6 +55,7 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials + @operations = Operations.new(self) @media_service_operations = MediaServiceOperations.new(self) @api_version = '2015-10-01' @accept_language = 'en-US' diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_endpoint.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_endpoint.rb index be77b44ee8..9719ab7dfa 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_endpoint.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_endpoint.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApiEndpoint include MsRestAzure - include MsRest::JSONable # @return [String] The Media Services REST endpoint. attr_accessor :endpoint diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_error.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_error.rb index d08c5a00fa..f47d0da94a 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_error.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/api_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApiError include MsRestAzure - include MsRest::JSONable # @return [String] Error code. attr_accessor :code diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_input.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_input.rb index 673ce4f6cb..38a82ea74f 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_input.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityInput include MsRestAzure - include MsRest::JSONable # @return [String] The name of the resource. A name must be globally # unique. attr_accessor :name @@ -40,7 +39,7 @@ def self.mapper() constraints: { MaxLength: 24, MinLength: 3, - Pattern: '^[a-z0-9]' + Pattern: '^[a-z0-9]{3,24}$' }, type: { name: 'String' diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_output.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_output.rb index 713981acb7..531a21524b 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_output.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/check_name_availability_output.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityOutput include MsRestAzure - include MsRest::JSONable # @return [Boolean] Specifies if the name is available. attr_accessor :name_available @@ -40,14 +39,14 @@ def self.mapper() model_properties: { name_available: { required: false, - serialized_name: 'NameAvailable', + serialized_name: 'nameAvailable', type: { name: 'Boolean' } }, reason: { required: false, - serialized_name: 'Reason', + serialized_name: 'reason', type: { name: 'Enum', module: 'EntityNameUnavailabilityReason' @@ -55,7 +54,7 @@ def self.mapper() }, message: { required: false, - serialized_name: 'Message', + serialized_name: 'message', type: { name: 'String' } diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/entity_name_unavailability_reason.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/entity_name_unavailability_reason.rb index a78322e960..6abbf6e137 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/entity_name_unavailability_reason.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/entity_name_unavailability_reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/key_type.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/key_type.rb index a61deceedc..c2332c044d 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/key_type.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service.rb index c98df3d1aa..298f1709b1 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The properties of a Media Service resource. # - class MediaService < MsRestAzure::Resource + class MediaService < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] Read-only property that lists the Media # Services REST API endpoints for this resource. If supplied on a PUT or # PATCH, the value will be ignored. diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service_collection.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service_collection.rb index dc5d8c075a..3f03ab86b6 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service_collection.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/media_service_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,8 +12,8 @@ class MediaServiceCollection include MsRestAzure - include MsRest::JSONable - # @return [Array] + # @return [Array] The collection of Media Service + # resources. attr_accessor :value diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation.rb new file mode 100644 index 0000000000..c3066f85b5 --- /dev/null +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation.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::ARM::MediaServices + module Models + # + # A Media Services REST API operation + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation} + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation_display.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation_display.rb new file mode 100644 index 0000000000..02fa316267 --- /dev/null +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation_display.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::ARM::MediaServices + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.Media + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: Invoice, + # etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation_list_result.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation_list_result.rb new file mode 100644 index 0000000000..e7ebe2e190 --- /dev/null +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/operation_list_result.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::ARM::MediaServices + module Models + # + # Result of the request to list Media Services operations. + # + class OperationListResult + + include MsRestAzure + + # @return [Array] List of Media Services operations supported + # by the Microsoft.Media 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 + + + # + # 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_input.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_input.rb index 0f4a2fb79a..14f46a0eb3 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_input.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RegenerateKeyInput include MsRestAzure - include MsRest::JSONable # @return [KeyType] The keyType indicating which key you want to # regenerate, Primary or Secondary. Possible values include: 'Primary', # 'Secondary' diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_output.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_output.rb index 7e080a3867..5e8c05ea73 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_output.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/regenerate_key_output.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RegenerateKeyOutput include MsRestAzure - include MsRest::JSONable # @return [String] The new value of either the primary or secondary key. attr_accessor :key diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/resource.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/resource.rb new file mode 100644 index 0000000000..f3d26ca521 --- /dev/null +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/resource.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::ARM::MediaServices + module Models + # + # The Azure Resource Manager resource. + # + class Resource + + include MsRestAzure + + # @return [String] The id of the resource. + attr_accessor :id + + # @return [String] The name of the resource. + attr_accessor :name + + # @return [String] The type of the resource + attr_accessor :type + + # @return [String] The geographic location of the resource. This must be + # one of the supported and registered Azure Geo Regions (for example, + # West US, East US, Southeast Asia, and so forth). + attr_accessor :location + + # @return [Hash{String => String}] Tags to help categorize the resource + # in the Azure portal. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/resource_type.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/resource_type.rb index 5b5227f137..2a81389006 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/resource_type.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/resource_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/service_keys.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/service_keys.rb index 621ec0ac06..6388ace749 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/service_keys.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/service_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServiceKeys include MsRestAzure - include MsRest::JSONable # @return [String] The primary authorization endpoint. attr_accessor :primary_auth_endpoint diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/storage_account.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/storage_account.rb index a9835dd972..2a171139b5 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/storage_account.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/storage_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccount include MsRestAzure - include MsRest::JSONable # @return [String] The id of the storage account resource. Media Services # relies on tables and queues as well as blobs, so the primary storage # account must be a Standard Storage account (either diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb index 44d4521756..d63db4dfb6 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SyncStorageKeysInput include MsRestAzure - include MsRest::JSONable # @return [String] The id of the storage account resource. attr_accessor :id diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/module_definition.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/module_definition.rb index e37cf8ecba..c4bc186f59 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/module_definition.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/operations.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/operations.rb new file mode 100644 index 0000000000..6d36b5e269 --- /dev/null +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/operations.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::ARM::MediaServices + # + # Media Services resource management APIs. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [MediaServicesManagementClient] reference to the MediaServicesManagementClient + attr_reader :client + + # + # Lists all of the available Media Services REST API operations. + # + # @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(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all of the available Media Services REST API operations. + # + # @param custom_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 Media Services REST API operations. + # + # @param [Hash{String => String}] 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.Media/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::ARM::MediaServices::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 + + end +end diff --git a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/version.rb b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/version.rb index 8ec59a0866..e81c9dc29c 100644 --- a/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/version.rb +++ b/management/azure_mgmt_media_services/lib/generated/azure_mgmt_media_services/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::MediaServices - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_mobile_engagement/azure_mgmt_mobile_engagement.gemspec b/management/azure_mgmt_mobile_engagement/azure_mgmt_mobile_engagement.gemspec index 62732144aa..96d3eea9fa 100644 --- a/management/azure_mgmt_mobile_engagement/azure_mgmt_mobile_engagement.gemspec +++ b/management/azure_mgmt_mobile_engagement/azure_mgmt_mobile_engagement.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement.rb index b9539d604f..1e541cdeee 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -62,6 +62,7 @@ module Models autoload :FeedbackByCampaignParameter, 'generated/azure_mgmt_mobile_engagement/models/feedback_by_campaign_parameter.rb' autoload :DeviceInfo, 'generated/azure_mgmt_mobile_engagement/models/device_info.rb' autoload :ImportTaskListResult, 'generated/azure_mgmt_mobile_engagement/models/import_task_list_result.rb' + autoload :Resource, 'generated/azure_mgmt_mobile_engagement/models/resource.rb' autoload :DeviceLocation, 'generated/azure_mgmt_mobile_engagement/models/device_location.rb' autoload :ExportTaskResult, 'generated/azure_mgmt_mobile_engagement/models/export_task_result.rb' autoload :Device, 'generated/azure_mgmt_mobile_engagement/models/device.rb' diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/app_collections.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/app_collections.rb index a688db640d..7aabfd6819 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/app_collections.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/app_collections.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/apps.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/apps.rb index a5d5f9f156..a6f307183c 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/apps.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/apps.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/campaigns.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/campaigns.rb index 0e09e02623..b6cdf6484e 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/campaigns.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/campaigns.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/devices.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/devices.rb index 7ce90f5f6f..d617a82397 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/devices.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/devices.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/engagement_management_client.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/engagement_management_client.rb index 367054391a..a6e4d55bb6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/engagement_management_client.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/engagement_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/export_tasks.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/export_tasks.rb index 0ba5364492..5f32b71a77 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/export_tasks.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/export_tasks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/import_tasks.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/import_tasks.rb index d5f10715c6..b8da823ddf 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/import_tasks.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/import_tasks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/announcement_feedback_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/announcement_feedback_criterion.rb index c17a89f9c8..a6963addf8 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/announcement_feedback_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/announcement_feedback_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AnnouncementFeedbackCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "announcement-feedback" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error.rb index 3c202fbcfd..6677365338 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ApiError include MsRestAzure - include MsRest::JSONable # @return [ApiErrorError] attr_accessor :error diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error_error.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error_error.rb index 95d3bd97cb..aad5613abc 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error_error.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/api_error_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ApiErrorError include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :code diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app.rb index 5df817fd8f..131a79aac2 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The Mobile Engagement App resource. # - class App < MsRestAzure::Resource + class App < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The application unique identifier. attr_accessor :backend_id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection.rb index d39b216048..a81a3e0877 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The AppCollection resource. # - class AppCollection < MsRestAzure::Resource + class AppCollection < Resource include MsRestAzure - include MsRest::JSONable # @return [ProvisioningStates] Mobile Engagement AppCollection # Properties. Possible values include: 'Creating', 'Succeeded' attr_accessor :provisioning_state diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_list_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_list_result.rb index 812bd84a64..04ad60cbd6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_list_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_name_availability.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_name_availability.rb index 352b248d54..f76089cf8d 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_name_availability.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_name_availability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AppCollectionNameAvailability include MsRestAzure - include MsRest::JSONable # @return [String] Name. attr_accessor :name diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_info_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_info_filter.rb index c2fe84e8a3..b8db27bb70 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_info_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_info_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AppInfoFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "app-info" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_list_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_list_result.rb index d677f6935c..5a292632c9 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_list_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/app_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/application_version_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/application_version_criterion.rb index 88d51a0473..0b99017066 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/application_version_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/application_version_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ApplicationVersionCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "application-version" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/audience_operators.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/audience_operators.rb index 7e901cdea3..2b92b5a95a 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/audience_operators.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/audience_operators.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/boolean_tag_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/boolean_tag_criterion.rb index d4f7ad6f83..a54b720662 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/boolean_tag_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/boolean_tag_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BooleanTagCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "boolean-tag" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign.rb index 5c316e83f9..d2d16aed1c 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Campaign < CampaignLocalization include MsRestAzure - include MsRest::JSONable # @return [String] Unique name of the campaign. attr_accessor :name diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_audience.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_audience.rb index f45d2667db..91adca7a4b 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_audience.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_audience.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -18,7 +18,6 @@ class CampaignAudience include MsRestAzure - include MsRest::JSONable # @return [String] Boolean expression made of criteria (variables) # operators (`not`, `and` or `or`) and parenthesis. Criterion names in # the audience expression must start with a capital letter and can only diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_feedbacks.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_feedbacks.rb index e55a944d5b..99c010baef 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_feedbacks.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_feedbacks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_kinds.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_kinds.rb index 507e5654bc..eab81dabf2 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_kinds.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_kinds.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_list_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_list_result.rb index 627a8f4819..49f08b5687 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_list_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignListResult < CampaignStateResult include MsRestAzure - include MsRest::JSONable # @return [String] Name of the campaign. attr_accessor :name diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_localization.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_localization.rb index 35fb98c680..96dcc8cabb 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_localization.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_localization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignLocalization include MsRestAzure - include MsRest::JSONable # @return [String] Title of the notification. This field supports appInfo # markers. attr_accessor :notification_title diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_parameters.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_parameters.rb index 1a5045f083..2a2c1798da 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_parameters.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignPushParameters include MsRestAzure - include MsRest::JSONable # @return [Array] Device identifiers to push as a JSON array of # strings. Note that if you want to push the same campaign several times # to the same device, you need to make several API calls. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_result.rb index 246c2c672f..cfcd7baef7 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignPushResult include MsRestAzure - include MsRest::JSONable # @return [Array] A JSON array containing all identifiers that # have been rejected. A device can be rejected for the following reasons: # * The device hasn’t reported any session yet. * The device is over diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_result.rb index 3aaaebbacc..b52fabdc07 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignResult < Campaign include MsRestAzure - include MsRest::JSONable # @return [Integer] Campaign identifier. attr_accessor :id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state.rb index 1690c3ee80..e9ea462e53 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignState include MsRestAzure - include MsRest::JSONable # @return [CampaignStates] State of the campaign, or 'queued' when # testing a campaign. Possible values include: 'draft', 'scheduled', # 'in-progress', 'finished', 'queued' diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state_result.rb index 15c9e03f73..3aa986da11 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignStateResult < CampaignState include MsRestAzure - include MsRest::JSONable # @return [Integer] Campaign identifier. attr_accessor :id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_states.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_states.rb index 4d1f1944b8..08ffa4a5e6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_states.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_states.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_statistics_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_statistics_result.rb index f5320124a1..ea176da577 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_statistics_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_statistics_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignStatisticsResult include MsRestAzure - include MsRest::JSONable # @return [Integer] Number of times the campaign was registered to be # pushed. attr_accessor :queued diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_new_parameters.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_new_parameters.rb index 054bd72ad4..909ac15e29 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_new_parameters.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_new_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignTestNewParameters < CampaignTestSavedParameters include MsRestAzure - include MsRest::JSONable # @return [Campaign] attr_accessor :data diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_saved_parameters.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_saved_parameters.rb index 45010ef607..3e9482c5d1 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_saved_parameters.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_saved_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CampaignTestSavedParameters include MsRestAzure - include MsRest::JSONable # @return [String] Device identifier (as returned by the SDK). attr_accessor :device_id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_type.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_type.rb index 5ab83b4afe..972798bcc6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_type.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_types.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_types.rb index 2d6c24ae6c..63e2610f4f 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_types.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaign_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaigns_list_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaigns_list_result.rb index 217f9bec4e..58319874f9 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaigns_list_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/campaigns_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_country_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_country_criterion.rb index 57beddb137..60bbc02a18 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_country_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_country_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CarrierCountryCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "carrier-country" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_name_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_name_criterion.rb index 204cc28da7..e442b7eee6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_name_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/carrier_name_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CarrierNameCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "carrier-name" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/criterion.rb index 1c7bcd66f2..70b4f2bd24 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Criterion include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["carrier-name"] = "CarrierNameCriterion" @@discriminatorMap["carrier-country"] = "CarrierCountryCriterion" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/datapush_feedback_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/datapush_feedback_criterion.rb index 53d048fa92..a0a0162a1f 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/datapush_feedback_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/datapush_feedback_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DatapushFeedbackCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "datapush-feedback" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_range_export_task_parameter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_range_export_task_parameter.rb index f0cbb1991f..4a443133f9 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_range_export_task_parameter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_range_export_task_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DateRangeExportTaskParameter include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :container_url diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_tag_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_tag_criterion.rb index e0b615b780..4304f19bb4 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_tag_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/date_tag_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DateTagCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "date-tag" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/delivery_times.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/delivery_times.rb index 45847d10ab..61d7f82f10 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/delivery_times.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/delivery_times.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device.rb index f264d35111..70b937edc8 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Device include MsRestAzure - include MsRest::JSONable # @return [String] The device result. attr_accessor :device_id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_info.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_info.rb index a00a30862c..7578fb9c9a 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_info.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DeviceInfo include MsRestAzure - include MsRest::JSONable # @return [String] Phone model. attr_accessor :phone_model diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_location.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_location.rb index 940b27a5a7..b6de6fc830 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_location.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_location.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DeviceLocation include MsRestAzure - include MsRest::JSONable # @return [String] The ISO 3166 two-letter country code. attr_accessor :countrycode diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_manufacturer_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_manufacturer_criterion.rb index 96bb73560a..85c796a62d 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_manufacturer_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_manufacturer_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeviceManufacturerCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "device-manufacturer" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_meta.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_meta.rb index 8ac2c19325..3539827ee6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_meta.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_meta.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DeviceMeta include MsRestAzure - include MsRest::JSONable # @return [Integer] First time the device used the application in # milliseconds since January 1st, 1970 UTC. attr_accessor :first_seen diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_model_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_model_criterion.rb index 215fc6eb5a..7adc29989f 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_model_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_model_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeviceModelCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "device-model" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_query_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_query_result.rb index e8aea36b31..86e7cda293 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_query_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_query_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DeviceQueryResult include MsRestAzure - include MsRest::JSONable # @return [String] The device result. attr_accessor :device_id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_parameters.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_parameters.rb index 276c240c67..8051ec278d 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_parameters.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DeviceTagsParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => Hash{String => String}}] A JSON object # describing the set of tags to record for a set of users. Each key is a # device/user identifier, each value is itself a key/value set: the tags diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_result.rb index b063cf65af..a0028e52c5 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DeviceTagsResult include MsRestAzure - include MsRest::JSONable # @return [Array] A JSON array containing all identifiers that # have been rejected. Please note that if the request parameters are # valid but all the specified devices are rejected, the status code is diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/devices_query_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/devices_query_result.rb index 1cb10a36c1..aeed3d1ef3 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/devices_query_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/devices_query_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_active_users_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_active_users_filter.rb index b38fa7879e..eed7431b53 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_active_users_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_active_users_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EngageActiveUsersFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "engage-active-users" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_idle_users_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_idle_users_filter.rb index cec3b300c9..1d7d3154de 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_idle_users_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_idle_users_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EngageIdleUsersFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "engage-idle-users" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_new_users_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_new_users_filter.rb index 2712e00b5a..187e187f82 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_new_users_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_new_users_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EngageNewUsersFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "engage-new-users" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_old_users_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_old_users_filter.rb index adeb8b84da..5e44bb258d 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_old_users_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_old_users_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EngageOldUsersFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "engage-old-users" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_subset_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_subset_filter.rb index c89533a69c..89995e54aa 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_subset_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/engage_subset_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EngageSubsetFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "engage-subset" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_format.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_format.rb index 3939e9413e..b84760c705 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_format.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_format.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_options.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_options.rb index 7c28a86ca6..8ce50da86e 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_options.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExportOptions include MsRestAzure - include MsRest::JSONable # @return [Boolean] attr_accessor :export_user_id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_state.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_state.rb index a5b2cb4f44..890b1f5e7b 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_state.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_list_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_list_result.rb index f947456e20..bdcb135e15 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_list_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_parameter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_parameter.rb index 43e3802339..00664251f0 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_parameter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ExportTaskParameter include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :container_url diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_result.rb index b291953984..50ad9e0617 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_task_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ExportTaskResult include MsRestAzure - include MsRest::JSONable # @return [String] Unique identifier of the export task. attr_accessor :id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_type.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_type.rb index edd2996e88..1579a21e7c 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_type.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/export_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_campaign_parameter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_campaign_parameter.rb index 94005ef563..92bb3ae224 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_campaign_parameter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_campaign_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class FeedbackByCampaignParameter include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :container_url diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_date_range_parameter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_date_range_parameter.rb index e14363f3bf..218a8eeacb 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_date_range_parameter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_date_range_parameter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class FeedbackByDateRangeParameter include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :container_url diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/filter.rb index f81e3b4d1f..049e7daab7 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Filter include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["engage-subset"] = "EngageSubsetFilter" @@discriminatorMap["engage-old-users"] = "EngageOldUsersFilter" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/firmware_version_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/firmware_version_criterion.rb index d80a637ac5..de3aa55088 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/firmware_version_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/firmware_version_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FirmwareVersionCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "firmware-version" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/geo_fencing_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/geo_fencing_criterion.rb index c6bdb099b9..ba774cd940 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/geo_fencing_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/geo_fencing_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class GeoFencingCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "geo-fencing" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task.rb index 79fe5f3928..df4f51ec69 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ImportTask include MsRestAzure - include MsRest::JSONable # @return [String] A shared Access Signature (SAS) Storage URI where the # job results will be retrieved from. attr_accessor :storage_url diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_list_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_list_result.rb index 4f5f32df73..d296688c54 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_list_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_result.rb index 1d0d23b298..27e3669ecd 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/import_task_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ImportTaskResult < ImportTask include MsRestAzure - include MsRest::JSONable # @return [String] Unique identifier of the import task. attr_accessor :id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/integer_tag_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/integer_tag_criterion.rb index bb71a62738..fe8ee7e7df 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/integer_tag_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/integer_tag_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IntegerTagCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "integer-tag" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/job_states.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/job_states.rb index 453506e7c8..61be6ce698 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/job_states.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/job_states.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/language_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/language_criterion.rb index 000cf4ced0..2f2246a685 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/language_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/language_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LanguageCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "language" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/location_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/location_criterion.rb index 5b38fd6651..578c9aff0c 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/location_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/location_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LocationCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "location" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/native_push_enabled_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/native_push_enabled_filter.rb index 4220eef6e6..09a8545b4c 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/native_push_enabled_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/native_push_enabled_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NativePushEnabledFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "native-push-enabled" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/network_type_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/network_type_criterion.rb index 6694f277ed..a8d2668d03 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/network_type_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/network_type_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NetworkTypeCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "network-type" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_options.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_options.rb index 4b0d3cec9f..f8c423dc13 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_options.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class NotificationOptions include MsRestAzure - include MsRest::JSONable # @return [String] Android 4.1+ only. Multi line message shown in # expanded notifications on Android 4.1+ devices. The `notificationType` # property must be set to `system`. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_types.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_types.rb index 1b902c7f34..08bf7f29be 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_types.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/notification_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_answer_feedback_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_answer_feedback_criterion.rb index 210af6abca..9355a2b1d6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_answer_feedback_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_answer_feedback_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PollAnswerFeedbackCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "poll-answer-feedback" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_feedback_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_feedback_criterion.rb index 13c88eb5ae..ff401b5edf 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_feedback_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_feedback_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PollFeedbackCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "poll-feedback" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question.rb index 8117361430..d2c383a52f 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class PollQuestion < PollQuestionLocalization include MsRestAzure - include MsRest::JSONable # @return [Integer] Unique identifier of the question. attr_accessor :id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb index bddde84683..8784d42962 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class PollQuestionChoice < PollQuestionChoiceLocalization include MsRestAzure - include MsRest::JSONable # @return [Integer] Unique identifier of the choice. attr_accessor :id diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice_localization.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice_localization.rb index 19688050b9..aedc13159b 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice_localization.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice_localization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class PollQuestionChoiceLocalization include MsRestAzure - include MsRest::JSONable # @return [String] Title of the choice. attr_accessor :title diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_localization.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_localization.rb index 7f846d473e..c1edcaf2ef 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_localization.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_localization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class PollQuestionLocalization include MsRestAzure - include MsRest::JSONable # @return [String] Title of the question. attr_accessor :title diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/provisioning_states.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/provisioning_states.rb index 8564feb429..4a32c5f37a 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/provisioning_states.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/provisioning_states.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_modes.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_modes.rb index ee79dbb563..a7989b01d6 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_modes.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_modes.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_quota_filter.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_quota_filter.rb index 4cdc0b4c84..e0b70a43aa 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_quota_filter.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/push_quota_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PushQuotaFilter < Filter include MsRestAzure - include MsRest::JSONable def initialize @type = "push-quota" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/resource.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/resource.rb new file mode 100644 index 0000000000..6e415c3271 --- /dev/null +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/resource.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::ARM::MobileEngagement + module Models + # + # Model object. + # + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/screen_size_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/screen_size_criterion.rb index 668d41b8f2..678c7c6e9f 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/screen_size_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/screen_size_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ScreenSizeCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "screen-size" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/segment_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/segment_criterion.rb index c77c8566a1..ae442bf709 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/segment_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/segment_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SegmentCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "segment" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/string_tag_criterion.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/string_tag_criterion.rb index f5eff36a67..9d323d5a82 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/string_tag_criterion.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/string_tag_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StringTagCriterion < Criterion include MsRestAzure - include MsRest::JSONable def initialize @type = "string-tag" diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/supported_platforms_list_result.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/supported_platforms_list_result.rb index c6a8776e70..2d10f3b26f 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/supported_platforms_list_result.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/models/supported_platforms_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SupportedPlatformsListResult include MsRestAzure - include MsRest::JSONable # @return [Array] List of supported platforms. attr_accessor :platforms diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/module_definition.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/module_definition.rb index e28e069839..99b169fe8e 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/module_definition.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/supported_platforms.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/supported_platforms.rb index dc99c08360..368cb59a39 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/supported_platforms.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/supported_platforms.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/version.rb b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/version.rb index 4723191c32..b0133e2209 100644 --- a/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/version.rb +++ b/management/azure_mgmt_mobile_engagement/lib/generated/azure_mgmt_mobile_engagement/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::MobileEngagement - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_monitor/azure_mgmt_monitor.gemspec b/management/azure_mgmt_monitor/azure_mgmt_monitor.gemspec index b9a0d7a218..016b7f738b 100644 --- a/management/azure_mgmt_monitor/azure_mgmt_monitor.gemspec +++ b/management/azure_mgmt_monitor/azure_mgmt_monitor.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor.rb index e85fa25eb1..9928f9b196 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,55 +21,63 @@ module Azure::ARM::Monitor autoload :AutoscaleSettings, 'generated/azure_mgmt_monitor/autoscale_settings.rb' + autoload :Operations, 'generated/azure_mgmt_monitor/operations.rb' autoload :AlertRuleIncidents, 'generated/azure_mgmt_monitor/alert_rule_incidents.rb' autoload :AlertRules, 'generated/azure_mgmt_monitor/alert_rules.rb' autoload :LogProfiles, 'generated/azure_mgmt_monitor/log_profiles.rb' - autoload :ServiceDiagnosticSettingsOperations, 'generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb' + autoload :DiagnosticSettingsOperations, 'generated/azure_mgmt_monitor/diagnostic_settings_operations.rb' + autoload :DiagnosticSettingsCategoryOperations, 'generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb' autoload :ActionGroups, 'generated/azure_mgmt_monitor/action_groups.rb' autoload :ActivityLogAlerts, 'generated/azure_mgmt_monitor/activity_log_alerts.rb' autoload :MonitorManagementClient, 'generated/azure_mgmt_monitor/monitor_management_client.rb' module Models autoload :RuleAction, 'generated/azure_mgmt_monitor/models/rule_action.rb' - autoload :ActionGroupList, 'generated/azure_mgmt_monitor/models/action_group_list.rb' + autoload :Resource, 'generated/azure_mgmt_monitor/models/resource.rb' + autoload :WebhookReceiver, 'generated/azure_mgmt_monitor/models/webhook_receiver.rb' autoload :MetricTrigger, 'generated/azure_mgmt_monitor/models/metric_trigger.rb' autoload :ActivityLogAlertLeafCondition, 'generated/azure_mgmt_monitor/models/activity_log_alert_leaf_condition.rb' autoload :ScaleRule, 'generated/azure_mgmt_monitor/models/scale_rule.rb' - autoload :ManagementEventAggregationCondition, 'generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb' - autoload :RecurrentSchedule, 'generated/azure_mgmt_monitor/models/recurrent_schedule.rb' autoload :EnableRequest, 'generated/azure_mgmt_monitor/models/enable_request.rb' + autoload :RecurrentSchedule, 'generated/azure_mgmt_monitor/models/recurrent_schedule.rb' + autoload :ManagementEventAggregationCondition, 'generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb' autoload :AutoscaleProfile, 'generated/azure_mgmt_monitor/models/autoscale_profile.rb' - autoload :ScaleCapacity, 'generated/azure_mgmt_monitor/models/scale_capacity.rb' + autoload :ActionGroupList, 'generated/azure_mgmt_monitor/models/action_group_list.rb' autoload :WebhookNotification, 'generated/azure_mgmt_monitor/models/webhook_notification.rb' + autoload :ScaleCapacity, 'generated/azure_mgmt_monitor/models/scale_capacity.rb' autoload :AutoscaleNotification, 'generated/azure_mgmt_monitor/models/autoscale_notification.rb' - autoload :AutoscaleSettingResourcePatch, 'generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb' - autoload :SmsReceiver, 'generated/azure_mgmt_monitor/models/sms_receiver.rb' - autoload :ErrorResponse, 'generated/azure_mgmt_monitor/models/error_response.rb' + autoload :EmailReceiver, 'generated/azure_mgmt_monitor/models/email_receiver.rb' + autoload :AutoscaleSettingResourceCollection, 'generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_monitor/models/operation_display.rb' autoload :ActivityLogAlertPatchBody, 'generated/azure_mgmt_monitor/models/activity_log_alert_patch_body.rb' - autoload :IncidentListResult, 'generated/azure_mgmt_monitor/models/incident_list_result.rb' + autoload :OperationListResult, 'generated/azure_mgmt_monitor/models/operation_list_result.rb' autoload :ActivityLogAlertList, 'generated/azure_mgmt_monitor/models/activity_log_alert_list.rb' - autoload :RuleCondition, 'generated/azure_mgmt_monitor/models/rule_condition.rb' + autoload :IncidentListResult, 'generated/azure_mgmt_monitor/models/incident_list_result.rb' autoload :AlertRuleResourcePatch, 'generated/azure_mgmt_monitor/models/alert_rule_resource_patch.rb' - autoload :RuleManagementEventClaimsDataSource, 'generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb' + autoload :RuleCondition, 'generated/azure_mgmt_monitor/models/rule_condition.rb' autoload :AlertRuleResourceCollection, 'generated/azure_mgmt_monitor/models/alert_rule_resource_collection.rb' - autoload :ScaleAction, 'generated/azure_mgmt_monitor/models/scale_action.rb' + autoload :RuleManagementEventClaimsDataSource, 'generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb' autoload :RetentionPolicy, 'generated/azure_mgmt_monitor/models/retention_policy.rb' - autoload :Recurrence, 'generated/azure_mgmt_monitor/models/recurrence.rb' + autoload :TimeWindow, 'generated/azure_mgmt_monitor/models/time_window.rb' autoload :ActivityLogAlertActionList, 'generated/azure_mgmt_monitor/models/activity_log_alert_action_list.rb' - autoload :AutoscaleSettingResourceCollection, 'generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb' + autoload :EmailNotification, 'generated/azure_mgmt_monitor/models/email_notification.rb' autoload :LogProfileResourcePatch, 'generated/azure_mgmt_monitor/models/log_profile_resource_patch.rb' - autoload :RuleDataSource, 'generated/azure_mgmt_monitor/models/rule_data_source.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_monitor/models/error_response.rb' autoload :LogProfileCollection, 'generated/azure_mgmt_monitor/models/log_profile_collection.rb' - autoload :WebhookReceiver, 'generated/azure_mgmt_monitor/models/webhook_receiver.rb' + autoload :Incident, 'generated/azure_mgmt_monitor/models/incident.rb' + autoload :ProxyOnlyResource, 'generated/azure_mgmt_monitor/models/proxy_only_resource.rb' + autoload :SmsReceiver, 'generated/azure_mgmt_monitor/models/sms_receiver.rb' autoload :MetricSettings, 'generated/azure_mgmt_monitor/models/metric_settings.rb' - autoload :EmailNotification, 'generated/azure_mgmt_monitor/models/email_notification.rb' + autoload :Recurrence, 'generated/azure_mgmt_monitor/models/recurrence.rb' autoload :LogSettings, 'generated/azure_mgmt_monitor/models/log_settings.rb' - autoload :ActivityLogAlertAllOfCondition, 'generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb' + autoload :Operation, 'generated/azure_mgmt_monitor/models/operation.rb' autoload :ActivityLogAlertActionGroup, 'generated/azure_mgmt_monitor/models/activity_log_alert_action_group.rb' - autoload :Incident, 'generated/azure_mgmt_monitor/models/incident.rb' - autoload :ServiceDiagnosticSettingsResourcePatch, 'generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource_patch.rb' - autoload :TimeWindow, 'generated/azure_mgmt_monitor/models/time_window.rb' - autoload :EmailReceiver, 'generated/azure_mgmt_monitor/models/email_receiver.rb' + autoload :ScaleAction, 'generated/azure_mgmt_monitor/models/scale_action.rb' + autoload :DiagnosticSettingsResourceCollection, 'generated/azure_mgmt_monitor/models/diagnostic_settings_resource_collection.rb' + autoload :RuleDataSource, 'generated/azure_mgmt_monitor/models/rule_data_source.rb' + autoload :ActivityLogAlertAllOfCondition, 'generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb' + autoload :AutoscaleSettingResourcePatch, 'generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb' + autoload :DiagnosticSettingsCategoryResourceCollection, 'generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource_collection.rb' autoload :AutoscaleSettingResource, 'generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb' autoload :RuleMetricDataSource, 'generated/azure_mgmt_monitor/models/rule_metric_data_source.rb' autoload :RuleManagementEventDataSource, 'generated/azure_mgmt_monitor/models/rule_management_event_data_source.rb' @@ -80,7 +88,8 @@ module Models autoload :RuleWebhookAction, 'generated/azure_mgmt_monitor/models/rule_webhook_action.rb' autoload :AlertRuleResource, 'generated/azure_mgmt_monitor/models/alert_rule_resource.rb' autoload :LogProfileResource, 'generated/azure_mgmt_monitor/models/log_profile_resource.rb' - autoload :ServiceDiagnosticSettingsResource, 'generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource.rb' + autoload :DiagnosticSettingsResource, 'generated/azure_mgmt_monitor/models/diagnostic_settings_resource.rb' + autoload :DiagnosticSettingsCategoryResource, 'generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource.rb' autoload :ActionGroupResource, 'generated/azure_mgmt_monitor/models/action_group_resource.rb' autoload :ActivityLogAlertResource, 'generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb' autoload :MetricStatisticType, 'generated/azure_mgmt_monitor/models/metric_statistic_type.rb' @@ -91,6 +100,7 @@ module Models autoload :RecurrenceFrequency, 'generated/azure_mgmt_monitor/models/recurrence_frequency.rb' autoload :ConditionOperator, 'generated/azure_mgmt_monitor/models/condition_operator.rb' autoload :TimeAggregationOperator, 'generated/azure_mgmt_monitor/models/time_aggregation_operator.rb' + autoload :CategoryType, 'generated/azure_mgmt_monitor/models/category_type.rb' autoload :ReceiverStatus, 'generated/azure_mgmt_monitor/models/receiver_status.rb' end end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb index 97be70a3ea..1cd2cd2e9a 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -107,7 +107,7 @@ def create_or_update_async(resource_group_name, action_group_name, action_group, response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -206,9 +206,9 @@ def get_async(resource_group_name, action_group_name, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -298,7 +298,7 @@ def delete_async(resource_group_name, action_group_name, custom_headers = nil) response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -371,7 +371,7 @@ def list_by_subscription_id_async(custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -458,7 +458,7 @@ def list_by_resource_group_async(resource_group_name, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -562,9 +562,9 @@ def enable_receiver_async(resource_group_name, action_group_name, enable_request http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 409 || status_code == 404 + unless status_code == 200 || status_code == 409 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/activity_log_alerts.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/activity_log_alerts.rb index b688694f74..60c0bd052c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/activity_log_alerts.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/activity_log_alerts.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rule_incidents.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rule_incidents.rb index 1c681d2935..75d1028a67 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rule_incidents.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rule_incidents.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb index c175559b08..1f34fbb98c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -396,7 +396,7 @@ def update_async(resource_group_name, rule_name, alert_rules_resource, custom_he http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end @@ -412,6 +412,16 @@ def update_async(resource_group_name, rule_name, alert_rules_resource, custom_he fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Monitor::Models::AlertRuleResource.mapper() + result.body = @client.deserialize(result_mapper, 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_monitor/lib/generated/azure_mgmt_monitor/autoscale_settings.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/autoscale_settings.rb index 4531e78892..416334302c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/autoscale_settings.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/autoscale_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb new file mode 100644 index 0000000000..39970f847a --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb @@ -0,0 +1,201 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Monitor + # + # Monitor Management Client + # + class DiagnosticSettingsCategoryOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DiagnosticSettingsCategoryOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [MonitorManagementClient] reference to the MonitorManagementClient + attr_reader :client + + # + # Gets the diagnostic settings category for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param name [String] The name of the diagnostic setting. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticSettingsCategoryResource] operation results. + # + def get(resource_uri, name, custom_headers = nil) + response = get_async(resource_uri, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the diagnostic settings category for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param name [String] The name of the diagnostic setting. + # @param custom_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_uri, name, custom_headers = nil) + get_async(resource_uri, name, custom_headers).value! + end + + # + # Gets the diagnostic settings category for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param name [String] The name of the diagnostic setting. + # @param [Hash{String => String}] 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_uri, name, custom_headers = nil) + fail ArgumentError, 'resource_uri is nil' if resource_uri.nil? + api_version = '2017-05-01-preview' + fail ArgumentError, 'name is nil' if name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceUri' => resource_uri,'name' => name}, + query_params: {'api-version' => 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::ARM::Monitor::Models::DiagnosticSettingsCategoryResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 diagnostic settings categories for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticSettingsCategoryResourceCollection] operation results. + # + def list(resource_uri, custom_headers = nil) + response = list_async(resource_uri, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the diagnostic settings categories for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_uri, custom_headers = nil) + list_async(resource_uri, custom_headers).value! + end + + # + # Lists the diagnostic settings categories for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_uri, custom_headers = nil) + fail ArgumentError, 'resource_uri is nil' if resource_uri.nil? + api_version = '2017-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceUri' => resource_uri}, + query_params: {'api-version' => 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::ARM::Monitor::Models::DiagnosticSettingsCategoryResourceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_monitor/lib/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/diagnostic_settings_operations.rb similarity index 58% rename from management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb rename to management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/diagnostic_settings_operations.rb index cf7b4d1787..74e9b85535 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/diagnostic_settings_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -7,11 +7,11 @@ module Azure::ARM::Monitor # # Monitor Management Client # - class ServiceDiagnosticSettingsOperations + class DiagnosticSettingsOperations include MsRestAzure # - # Creates and initializes a new instance of the ServiceDiagnosticSettingsOperations class. + # Creates and initializes a new instance of the DiagnosticSettingsOperations class. # @param client service class for accessing basic functionality. # def initialize(client) @@ -22,47 +22,48 @@ def initialize(client) attr_reader :client # - # Gets the active diagnostic settings for the specified resource. **WARNING**: - # This method will be deprecated in future releases. + # Gets the active diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. + # @param name [String] The name of the diagnostic setting. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServiceDiagnosticSettingsResource] operation results. + # @return [DiagnosticSettingsResource] operation results. # - def get(resource_uri, custom_headers = nil) - response = get_async(resource_uri, custom_headers).value! + def get(resource_uri, name, custom_headers = nil) + response = get_async(resource_uri, name, custom_headers).value! response.body unless response.nil? end # - # Gets the active diagnostic settings for the specified resource. **WARNING**: - # This method will be deprecated in future releases. + # Gets the active diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. + # @param name [String] The name of the diagnostic setting. # @param custom_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_uri, custom_headers = nil) - get_async(resource_uri, custom_headers).value! + def get_with_http_info(resource_uri, name, custom_headers = nil) + get_async(resource_uri, name, custom_headers).value! end # - # Gets the active diagnostic settings for the specified resource. **WARNING**: - # This method will be deprecated in future releases. + # Gets the active diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. + # @param name [String] The name of the diagnostic setting. # @param [Hash{String => String}] 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_uri, custom_headers = nil) + def get_async(resource_uri, name, custom_headers = nil) fail ArgumentError, 'resource_uri is nil' if resource_uri.nil? - api_version = '2016-09-01' + api_version = '2017-05-01-preview' + fail ArgumentError, 'name is nil' if name.nil? request_headers = {} @@ -70,13 +71,13 @@ def get_async(resource_uri, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/service' + path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceUri' => resource_uri}, + path_params: {'resourceUri' => resource_uri,'name' => name}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -97,7 +98,7 @@ def get_async(resource_uri, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Monitor::Models::ServiceDiagnosticSettingsResource.mapper() + result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -111,54 +112,55 @@ def get_async(resource_uri, custom_headers = nil) end # - # Create or update new diagnostic settings for the specified resource. - # **WARNING**: This method will be deprecated in future releases. + # Creates or updates diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. - # @param parameters [ServiceDiagnosticSettingsResource] Parameters supplied to - # the operation. + # @param parameters [DiagnosticSettingsResource] Parameters supplied to the + # operation. + # @param name [String] The name of the diagnostic setting. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServiceDiagnosticSettingsResource] operation results. + # @return [DiagnosticSettingsResource] operation results. # - def create_or_update(resource_uri, parameters, custom_headers = nil) - response = create_or_update_async(resource_uri, parameters, custom_headers).value! + def create_or_update(resource_uri, parameters, name, custom_headers = nil) + response = create_or_update_async(resource_uri, parameters, name, custom_headers).value! response.body unless response.nil? end # - # Create or update new diagnostic settings for the specified resource. - # **WARNING**: This method will be deprecated in future releases. + # Creates or updates diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. - # @param parameters [ServiceDiagnosticSettingsResource] Parameters supplied to - # the operation. + # @param parameters [DiagnosticSettingsResource] Parameters supplied to the + # operation. + # @param name [String] The name of the diagnostic setting. # @param custom_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_uri, parameters, custom_headers = nil) - create_or_update_async(resource_uri, parameters, custom_headers).value! + def create_or_update_with_http_info(resource_uri, parameters, name, custom_headers = nil) + create_or_update_async(resource_uri, parameters, name, custom_headers).value! end # - # Create or update new diagnostic settings for the specified resource. - # **WARNING**: This method will be deprecated in future releases. + # Creates or updates diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. - # @param parameters [ServiceDiagnosticSettingsResource] Parameters supplied to - # the operation. + # @param parameters [DiagnosticSettingsResource] Parameters supplied to the + # operation. + # @param name [String] The name of the diagnostic setting. # @param [Hash{String => String}] 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_uri, parameters, custom_headers = nil) + def create_or_update_async(resource_uri, parameters, name, custom_headers = nil) fail ArgumentError, 'resource_uri is nil' if resource_uri.nil? - api_version = '2016-09-01' + api_version = '2017-05-01-preview' fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'name is nil' if name.nil? request_headers = {} @@ -170,17 +172,17 @@ def create_or_update_async(resource_uri, parameters, custom_headers = nil) request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Monitor::Models::ServiceDiagnosticSettingsResource.mapper() + request_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResource.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/service' + path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceUri' => resource_uri}, + path_params: {'resourceUri' => resource_uri,'name' => name}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -194,7 +196,7 @@ def create_or_update_async(resource_uri, parameters, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -202,7 +204,7 @@ def create_or_update_async(resource_uri, parameters, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Monitor::Models::ServiceDiagnosticSettingsResource.mapper() + result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -216,60 +218,47 @@ def create_or_update_async(resource_uri, parameters, custom_headers = nil) end # - # Updates an existing ServiceDiagnosticSettingsResource. To update other fields - # use the CreateOrUpdate method. **WARNING**: This method will be deprecated in - # future releases. + # Deletes existing diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. - # @param service_diagnostic_settings_resource - # [ServiceDiagnosticSettingsResourcePatch] Parameters supplied to the - # operation. + # @param name [String] The name of the diagnostic setting. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServiceDiagnosticSettingsResource] operation results. # - def update(resource_uri, service_diagnostic_settings_resource, custom_headers = nil) - response = update_async(resource_uri, service_diagnostic_settings_resource, custom_headers).value! - response.body unless response.nil? + def delete(resource_uri, name, custom_headers = nil) + response = delete_async(resource_uri, name, custom_headers).value! + nil end # - # Updates an existing ServiceDiagnosticSettingsResource. To update other fields - # use the CreateOrUpdate method. **WARNING**: This method will be deprecated in - # future releases. + # Deletes existing diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. - # @param service_diagnostic_settings_resource - # [ServiceDiagnosticSettingsResourcePatch] Parameters supplied to the - # operation. + # @param name [String] The name of the diagnostic setting. # @param custom_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_uri, service_diagnostic_settings_resource, custom_headers = nil) - update_async(resource_uri, service_diagnostic_settings_resource, custom_headers).value! + def delete_with_http_info(resource_uri, name, custom_headers = nil) + delete_async(resource_uri, name, custom_headers).value! end # - # Updates an existing ServiceDiagnosticSettingsResource. To update other fields - # use the CreateOrUpdate method. **WARNING**: This method will be deprecated in - # future releases. + # Deletes existing diagnostic settings for the specified resource. # # @param resource_uri [String] The identifier of the resource. - # @param service_diagnostic_settings_resource - # [ServiceDiagnosticSettingsResourcePatch] Parameters supplied to the - # operation. + # @param name [String] The name of the diagnostic setting. # @param [Hash{String => String}] 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_uri, service_diagnostic_settings_resource, custom_headers = nil) + def delete_async(resource_uri, name, custom_headers = nil) fail ArgumentError, 'resource_uri is nil' if resource_uri.nil? - api_version = '2016-09-01' - fail ArgumentError, 'service_diagnostic_settings_resource is nil' if service_diagnostic_settings_resource.nil? + api_version = '2017-05-01-preview' + fail ArgumentError, 'name is nil' if name.nil? request_headers = {} @@ -277,15 +266,83 @@ def update_async(resource_uri, service_diagnostic_settings_resource, custom_head # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}' - request_headers['Content-Type'] = 'application/json; charset=utf-8' + request_url = @base_url || @client.base_url - # Serialize Request - request_mapper = Azure::ARM::Monitor::Models::ServiceDiagnosticSettingsResourcePatch.mapper() - request_content = @client.serialize(request_mapper, service_diagnostic_settings_resource) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceUri' => resource_uri,'name' => name}, + query_params: {'api-version' => 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 + + # + # Gets the active diagnostic settings list for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DiagnosticSettingsResourceCollection] operation results. + # + def list(resource_uri, custom_headers = nil) + response = list_async(resource_uri, custom_headers).value! + response.body unless response.nil? + end - path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/service' + # + # Gets the active diagnostic settings list for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_uri, custom_headers = nil) + list_async(resource_uri, custom_headers).value! + end + + # + # Gets the active diagnostic settings list for the specified resource. + # + # @param resource_uri [String] The identifier of the resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_uri, custom_headers = nil) + fail ArgumentError, 'resource_uri is nil' if resource_uri.nil? + api_version = '2017-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings' request_url = @base_url || @client.base_url @@ -293,11 +350,10 @@ def update_async(resource_uri, service_diagnostic_settings_resource, custom_head middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceUri' => resource_uri}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -313,7 +369,7 @@ def update_async(resource_uri, service_diagnostic_settings_resource, custom_head if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Monitor::Models::ServiceDiagnosticSettingsResource.mapper() + result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResourceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/log_profiles.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/log_profiles.rb index d2f79adfc5..15bb10b47f 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/log_profiles.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/log_profiles.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_list.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_list.rb index 68a6c82914..d09036fd8e 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_list.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,11 @@ class ActionGroupList include MsRestAzure - include MsRest::JSONable # @return [Array] The list of action groups. attr_accessor :value - # @return [String] Provides the link to retrive the next set of elements. + # @return [String] Provides the link to retrieve the next set of + # elements. attr_accessor :next_link diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_resource.rb index d5981e4f63..ac0c46a6c8 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_resource.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/action_group_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,17 +8,16 @@ module Models # # An action group resource. # - class ActionGroupResource < MsRestAzure::Resource + class ActionGroupResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The short name of the action group. This will be used # in SMS messages. attr_accessor :group_short_name # @return [Boolean] Indicates whether this action group is enabled. If an - # action group is not enabled, then none of its receviers will receive + # action group is not enabled, then none of its receivers will receive # communications. Default value: true . attr_accessor :enabled diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_group.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_group.rb index 15c84b54e3..8f196ef53c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_group.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ActivityLogAlertActionGroup include MsRestAzure - include MsRest::JSONable # @return [String] The resourceId of the action group. This cannot be # null or empty. attr_accessor :action_group_id diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_list.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_list.rb index 5f0bde34ff..b7b42ea75c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_list.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ActivityLogAlertActionList include MsRestAzure - include MsRest::JSONable # @return [Array] The list of activity log # alerts. attr_accessor :action_groups diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb index c6a0ab1185..4254b7fc82 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ActivityLogAlertAllOfCondition include MsRestAzure - include MsRest::JSONable # @return [Array] The list of activity log # alert conditions. attr_accessor :all_of diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_leaf_condition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_leaf_condition.rb index 3ab6a88395..03bbd657e1 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_leaf_condition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_leaf_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ActivityLogAlertLeafCondition include MsRestAzure - include MsRest::JSONable # @return [String] The name of the field that this condition will # examine. The possible values for this field are (case-insensitive): # 'resourceId', 'category', 'caller', 'level', 'operationName', diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_list.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_list.rb index 671bbfc1fb..fbe57ed1e8 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_list.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,12 +12,12 @@ class ActivityLogAlertList include MsRestAzure - include MsRest::JSONable # @return [Array] The list of activity log # alerts. attr_accessor :value - # @return [String] Provides the link to retrive the next set of elements. + # @return [String] Provides the link to retrieve the next set of + # elements. attr_accessor :next_link diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_patch_body.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_patch_body.rb index b9c4b0a4df..cde6565b85 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_patch_body.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_patch_body.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ActivityLogAlertPatchBody include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb index 281fb3e2c7..85b8c85fe5 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # An activity log alert resource. # - class ActivityLogAlertResource < MsRestAzure::Resource + class ActivityLogAlertResource < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] A list of resourceIds that will be used as # prefixes. The alert will only apply to activityLogs with resourceIds # that fall under one of these prefixes. This list must include at least @@ -24,7 +23,7 @@ class ActivityLogAlertResource < MsRestAzure::Resource # be activated. Default value: true . attr_accessor :enabled - # @return [ActivityLogAlertAllOfCondition] The conditon that will cause + # @return [ActivityLogAlertAllOfCondition] The condition that will cause # this alert to activate. attr_accessor :condition diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource.rb index 9b19b3337f..f679617b3f 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The alert rule resource. # - class AlertRuleResource < MsRestAzure::Resource + class AlertRuleResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] the name of the alert rule. attr_accessor :alert_rule_resource_name diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_collection.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_collection.rb index 10c2069674..1de14e1661 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_collection.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AlertRuleResourceCollection include MsRestAzure - include MsRest::JSONable # @return [Array] the values for the alert rule # resources. attr_accessor :value diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_patch.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_patch.rb index 7c7bda5646..5a2b085362 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_patch.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_patch.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AlertRuleResourcePatch include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_notification.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_notification.rb index 6fb3baff00..28dd1b3e7a 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_notification.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_notification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AutoscaleNotification include MsRestAzure - include MsRest::JSONable # @return [String] the operation associated with the notification and its # value must be "scale". Default value: 'Scale' . attr_accessor :operation diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_profile.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_profile.rb index 68ff85e122..a9a3b9147f 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_profile.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AutoscaleProfile include MsRestAzure - include MsRest::JSONable # @return [String] the name of the profile. attr_accessor :name diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb index a777ad9928..e93aa3fd9c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The autoscale setting resource. # - class AutoscaleSettingResource < MsRestAzure::Resource + class AutoscaleSettingResource < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] the collection of automatic scaling # profiles that specify different scaling parameters for different time # periods. A maximum of 20 profiles can be specified. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb index 7f352899ac..3c830eed70 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb index 2a1e8ba631..cd4053417f 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AutoscaleSettingResourcePatch include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/category_type.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/category_type.rb new file mode 100644 index 0000000000..9c04554d4c --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/category_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::ARM::Monitor + module Models + # + # Defines values for CategoryType + # + module CategoryType + Metrics = "Metrics" + Logs = "Logs" + end + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/comparison_operation_type.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/comparison_operation_type.rb index dda351c607..b013c6a06a 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/comparison_operation_type.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/comparison_operation_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/condition_operator.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/condition_operator.rb index 64ead4befc..c363895078 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/condition_operator.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/condition_operator.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource.rb new file mode 100644 index 0000000000..dccc6a2ed1 --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource.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::ARM::Monitor + module Models + # + # The diagnostic settings category resource. + # + class DiagnosticSettingsCategoryResource < ProxyOnlyResource + + include MsRestAzure + + # @return [CategoryType] The type of the diagnostic settings category. + # Possible values include: 'Metrics', 'Logs' + attr_accessor :category_type + + + # + # Mapper for DiagnosticSettingsCategoryResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiagnosticSettingsCategoryResource', + type: { + name: 'Composite', + class_name: 'DiagnosticSettingsCategoryResource', + 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' + } + }, + category_type: { + required: false, + serialized_name: 'properties.categoryType', + type: { + name: 'Enum', + module: 'CategoryType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource_collection.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource_collection.rb new file mode 100644 index 0000000000..5524827f3e --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource_collection.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::ARM::Monitor + module Models + # + # Represents a collection of diagnostic setting category resources. + # + class DiagnosticSettingsCategoryResourceCollection + + include MsRestAzure + + # @return [Array] The collection of + # diagnostic settings category resources. + attr_accessor :value + + + # + # Mapper for DiagnosticSettingsCategoryResourceCollection class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiagnosticSettingsCategoryResourceCollection', + type: { + name: 'Composite', + class_name: 'DiagnosticSettingsCategoryResourceCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiagnosticSettingsCategoryResourceElementType', + type: { + name: 'Composite', + class_name: 'DiagnosticSettingsCategoryResource' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_resource.rb similarity index 72% rename from management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource.rb rename to management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_resource.rb index 9ce3d063f0..deb21826ae 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_resource.rb @@ -1,31 +1,28 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Monitor module Models # - # Description of a service diagnostic setting + # The diagnostic setting resource. # - class ServiceDiagnosticSettingsResource < MsRestAzure::Resource + class DiagnosticSettingsResource < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] The resource ID of the storage account to which you # would like to send Diagnostic Logs. attr_accessor :storage_account_id - # @return [String] The service bus rule ID of the service bus namespace - # in which you would like to have Event Hubs created for streaming - # Diagnostic Logs. The rule ID is of the format: '{service bus resource - # ID}/authorizationrules/{key name}'. - attr_accessor :service_bus_rule_id - # @return [String] The resource Id for the event hub authorization rule. attr_accessor :event_hub_authorization_rule_id + # @return [String] The name of the event hub. If none is specified, the + # default event hub will be selected. + attr_accessor :event_hub_name + # @return [Array] the list of metric settings. attr_accessor :metrics @@ -40,16 +37,16 @@ class ServiceDiagnosticSettingsResource < MsRestAzure::Resource # - # Mapper for ServiceDiagnosticSettingsResource class as Ruby Hash. + # Mapper for DiagnosticSettingsResource class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'ServiceDiagnosticSettingsResource', + serialized_name: 'DiagnosticSettingsResource', type: { name: 'Composite', - class_name: 'ServiceDiagnosticSettingsResource', + class_name: 'DiagnosticSettingsResource', model_properties: { id: { required: false, @@ -75,27 +72,6 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, storage_account_id: { required: false, serialized_name: 'properties.storageAccountId', @@ -103,16 +79,16 @@ def self.mapper() name: 'String' } }, - service_bus_rule_id: { + event_hub_authorization_rule_id: { required: false, - serialized_name: 'properties.serviceBusRuleId', + serialized_name: 'properties.eventHubAuthorizationRuleId', type: { name: 'String' } }, - event_hub_authorization_rule_id: { + event_hub_name: { required: false, - serialized_name: 'properties.eventHubAuthorizationRuleId', + serialized_name: 'properties.eventHubName', type: { name: 'String' } diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_resource_collection.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_resource_collection.rb new file mode 100644 index 0000000000..8ef307634c --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_resource_collection.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Monitor + module Models + # + # Represents a collection of alert rule resources. + # + class DiagnosticSettingsResourceCollection + + include MsRestAzure + + # @return [Array] The collection of + # diagnostic settings resources;. + attr_accessor :value + + + # + # Mapper for DiagnosticSettingsResourceCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiagnosticSettingsResourceCollection', + type: { + name: 'Composite', + class_name: 'DiagnosticSettingsResourceCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiagnosticSettingsResourceElementType', + type: { + name: 'Composite', + class_name: 'DiagnosticSettingsResource' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_notification.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_notification.rb index 7d830e23c2..264bd06362 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_notification.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_notification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EmailNotification include MsRestAzure - include MsRest::JSONable # @return [Boolean] a value indicating whether to send email to # subscription administrator. attr_accessor :send_to_subscription_administrator diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb index 6abccbea6a..9a508d140b 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EmailReceiver include MsRestAzure - include MsRest::JSONable # @return [String] The name of the email receiver. Names must be unique # across all receivers within an action group. attr_accessor :name @@ -20,8 +19,8 @@ class EmailReceiver # @return [String] The email address of this receiver. attr_accessor :email_address - # @return [ReceiverStatus] Possible values include: 'NotSpecified', - # 'Enabled', 'Disabled' + # @return [ReceiverStatus] The receiver status of the e-mail. Possible + # values include: 'NotSpecified', 'Enabled', 'Disabled' attr_accessor :status diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/enable_request.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/enable_request.rb index 84b9420560..57fadd421c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/enable_request.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/enable_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EnableRequest include MsRestAzure - include MsRest::JSONable # @return [String] The name of the receiver to resubscribe. attr_accessor :receiver_name diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/error_response.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/error_response.rb index 4e16c4ffe7..4d8ea21096 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/error_response.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/error_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ErrorResponse include MsRestAzure - include MsRest::JSONable # @return [String] Error code attr_accessor :code diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident.rb index cbe7a84621..d972213c54 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Incident include MsRestAzure - include MsRest::JSONable # @return [String] Incident name. attr_accessor :name diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident_list_result.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident_list_result.rb index 414a7503db..229a9e98e0 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident_list_result.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/incident_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IncidentListResult include MsRestAzure - include MsRest::JSONable # @return [Array] the incident collection. attr_accessor :value diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/location_threshold_rule_condition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/location_threshold_rule_condition.rb index a4a03eabd0..88a3d8014f 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/location_threshold_rule_condition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/location_threshold_rule_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LocationThresholdRuleCondition < RuleCondition include MsRestAzure - include MsRest::JSONable def initialize @odata.type = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_collection.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_collection.rb index 65086c153e..c744b06a4e 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_collection.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LogProfileCollection include MsRestAzure - include MsRest::JSONable # @return [Array] the values of the log profiles. attr_accessor :value diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource.rb index 137306dd09..9f5102b7b2 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The log profile resource. # - class LogProfileResource < MsRestAzure::Resource + class LogProfileResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] the resource id of the storage account to which you # would like to send the Activity Log. attr_accessor :storage_account_id diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource_patch.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource_patch.rb index 1f84715620..5ff3655f9c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource_patch.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_profile_resource_patch.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LogProfileResourcePatch include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_settings.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_settings.rb index d8bec0c4ab..5772be5d9a 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_settings.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/log_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class LogSettings include MsRestAzure - include MsRest::JSONable # @return [String] Name of a Diagnostic Log category for a resource type # this setting is applied to. To obtain the list of Diagnostic Log # categories for a resource, first perform a GET diagnostic settings diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb index 51fa87f606..400de1a7ca 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ManagementEventAggregationCondition include MsRestAzure - include MsRest::JSONable # @return [ConditionOperator] the condition operator. Possible values # include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', # 'LessThanOrEqual' diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_rule_condition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_rule_condition.rb index 1fcbb94ba8..073d869663 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_rule_condition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/management_event_rule_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ManagementEventRuleCondition < RuleCondition include MsRestAzure - include MsRest::JSONable def initialize @odata.type = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_settings.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_settings.rb index a77b6728db..9ddc7ad79a 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_settings.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,14 +13,19 @@ class MetricSettings include MsRestAzure - include MsRest::JSONable # @return [Duration] the timegrain of the metric in ISO8601 format. attr_accessor :time_grain - # @return [Boolean] a value indicating whether this timegrain is enabled. + # @return [String] Name of a Diagnostic Metric category for a resource + # type this setting is applied to. To obtain the list of Diagnostic + # metric categories for a resource, first perform a GET diagnostic + # settings operation. + attr_accessor :category + + # @return [Boolean] a value indicating whether this category is enabled. attr_accessor :enabled - # @return [RetentionPolicy] the retention policy for this timegrain. + # @return [RetentionPolicy] the retention policy for this category. attr_accessor :retention_policy @@ -37,12 +42,19 @@ def self.mapper() class_name: 'MetricSettings', model_properties: { time_grain: { - required: true, + required: false, serialized_name: 'timeGrain', type: { name: 'TimeSpan' } }, + category: { + required: false, + serialized_name: 'category', + type: { + name: 'String' + } + }, enabled: { required: true, serialized_name: 'enabled', diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_statistic_type.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_statistic_type.rb index a787abe721..8c406c5593 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_statistic_type.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_statistic_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_trigger.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_trigger.rb index 353b6a7335..fd242a0f0f 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_trigger.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/metric_trigger.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricTrigger include MsRestAzure - include MsRest::JSONable # @return [String] the name of the metric that defines what the rule # monitors. attr_accessor :metric_name diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation.rb new file mode 100644 index 0000000000..04a8bdca91 --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation.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::ARM::Monitor + module Models + # + # Microsoft Insights API operation definition. + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation} + attr_accessor :name + + # @return [OperationDisplay] Display metadata associated with the + # operation. + attr_accessor :display + + + # + # 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' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation_display.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation_display.rb new file mode 100644 index 0000000000..73667523be --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation_display.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::ARM::Monitor + module Models + # + # Display metadata associated with the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.Insights + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: + # AlertRules, Autoscale, etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation_list_result.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation_list_result.rb new file mode 100644 index 0000000000..68ee87f1a3 --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/operation_list_result.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::ARM::Monitor + module Models + # + # Result of the request to list Microsoft.Insights operations. It contains + # a list of operations and a URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + # @return [Array] List of operations supported by the + # Microsoft.Insights provider. + attr_accessor :value + + # @return [String] URL to get the next set of operation list results if + # there are any. + attr_accessor :next_link + + + # + # 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_monitor/lib/generated/azure_mgmt_monitor/models/proxy_only_resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/proxy_only_resource.rb new file mode 100644 index 0000000000..1e377dde78 --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/proxy_only_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::ARM::Monitor + module Models + # + # A proxy only azure resource object + # + class ProxyOnlyResource + + include MsRestAzure + + # @return [String] Azure resource Id + attr_accessor :id + + # @return [String] Azure resource name + attr_accessor :name + + # @return [String] Azure resource type + attr_accessor :type + + + # + # Mapper for ProxyOnlyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProxyOnlyResource', + type: { + name: 'Composite', + class_name: 'ProxyOnlyResource', + 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_monitor/lib/generated/azure_mgmt_monitor/models/receiver_status.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/receiver_status.rb index e1eaa9ed3c..b8339eb306 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/receiver_status.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/receiver_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence.rb index bde3531557..80a898557a 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Recurrence include MsRestAzure - include MsRest::JSONable # @return [RecurrenceFrequency] the recurrence frequency. How often the # schedule profile should take effect. This value must be Week, meaning # each week will have the same set of profiles. Possible values include: diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence_frequency.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence_frequency.rb index 5b05055c46..69fe9249d1 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence_frequency.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrence_frequency.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrent_schedule.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrent_schedule.rb index df7065d65d..e36db5b097 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrent_schedule.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/recurrent_schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecurrentSchedule include MsRestAzure - include MsRest::JSONable # @return [String] the timezone for the hours of the profile. Some # examples of valid timezones are: Dateline Standard Time, UTC-11, # Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/resource.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/resource.rb new file mode 100644 index 0000000000..37df43b71d --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/resource.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::ARM::Monitor + module Models + # + # An azure resource object + # + class Resource + + include MsRestAzure + + # @return [String] Azure resource Id + attr_accessor :id + + # @return [String] Azure resource name + attr_accessor :name + + # @return [String] Azure resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/retention_policy.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/retention_policy.rb index c7d3bfa467..c13d440b11 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/retention_policy.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/retention_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RetentionPolicy include MsRestAzure - include MsRest::JSONable # @return [Boolean] a value indicating whether the retention policy is # enabled. attr_accessor :enabled diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_action.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_action.rb index ef2f50272f..83d1f86b20 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_action.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RuleAction include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.Azure.Management.Insights.Models.RuleEmailAction"] = "RuleEmailAction" @@discriminatorMap["Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"] = "RuleWebhookAction" diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_condition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_condition.rb index a4f1d9c43d..d506aa0366 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_condition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RuleCondition include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"] = "ThresholdRuleCondition" @@discriminatorMap["Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"] = "LocationThresholdRuleCondition" diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_data_source.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_data_source.rb index a0a414e3ca..42086d56c2 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_data_source.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RuleDataSource include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"] = "RuleMetricDataSource" @@discriminatorMap["Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"] = "RuleManagementEventDataSource" @@ -24,7 +23,8 @@ def initialize attr_accessor :odata.type # @return [String] the resource identifier of the resource the rule - # monitors. + # monitors. **NOTE**: this property cannot be updated for an existing + # rule. attr_accessor :resource_uri diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_email_action.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_email_action.rb index 20afaa7d91..1110f70d84 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_email_action.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_email_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RuleEmailAction < RuleAction include MsRestAzure - include MsRest::JSONable def initialize @odata.type = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" @@ -22,12 +21,12 @@ def initialize attr_accessor :odata.type # @return [Boolean] Whether the administrators (service and - # co-adiminstrators) of the service should be notified when the alert is + # co-administrators) of the service should be notified when the alert is # activated. attr_accessor :send_to_service_owners # @return [Array] the list of administrator's custom email - # addresses notifiy of the activation of the alert. + # addresses to notify of the activation of the alert. attr_accessor :custom_emails diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb index dbe23184a1..449e3399d3 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RuleManagementEventClaimsDataSource include MsRestAzure - include MsRest::JSONable # @return [String] the email address. attr_accessor :email_address diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_data_source.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_data_source.rb index 9454b567ac..33774e48d2 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_data_source.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_management_event_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RuleManagementEventDataSource < RuleDataSource include MsRestAzure - include MsRest::JSONable def initialize @odata.type = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_metric_data_source.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_metric_data_source.rb index ee65b39d21..0c67e9dd59 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_metric_data_source.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_metric_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RuleMetricDataSource < RuleDataSource include MsRestAzure - include MsRest::JSONable def initialize @odata.type = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_webhook_action.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_webhook_action.rb index 45ca2b1c6b..57fd244e31 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_webhook_action.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/rule_webhook_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RuleWebhookAction < RuleAction include MsRestAzure - include MsRest::JSONable def initialize @odata.type = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" @@ -21,7 +20,7 @@ def initialize attr_accessor :odata.type - # @return [String] the service uri to Post the notitication when the + # @return [String] the service uri to Post the notification when the # alert activates or resolves. attr_accessor :service_uri diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_action.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_action.rb index 5e3cc10c01..82d84cdf08 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_action.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ScaleAction include MsRestAzure - include MsRest::JSONable # @return [ScaleDirection] the scale direction. Whether the scaling # action increases or decreases the number of instances. Possible values # include: 'None', 'Increase', 'Decrease' diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_capacity.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_capacity.rb index 85f46fcf2f..6ecb61c6a8 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_capacity.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_capacity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ScaleCapacity include MsRestAzure - include MsRest::JSONable # @return [String] the minimum number of instances for the resource. attr_accessor :minimum diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_direction.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_direction.rb index 30833bb2cb..11fc9108f1 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_direction.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_direction.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_rule.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_rule.rb index 74eaac70fc..fdc2bce0e7 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_rule.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ScaleRule include MsRestAzure - include MsRest::JSONable # @return [MetricTrigger] the trigger that results in a scaling action. attr_accessor :metric_trigger diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_type.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_type.rb index 5d0d3986bd..3c9704ec99 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_type.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/scale_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource_patch.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource_patch.rb deleted file mode 100644 index 5691c3f45b..0000000000 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource_patch.rb +++ /dev/null @@ -1,135 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::Monitor - module Models - # - # Service diagnostic setting resource for patch operations - # - class ServiceDiagnosticSettingsResourcePatch - - include MsRestAzure - - include MsRest::JSONable - # @return [Hash{String => String}] Resource tags - attr_accessor :tags - - # @return [String] The resource ID of the storage account to which you - # would like to send Diagnostic Logs. - attr_accessor :storage_account_id - - # @return [String] The service bus rule ID of the service bus namespace - # in which you would like to have Event Hubs created for streaming - # Diagnostic Logs. The rule ID is of the format: '{service bus resource - # ID}/authorizationrules/{key name}'. - attr_accessor :service_bus_rule_id - - # @return [String] The resource Id for the event hub authorization rule. - attr_accessor :event_hub_authorization_rule_id - - # @return [Array] the list of metric settings. - attr_accessor :metrics - - # @return [Array] the list of logs settings. - attr_accessor :logs - - # @return [String] The workspace ID (resource ID of a Log Analytics - # workspace) for a Log Analytics workspace to which you would like to - # send Diagnostic Logs. Example: - # /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 - attr_accessor :workspace_id - - - # - # Mapper for ServiceDiagnosticSettingsResourcePatch class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'ServiceDiagnosticSettingsResourcePatch', - type: { - name: 'Composite', - class_name: 'ServiceDiagnosticSettingsResourcePatch', - model_properties: { - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - storage_account_id: { - required: false, - serialized_name: 'properties.storageAccountId', - type: { - name: 'String' - } - }, - service_bus_rule_id: { - required: false, - serialized_name: 'properties.serviceBusRuleId', - type: { - name: 'String' - } - }, - event_hub_authorization_rule_id: { - required: false, - serialized_name: 'properties.eventHubAuthorizationRuleId', - type: { - name: 'String' - } - }, - metrics: { - required: false, - serialized_name: 'properties.metrics', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'MetricSettingsElementType', - type: { - name: 'Composite', - class_name: 'MetricSettings' - } - } - } - }, - logs: { - required: false, - serialized_name: 'properties.logs', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'LogSettingsElementType', - type: { - name: 'Composite', - class_name: 'LogSettings' - } - } - } - }, - workspace_id: { - required: false, - serialized_name: 'properties.workspaceId', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb index 879dcd5e2e..a606a078d9 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SmsReceiver include MsRestAzure - include MsRest::JSONable # @return [String] The name of the SMS receiver. Names must be unique # across all receivers within an action group. attr_accessor :name @@ -23,8 +22,8 @@ class SmsReceiver # @return [String] The phone number of the SMS receiver. attr_accessor :phone_number - # @return [ReceiverStatus] Possible values include: 'NotSpecified', - # 'Enabled', 'Disabled' + # @return [ReceiverStatus] The status of the receiver. Possible values + # include: 'NotSpecified', 'Enabled', 'Disabled' attr_accessor :status diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/threshold_rule_condition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/threshold_rule_condition.rb index 6271913336..666c53a036 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/threshold_rule_condition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/threshold_rule_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ThresholdRuleCondition < RuleCondition include MsRestAzure - include MsRest::JSONable def initialize @odata.type = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_operator.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_operator.rb index af09cd570a..b61836eae8 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_operator.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_operator.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_type.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_type.rb index c846895a70..006abb67c6 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_type.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_aggregation_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_window.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_window.rb index 73e39def75..ea1bbd7967 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_window.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/time_window.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TimeWindow include MsRestAzure - include MsRest::JSONable # @return [String] the timezone of the start and end times for the # profile. Some examples of valid timezones are: Dateline Standard Time, # UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_notification.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_notification.rb index 4bfbd07886..97cfa7f085 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_notification.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_notification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WebhookNotification include MsRestAzure - include MsRest::JSONable # @return [String] the service address to receive the notification. attr_accessor :service_uri diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_receiver.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_receiver.rb index 446edf8a38..93e7490b8c 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_receiver.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/webhook_receiver.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WebhookReceiver include MsRestAzure - include MsRest::JSONable # @return [String] The name of the webhook receiver. Names must be unique # across all receivers within an action group. attr_accessor :name diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/module_definition.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/module_definition.rb index f86df42d1d..a258f6bbb4 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/module_definition.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/monitor_management_client.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/monitor_management_client.rb index 411a2fe955..879ab97666 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/monitor_management_client.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/monitor_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -34,6 +34,9 @@ class MonitorManagementClient < MsRestAzure::AzureServiceClient # @return [AutoscaleSettings] autoscale_settings attr_reader :autoscale_settings + # @return [Operations] operations + attr_reader :operations + # @return [AlertRuleIncidents] alert_rule_incidents attr_reader :alert_rule_incidents @@ -43,9 +46,12 @@ class MonitorManagementClient < MsRestAzure::AzureServiceClient # @return [LogProfiles] log_profiles attr_reader :log_profiles - # @return [ServiceDiagnosticSettingsOperations] - # service_diagnostic_settings_operations - attr_reader :service_diagnostic_settings_operations + # @return [DiagnosticSettingsOperations] diagnostic_settings_operations + attr_reader :diagnostic_settings_operations + + # @return [DiagnosticSettingsCategoryOperations] + # diagnostic_settings_category_operations + attr_reader :diagnostic_settings_category_operations # @return [ActionGroups] action_groups attr_reader :action_groups @@ -67,10 +73,12 @@ def initialize(credentials = nil, base_url = nil, options = nil) @credentials = credentials @autoscale_settings = AutoscaleSettings.new(self) + @operations = Operations.new(self) @alert_rule_incidents = AlertRuleIncidents.new(self) @alert_rules = AlertRules.new(self) @log_profiles = LogProfiles.new(self) - @service_diagnostic_settings_operations = ServiceDiagnosticSettingsOperations.new(self) + @diagnostic_settings_operations = DiagnosticSettingsOperations.new(self) + @diagnostic_settings_category_operations = DiagnosticSettingsCategoryOperations.new(self) @action_groups = ActionGroups.new(self) @activity_log_alerts = ActivityLogAlerts.new(self) @accept_language = 'en-US' diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/operations.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/operations.rb new file mode 100644 index 0000000000..a11ff4d566 --- /dev/null +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/operations.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::ARM::Monitor + # + # Monitor Management Client + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [MonitorManagementClient] reference to the MonitorManagementClient + attr_reader :client + + # + # Lists all of the available operations from Microsoft.Insights provider. + # + # @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(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all of the available operations from Microsoft.Insights 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 operations from Microsoft.Insights 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) + api_version = '2015-04-01' + + + request_headers = {} + + # Set 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.insights/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Monitor::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 + + end +end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/version.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/version.rb index 5cadb10811..b169804539 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/version.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Monitor - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_network/azure_mgmt_network.gemspec b/management/azure_mgmt_network/azure_mgmt_network.gemspec index 59b542f7a5..824466917a 100644 --- a/management/azure_mgmt_network/azure_mgmt_network.gemspec +++ b/management/azure_mgmt_network/azure_mgmt_network.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb index 4ced59f048..baef3c87de 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,17 +21,27 @@ module Azure::ARM::Network autoload :ApplicationGateways, 'generated/azure_mgmt_network/application_gateways.rb' + autoload :ApplicationSecurityGroups, 'generated/azure_mgmt_network/application_security_groups.rb' + autoload :AvailableEndpointServices, 'generated/azure_mgmt_network/available_endpoint_services.rb' autoload :ExpressRouteCircuitAuthorizations, 'generated/azure_mgmt_network/express_route_circuit_authorizations.rb' autoload :ExpressRouteCircuitPeerings, 'generated/azure_mgmt_network/express_route_circuit_peerings.rb' autoload :ExpressRouteCircuits, 'generated/azure_mgmt_network/express_route_circuits.rb' autoload :ExpressRouteServiceProviders, 'generated/azure_mgmt_network/express_route_service_providers.rb' autoload :LoadBalancers, 'generated/azure_mgmt_network/load_balancers.rb' + autoload :LoadBalancerBackendAddressPools, 'generated/azure_mgmt_network/load_balancer_backend_address_pools.rb' + autoload :LoadBalancerFrontendIPConfigurations, 'generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb' + autoload :InboundNatRules, 'generated/azure_mgmt_network/inbound_nat_rules.rb' + autoload :LoadBalancerLoadBalancingRules, 'generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb' + autoload :LoadBalancerNetworkInterfaces, 'generated/azure_mgmt_network/load_balancer_network_interfaces.rb' + autoload :LoadBalancerProbes, 'generated/azure_mgmt_network/load_balancer_probes.rb' autoload :NetworkInterfaces, 'generated/azure_mgmt_network/network_interfaces.rb' + autoload :NetworkInterfaceIPConfigurations, 'generated/azure_mgmt_network/network_interface_ipconfigurations.rb' + autoload :NetworkInterfaceLoadBalancers, 'generated/azure_mgmt_network/network_interface_load_balancers.rb' autoload :NetworkSecurityGroups, 'generated/azure_mgmt_network/network_security_groups.rb' autoload :SecurityRules, 'generated/azure_mgmt_network/security_rules.rb' + autoload :DefaultSecurityRules, 'generated/azure_mgmt_network/default_security_rules.rb' autoload :NetworkWatchers, 'generated/azure_mgmt_network/network_watchers.rb' autoload :PacketCaptures, 'generated/azure_mgmt_network/packet_captures.rb' - autoload :AvailablePrivateAccessServices, 'generated/azure_mgmt_network/available_private_access_services.rb' autoload :PublicIPAddresses, 'generated/azure_mgmt_network/public_ipaddresses.rb' autoload :RouteFilters, 'generated/azure_mgmt_network/route_filters.rb' autoload :RouteFilterRules, 'generated/azure_mgmt_network/route_filter_rules.rb' @@ -48,128 +58,154 @@ module Azure::ARM::Network autoload :NetworkManagementClient, 'generated/azure_mgmt_network/network_management_client.rb' module Models + autoload :EffectiveNetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb' autoload :EffectiveRoute, 'generated/azure_mgmt_network/models/effective_route.rb' - autoload :EffectiveRouteListResult, 'generated/azure_mgmt_network/models/effective_route_list_result.rb' - autoload :ExpressRouteCircuitArpTable, 'generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb' - autoload :ExpressRouteCircuitsArpTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb' - autoload :LocalNetworkGatewayListResult, 'generated/azure_mgmt_network/models/local_network_gateway_list_result.rb' - autoload :ExpressRouteCircuitRoutesTable, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb' - autoload :ConnectionResetSharedKey, 'generated/azure_mgmt_network/models/connection_reset_shared_key.rb' - autoload :ExpressRouteCircuitsRoutesTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb' - autoload :PrivateAccessServicePropertiesFormat, 'generated/azure_mgmt_network/models/private_access_service_properties_format.rb' - autoload :ExpressRouteCircuitRoutesTableSummary, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb' - autoload :IpsecPolicy, 'generated/azure_mgmt_network/models/ipsec_policy.rb' autoload :ExpressRouteCircuitsRoutesTableSummaryListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb' - autoload :GatewayRouteListResult, 'generated/azure_mgmt_network/models/gateway_route_list_result.rb' autoload :ExpressRouteCircuitListResult, 'generated/azure_mgmt_network/models/express_route_circuit_list_result.rb' - autoload :VirtualNetworkGatewayListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb' + autoload :VpnDeviceScriptParameters, 'generated/azure_mgmt_network/models/vpn_device_script_parameters.rb' autoload :ExpressRouteServiceProviderBandwidthsOffered, 'generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb' - autoload :VpnClientParameters, 'generated/azure_mgmt_network/models/vpn_client_parameters.rb' + autoload :NetworkInterfaceDnsSettings, 'generated/azure_mgmt_network/models/network_interface_dns_settings.rb' autoload :RouteFilterRuleListResult, 'generated/azure_mgmt_network/models/route_filter_rule_list_result.rb' - autoload :GatewayRoute, 'generated/azure_mgmt_network/models/gateway_route.rb' + autoload :LocalNetworkGatewayListResult, 'generated/azure_mgmt_network/models/local_network_gateway_list_result.rb' autoload :ExpressRouteServiceProviderListResult, 'generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb' - autoload :ApplicationGatewayBackendHealthHttpSettings, 'generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb' + autoload :ConnectionResetSharedKey, 'generated/azure_mgmt_network/models/connection_reset_shared_key.rb' + autoload :LoadBalancerSku, 'generated/azure_mgmt_network/models/load_balancer_sku.rb' + autoload :PublicIPAddressSku, 'generated/azure_mgmt_network/models/public_ipaddress_sku.rb' autoload :RouteFilterListResult, 'generated/azure_mgmt_network/models/route_filter_list_result.rb' - autoload :ApplicationGatewayBackendHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health.rb' + autoload :VirtualNetworkGatewayConnectionListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb' autoload :PublicIPAddressListResult, 'generated/azure_mgmt_network/models/public_ipaddress_list_result.rb' + autoload :TunnelConnectionHealth, 'generated/azure_mgmt_network/models/tunnel_connection_health.rb' + autoload :AvailableProvidersList, 'generated/azure_mgmt_network/models/available_providers_list.rb' + autoload :BgpPeerStatusListResult, 'generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb' + autoload :AvailableProvidersListCountry, 'generated/azure_mgmt_network/models/available_providers_list_country.rb' + autoload :VirtualNetworkGatewayListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb' + autoload :AvailableProvidersListState, 'generated/azure_mgmt_network/models/available_providers_list_state.rb' + autoload :VpnClientParameters, 'generated/azure_mgmt_network/models/vpn_client_parameters.rb' + autoload :AvailableProvidersListCity, 'generated/azure_mgmt_network/models/available_providers_list_city.rb' + autoload :ApplicationGatewayBackendHealthHttpSettings, 'generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb' + autoload :LoadBalancerListResult, 'generated/azure_mgmt_network/models/load_balancer_list_result.rb' + autoload :ApplicationGatewayBackendHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health.rb' + autoload :InboundNatRuleListResult, 'generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb' autoload :ApplicationGatewaySslPolicy, 'generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb' - autoload :PrivateAccessServicesListResult, 'generated/azure_mgmt_network/models/private_access_services_list_result.rb' - autoload :BgpSettings, 'generated/azure_mgmt_network/models/bgp_settings.rb' - autoload :ConnectivityInformation, 'generated/azure_mgmt_network/models/connectivity_information.rb' - autoload :VirtualNetworkGatewaySku, 'generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb' - autoload :ConnectivityHop, 'generated/azure_mgmt_network/models/connectivity_hop.rb' - autoload :VirtualNetworkUsage, 'generated/azure_mgmt_network/models/virtual_network_usage.rb' - autoload :ConnectivityIssue, 'generated/azure_mgmt_network/models/connectivity_issue.rb' + autoload :LoadBalancerBackendAddressPoolListResult, 'generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb' + autoload :BgpPeerStatus, 'generated/azure_mgmt_network/models/bgp_peer_status.rb' + autoload :LoadBalancerFrontendIPConfigurationListResult, 'generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb' + autoload :VpnClientConfiguration, 'generated/azure_mgmt_network/models/vpn_client_configuration.rb' + autoload :LoadBalancerLoadBalancingRuleListResult, 'generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb' + autoload :VirtualNetworkListUsageResult, 'generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb' + autoload :LoadBalancerProbeListResult, 'generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb' autoload :ApplicationGatewayProbeHealthResponseMatch, 'generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb' - autoload :LoadBalancerListResult, 'generated/azure_mgmt_network/models/load_balancer_list_result.rb' - autoload :VirtualNetworkListResult, 'generated/azure_mgmt_network/models/virtual_network_list_result.rb' + autoload :NetworkInterfaceListResult, 'generated/azure_mgmt_network/models/network_interface_list_result.rb' + autoload :IPAddressAvailabilityResult, 'generated/azure_mgmt_network/models/ipaddress_availability_result.rb' autoload :ErrorDetails, 'generated/azure_mgmt_network/models/error_details.rb' - autoload :AddressSpace, 'generated/azure_mgmt_network/models/address_space.rb' + autoload :DhcpOptions, 'generated/azure_mgmt_network/models/dhcp_options.rb' autoload :Error, 'generated/azure_mgmt_network/models/error.rb' autoload :ApplicationGatewayWebApplicationFirewallConfiguration, 'generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb' autoload :AzureAsyncOperationResult, 'generated/azure_mgmt_network/models/azure_async_operation_result.rb' autoload :ApplicationGatewayListResult, 'generated/azure_mgmt_network/models/application_gateway_list_result.rb' - autoload :NetworkInterfaceListResult, 'generated/azure_mgmt_network/models/network_interface_list_result.rb' + autoload :NetworkInterfaceIPConfigurationListResult, 'generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb' autoload :ApplicationGatewayFirewallRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb' - autoload :EffectiveNetworkSecurityGroupAssociation, 'generated/azure_mgmt_network/models/effective_network_security_group_association.rb' + autoload :NetworkInterfaceLoadBalancerListResult, 'generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb' autoload :ApplicationGatewayAvailableWafRuleSetsResult, 'generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb' + autoload :EffectiveNetworkSecurityGroupAssociation, 'generated/azure_mgmt_network/models/effective_network_security_group_association.rb' + autoload :UsagesListResult, 'generated/azure_mgmt_network/models/usages_list_result.rb' autoload :EffectiveNetworkSecurityRule, 'generated/azure_mgmt_network/models/effective_network_security_rule.rb' - autoload :Usage, 'generated/azure_mgmt_network/models/usage.rb' + autoload :Resource, 'generated/azure_mgmt_network/models/resource.rb' autoload :EffectiveNetworkSecurityGroup, 'generated/azure_mgmt_network/models/effective_network_security_group.rb' - autoload :EffectiveNetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb' - autoload :UsageName, 'generated/azure_mgmt_network/models/usage_name.rb' + autoload :DnsNameAvailabilityResult, 'generated/azure_mgmt_network/models/dns_name_availability_result.rb' + autoload :SubResource, 'generated/azure_mgmt_network/models/sub_resource.rb' + autoload :EndpointServicesListResult, 'generated/azure_mgmt_network/models/endpoint_services_list_result.rb' + autoload :AvailableProvidersListParameters, 'generated/azure_mgmt_network/models/available_providers_list_parameters.rb' autoload :AuthorizationListResult, 'generated/azure_mgmt_network/models/authorization_list_result.rb' - autoload :ConnectivitySource, 'generated/azure_mgmt_network/models/connectivity_source.rb' + autoload :EffectiveRouteListResult, 'generated/azure_mgmt_network/models/effective_route_list_result.rb' autoload :BgpServiceCommunityListResult, 'generated/azure_mgmt_network/models/bgp_service_community_list_result.rb' - autoload :ConnectivityParameters, 'generated/azure_mgmt_network/models/connectivity_parameters.rb' - autoload :BGPCommunity, 'generated/azure_mgmt_network/models/bgpcommunity.rb' autoload :SecurityRuleListResult, 'generated/azure_mgmt_network/models/security_rule_list_result.rb' - autoload :Ipv6ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb' + autoload :BGPCommunity, 'generated/azure_mgmt_network/models/bgpcommunity.rb' autoload :NetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/network_security_group_list_result.rb' + autoload :Ipv6ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb' + autoload :AzureReachabilityReport, 'generated/azure_mgmt_network/models/azure_reachability_report.rb' autoload :ExpressRouteCircuitSku, 'generated/azure_mgmt_network/models/express_route_circuit_sku.rb' - autoload :ConnectivityDestination, 'generated/azure_mgmt_network/models/connectivity_destination.rb' - autoload :RouteTableListResult, 'generated/azure_mgmt_network/models/route_table_list_result.rb' autoload :NetworkWatcherListResult, 'generated/azure_mgmt_network/models/network_watcher_list_result.rb' - autoload :ConnectionSharedKey, 'generated/azure_mgmt_network/models/connection_shared_key.rb' + autoload :RouteTableListResult, 'generated/azure_mgmt_network/models/route_table_list_result.rb' autoload :TopologyParameters, 'generated/azure_mgmt_network/models/topology_parameters.rb' - autoload :PublicIPAddressDnsSettings, 'generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb' + autoload :ExpressRouteCircuitsArpTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb' autoload :TopologyAssociation, 'generated/azure_mgmt_network/models/topology_association.rb' - autoload :BgpPeerStatusListResult, 'generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb' + autoload :ExpressRouteCircuitsRoutesTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb' autoload :TopologyResource, 'generated/azure_mgmt_network/models/topology_resource.rb' - autoload :ApplicationGatewayConnectionDraining, 'generated/azure_mgmt_network/models/application_gateway_connection_draining.rb' autoload :Topology, 'generated/azure_mgmt_network/models/topology.rb' - autoload :ApplicationGatewayBackendHealthPool, 'generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb' + autoload :VirtualNetworkConnectionGatewayReference, 'generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb' autoload :VerificationIPFlowParameters, 'generated/azure_mgmt_network/models/verification_ipflow_parameters.rb' - autoload :BgpPeerStatus, 'generated/azure_mgmt_network/models/bgp_peer_status.rb' + autoload :ServiceEndpointPropertiesFormat, 'generated/azure_mgmt_network/models/service_endpoint_properties_format.rb' autoload :VerificationIPFlowResult, 'generated/azure_mgmt_network/models/verification_ipflow_result.rb' - autoload :VirtualNetworkListUsageResult, 'generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb' + autoload :IpsecPolicy, 'generated/azure_mgmt_network/models/ipsec_policy.rb' autoload :NextHopParameters, 'generated/azure_mgmt_network/models/next_hop_parameters.rb' - autoload :IPAddressAvailabilityResult, 'generated/azure_mgmt_network/models/ipaddress_availability_result.rb' + autoload :ApplicationGatewayBackendAddress, 'generated/azure_mgmt_network/models/application_gateway_backend_address.rb' autoload :NextHopResult, 'generated/azure_mgmt_network/models/next_hop_result.rb' - autoload :ApplicationGatewayFirewallDisabledRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb' + autoload :ApplicationGatewayBackendHealthServer, 'generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb' autoload :SecurityGroupViewParameters, 'generated/azure_mgmt_network/models/security_group_view_parameters.rb' - autoload :ApplicationGatewayFirewallRule, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb' + autoload :ApplicationGatewaySku, 'generated/azure_mgmt_network/models/application_gateway_sku.rb' autoload :NetworkInterfaceAssociation, 'generated/azure_mgmt_network/models/network_interface_association.rb' - autoload :UsagesListResult, 'generated/azure_mgmt_network/models/usages_list_result.rb' + autoload :BgpSettings, 'generated/azure_mgmt_network/models/bgp_settings.rb' autoload :SubnetAssociation, 'generated/azure_mgmt_network/models/subnet_association.rb' - autoload :DnsNameAvailabilityResult, 'generated/azure_mgmt_network/models/dns_name_availability_result.rb' + autoload :VirtualNetworkUsage, 'generated/azure_mgmt_network/models/virtual_network_usage.rb' autoload :SecurityRuleAssociations, 'generated/azure_mgmt_network/models/security_rule_associations.rb' - autoload :ExpressRouteCircuitStats, 'generated/azure_mgmt_network/models/express_route_circuit_stats.rb' + autoload :VirtualNetworkListResult, 'generated/azure_mgmt_network/models/virtual_network_list_result.rb' autoload :SecurityGroupNetworkInterface, 'generated/azure_mgmt_network/models/security_group_network_interface.rb' - autoload :ExpressRouteCircuitPeeringListResult, 'generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb' + autoload :AddressSpace, 'generated/azure_mgmt_network/models/address_space.rb' autoload :SecurityGroupViewResult, 'generated/azure_mgmt_network/models/security_group_view_result.rb' - autoload :NetworkInterfaceDnsSettings, 'generated/azure_mgmt_network/models/network_interface_dns_settings.rb' + autoload :VirtualNetworkPeeringListResult, 'generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb' autoload :PacketCaptureStorageLocation, 'generated/azure_mgmt_network/models/packet_capture_storage_location.rb' - autoload :TunnelConnectionHealth, 'generated/azure_mgmt_network/models/tunnel_connection_health.rb' + autoload :ApplicationGatewayAvailableSslPredefinedPolicies, 'generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb' autoload :PacketCaptureFilter, 'generated/azure_mgmt_network/models/packet_capture_filter.rb' - autoload :ApplicationGatewayBackendHealthServer, 'generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb' + autoload :Usage, 'generated/azure_mgmt_network/models/usage.rb' autoload :PacketCaptureParameters, 'generated/azure_mgmt_network/models/packet_capture_parameters.rb' - autoload :VpnClientConfiguration, 'generated/azure_mgmt_network/models/vpn_client_configuration.rb' + autoload :ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb' autoload :PacketCapture, 'generated/azure_mgmt_network/models/packet_capture.rb' - autoload :DhcpOptions, 'generated/azure_mgmt_network/models/dhcp_options.rb' + autoload :RouteListResult, 'generated/azure_mgmt_network/models/route_list_result.rb' autoload :PacketCaptureResult, 'generated/azure_mgmt_network/models/packet_capture_result.rb' - autoload :SubnetListResult, 'generated/azure_mgmt_network/models/subnet_list_result.rb' + autoload :ExpressRouteCircuitServiceProviderProperties, 'generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb' autoload :PacketCaptureListResult, 'generated/azure_mgmt_network/models/packet_capture_list_result.rb' - autoload :ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb' + autoload :ExpressRouteCircuitRoutesTable, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb' autoload :PacketCaptureQueryStatusResult, 'generated/azure_mgmt_network/models/packet_capture_query_status_result.rb' - autoload :ExpressRouteCircuitServiceProviderProperties, 'generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb' + autoload :VirtualNetworkGatewayListConnectionsResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb' autoload :TroubleshootingParameters, 'generated/azure_mgmt_network/models/troubleshooting_parameters.rb' - autoload :ApplicationGatewayBackendAddress, 'generated/azure_mgmt_network/models/application_gateway_backend_address.rb' + autoload :PublicIPAddressDnsSettings, 'generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb' autoload :QueryTroubleshootingParameters, 'generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb' - autoload :VirtualNetworkUsageName, 'generated/azure_mgmt_network/models/virtual_network_usage_name.rb' + autoload :ApplicationGatewayConnectionDraining, 'generated/azure_mgmt_network/models/application_gateway_connection_draining.rb' autoload :TroubleshootingRecommendedActions, 'generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb' - autoload :ApplicationGatewayAvailableSslPredefinedPolicies, 'generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb' + autoload :GatewayRoute, 'generated/azure_mgmt_network/models/gateway_route.rb' autoload :TroubleshootingDetails, 'generated/azure_mgmt_network/models/troubleshooting_details.rb' - autoload :VirtualNetworkGatewayConnectionListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb' + autoload :VirtualNetworkUsageName, 'generated/azure_mgmt_network/models/virtual_network_usage_name.rb' autoload :TroubleshootingResult, 'generated/azure_mgmt_network/models/troubleshooting_result.rb' - autoload :VirtualNetworkPeeringListResult, 'generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb' + autoload :ApplicationGatewayFirewallRule, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb' autoload :RetentionPolicyParameters, 'generated/azure_mgmt_network/models/retention_policy_parameters.rb' - autoload :ApplicationGatewaySku, 'generated/azure_mgmt_network/models/application_gateway_sku.rb' + autoload :ApplicationSecurityGroupListResult, 'generated/azure_mgmt_network/models/application_security_group_list_result.rb' autoload :FlowLogStatusParameters, 'generated/azure_mgmt_network/models/flow_log_status_parameters.rb' - autoload :RouteListResult, 'generated/azure_mgmt_network/models/route_list_result.rb' + autoload :ExpressRouteCircuitStats, 'generated/azure_mgmt_network/models/express_route_circuit_stats.rb' autoload :FlowLogInformation, 'generated/azure_mgmt_network/models/flow_log_information.rb' + autoload :ExpressRouteCircuitArpTable, 'generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb' + autoload :ConnectivitySource, 'generated/azure_mgmt_network/models/connectivity_source.rb' + autoload :ConnectionSharedKey, 'generated/azure_mgmt_network/models/connection_shared_key.rb' + autoload :ConnectivityDestination, 'generated/azure_mgmt_network/models/connectivity_destination.rb' + autoload :ApplicationGatewayBackendHealthPool, 'generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb' + autoload :ConnectivityParameters, 'generated/azure_mgmt_network/models/connectivity_parameters.rb' + autoload :ApplicationGatewayFirewallDisabledRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb' + autoload :ConnectivityIssue, 'generated/azure_mgmt_network/models/connectivity_issue.rb' + autoload :UsageName, 'generated/azure_mgmt_network/models/usage_name.rb' + autoload :ConnectivityHop, 'generated/azure_mgmt_network/models/connectivity_hop.rb' + autoload :ExpressRouteCircuitRoutesTableSummary, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb' + autoload :ConnectivityInformation, 'generated/azure_mgmt_network/models/connectivity_information.rb' + autoload :VirtualNetworkGatewaySku, 'generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb' + autoload :AzureReachabilityReportLocation, 'generated/azure_mgmt_network/models/azure_reachability_report_location.rb' + autoload :ExpressRouteCircuitPeeringListResult, 'generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb' + autoload :AzureReachabilityReportParameters, 'generated/azure_mgmt_network/models/azure_reachability_report_parameters.rb' + autoload :SubnetListResult, 'generated/azure_mgmt_network/models/subnet_list_result.rb' + autoload :AzureReachabilityReportLatencyInfo, 'generated/azure_mgmt_network/models/azure_reachability_report_latency_info.rb' + autoload :GatewayRouteListResult, 'generated/azure_mgmt_network/models/gateway_route_list_result.rb' + autoload :AzureReachabilityReportItem, 'generated/azure_mgmt_network/models/azure_reachability_report_item.rb' autoload :BackendAddressPool, 'generated/azure_mgmt_network/models/backend_address_pool.rb' autoload :InboundNatRule, 'generated/azure_mgmt_network/models/inbound_nat_rule.rb' + autoload :ApplicationSecurityGroup, 'generated/azure_mgmt_network/models/application_security_group.rb' autoload :SecurityRule, 'generated/azure_mgmt_network/models/security_rule.rb' autoload :NetworkInterface, 'generated/azure_mgmt_network/models/network_interface.rb' autoload :NetworkSecurityGroup, 'generated/azure_mgmt_network/models/network_security_group.rb' @@ -197,6 +233,7 @@ module Models autoload :ApplicationGatewayFirewallRuleSet, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule_set.rb' autoload :ApplicationGatewayAvailableSslOptions, 'generated/azure_mgmt_network/models/application_gateway_available_ssl_options.rb' autoload :ApplicationGatewaySslPredefinedPolicy, 'generated/azure_mgmt_network/models/application_gateway_ssl_predefined_policy.rb' + autoload :EndpointServiceResult, 'generated/azure_mgmt_network/models/endpoint_service_result.rb' autoload :ExpressRouteCircuitAuthorization, 'generated/azure_mgmt_network/models/express_route_circuit_authorization.rb' autoload :RouteFilterRule, 'generated/azure_mgmt_network/models/route_filter_rule.rb' autoload :ExpressRouteCircuitPeering, 'generated/azure_mgmt_network/models/express_route_circuit_peering.rb' @@ -210,7 +247,6 @@ module Models autoload :OutboundNatRule, 'generated/azure_mgmt_network/models/outbound_nat_rule.rb' autoload :LoadBalancer, 'generated/azure_mgmt_network/models/load_balancer.rb' autoload :NetworkWatcher, 'generated/azure_mgmt_network/models/network_watcher.rb' - autoload :PrivateAccessServiceResult, 'generated/azure_mgmt_network/models/private_access_service_result.rb' autoload :PatchRouteFilterRule, 'generated/azure_mgmt_network/models/patch_route_filter_rule.rb' autoload :PatchRouteFilter, 'generated/azure_mgmt_network/models/patch_route_filter.rb' autoload :BgpServiceCommunity, 'generated/azure_mgmt_network/models/bgp_service_community.rb' @@ -222,6 +258,7 @@ module Models autoload :VirtualNetworkGateway, 'generated/azure_mgmt_network/models/virtual_network_gateway.rb' autoload :LocalNetworkGateway, 'generated/azure_mgmt_network/models/local_network_gateway.rb' autoload :VirtualNetworkGatewayConnection, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb' + autoload :VirtualNetworkGatewayConnectionListEntity, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb' autoload :TransportProtocol, 'generated/azure_mgmt_network/models/transport_protocol.rb' autoload :IPAllocationMethod, 'generated/azure_mgmt_network/models/ipallocation_method.rb' autoload :IPVersion, 'generated/azure_mgmt_network/models/ipversion.rb' @@ -229,6 +266,7 @@ module Models autoload :SecurityRuleAccess, 'generated/azure_mgmt_network/models/security_rule_access.rb' autoload :SecurityRuleDirection, 'generated/azure_mgmt_network/models/security_rule_direction.rb' autoload :RouteNextHopType, 'generated/azure_mgmt_network/models/route_next_hop_type.rb' + autoload :PublicIPAddressSkuName, 'generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb' autoload :ApplicationGatewayProtocol, 'generated/azure_mgmt_network/models/application_gateway_protocol.rb' autoload :ApplicationGatewayCookieBasedAffinity, 'generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb' autoload :ApplicationGatewayBackendHealthServerHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb' @@ -250,9 +288,11 @@ module Models autoload :ExpressRouteCircuitSkuTier, 'generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb' autoload :ExpressRouteCircuitSkuFamily, 'generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb' autoload :ServiceProviderProvisioningState, 'generated/azure_mgmt_network/models/service_provider_provisioning_state.rb' + autoload :LoadBalancerSkuName, 'generated/azure_mgmt_network/models/load_balancer_sku_name.rb' autoload :LoadDistribution, 'generated/azure_mgmt_network/models/load_distribution.rb' autoload :ProbeProtocol, 'generated/azure_mgmt_network/models/probe_protocol.rb' autoload :NetworkOperationStatus, 'generated/azure_mgmt_network/models/network_operation_status.rb' + autoload :EffectiveSecurityRuleProtocol, 'generated/azure_mgmt_network/models/effective_security_rule_protocol.rb' autoload :EffectiveRouteSource, 'generated/azure_mgmt_network/models/effective_route_source.rb' autoload :EffectiveRouteState, 'generated/azure_mgmt_network/models/effective_route_state.rb' autoload :ProvisioningState, 'generated/azure_mgmt_network/models/provisioning_state.rb' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb index 2f713f19e4..8b973fc5f9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -101,7 +101,7 @@ def get_with_http_info(resource_group_name, application_gateway_name, custom_hea def get_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -234,7 +234,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -317,7 +317,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -523,7 +523,7 @@ def list_available_waf_rule_sets_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_available_waf_rule_sets_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -606,7 +606,7 @@ def list_available_ssl_options_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_available_ssl_options_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -689,7 +689,7 @@ def list_available_ssl_predefined_policies_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_available_ssl_predefined_policies_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -775,7 +775,7 @@ def get_ssl_predefined_policy_with_http_info(predefined_policy_name, custom_head # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def get_ssl_predefined_policy_async(predefined_policy_name, custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'predefined_policy_name is nil' if predefined_policy_name.nil? @@ -866,7 +866,7 @@ def begin_delete_with_http_info(resource_group_name, application_gateway_name, c def begin_delete_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -954,7 +954,7 @@ def begin_create_or_update_async(resource_group_name, application_gateway_name, fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1063,7 +1063,7 @@ def begin_start_with_http_info(resource_group_name, application_gateway_name, cu def begin_start_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1143,7 +1143,7 @@ def begin_stop_with_http_info(resource_group_name, application_gateway_name, cus def begin_stop_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1233,7 +1233,7 @@ def begin_backend_health_with_http_info(resource_group_name, application_gateway def begin_backend_health_async(resource_group_name, application_gateway_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_security_groups.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_security_groups.rb new file mode 100644 index 0000000000..8648fcfa6e --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_security_groups.rb @@ -0,0 +1,795 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class ApplicationSecurityGroups + include MsRestAzure + + # + # Creates and initializes a new instance of the ApplicationSecurityGroups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Deletes the specified application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, application_security_group_name, custom_headers = nil) + response = delete_async(resource_group_name, application_security_group_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, application_security_group_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, application_security_group_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets information about the specified application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplicationSecurityGroup] operation results. + # + def get(resource_group_name, application_security_group_name, custom_headers = nil) + response = get_async(resource_group_name, application_security_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets information about the specified application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, application_security_group_name, custom_headers = nil) + get_async(resource_group_name, application_security_group_name, custom_headers).value! + end + + # + # Gets information about the specified application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, application_security_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'application_security_group_name is nil' if application_security_group_name.nil? + api_version = '2017-09-01' + 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.Network/applicationSecurityGroups/{applicationSecurityGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applicationSecurityGroupName' => application_security_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param parameters [ApplicationSecurityGroup] Parameters supplied to the + # create or update ApplicationSecurityGroup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplicationSecurityGroup] operation results. + # + def create_or_update(resource_group_name, application_security_group_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, application_security_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param parameters [ApplicationSecurityGroup] Parameters supplied to the + # create or update ApplicationSecurityGroup 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, application_security_group_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, application_security_group_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroup.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 all application security groups in a 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_all(custom_headers = nil) + first_page = list_all_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets all application security groups in a 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_all_with_http_info(custom_headers = nil) + list_all_async(custom_headers).value! + end + + # + # Gets all application security groups in a 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_all_async(custom_headers = nil) + api_version = '2017-09-01' + 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.Network/applicationSecurityGroups' + + 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' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the application security groups in 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(resource_group_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the application security groups in 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_with_http_info(resource_group_name, custom_headers = nil) + list_async(resource_group_name, custom_headers).value! + end + + # + # Gets all the application security groups in 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_async(resource_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + api_version = '2017-09-01' + 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.Network/applicationSecurityGroups' + + 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' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, application_security_group_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, application_security_group_name, custom_headers).value! + nil + end + + # + # Deletes the specified application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security 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 begin_delete_with_http_info(resource_group_name, application_security_group_name, custom_headers = nil) + begin_delete_async(resource_group_name, application_security_group_name, custom_headers).value! + end + + # + # Deletes the specified application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security 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 begin_delete_async(resource_group_name, application_security_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'application_security_group_name is nil' if application_security_group_name.nil? + api_version = '2017-09-01' + 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.Network/applicationSecurityGroups/{applicationSecurityGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applicationSecurityGroupName' => application_security_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 204 || 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? + + result + end + + promise.execute + end + + # + # Creates or updates an application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param parameters [ApplicationSecurityGroup] Parameters supplied to the + # create or update ApplicationSecurityGroup operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplicationSecurityGroup] operation results. + # + def begin_create_or_update(resource_group_name, application_security_group_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, application_security_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param parameters [ApplicationSecurityGroup] Parameters supplied to the + # create or update ApplicationSecurityGroup 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, application_security_group_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, application_security_group_name, parameters, custom_headers).value! + end + + # + # Creates or updates an application security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param application_security_group_name [String] The name of the application + # security group. + # @param parameters [ApplicationSecurityGroup] Parameters supplied to the + # create or update ApplicationSecurityGroup 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, application_security_group_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'application_security_group_name is nil' if application_security_group_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2017-09-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroup.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.Network/applicationSecurityGroups/{applicationSecurityGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'applicationSecurityGroupName' => application_security_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all application security groups in a 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 [ApplicationSecurityGroupListResult] operation results. + # + def list_all_next(next_page_link, custom_headers = nil) + response = list_all_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all application security groups in a 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_all_next_with_http_info(next_page_link, custom_headers = nil) + list_all_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all application security groups in a 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_all_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the application security groups in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplicationSecurityGroupListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the application security groups in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the application security groups in a resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::ApplicationSecurityGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all application security groups in a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ApplicationSecurityGroupListResult] which provide lazy access to + # pages of the response. + # + def list_all_as_lazy(custom_headers = nil) + response = list_all_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_all_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all the application security groups in 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 [ApplicationSecurityGroupListResult] which provide lazy access to + # pages of the response. + # + def list_as_lazy(resource_group_name, custom_headers = nil) + response = list_async(resource_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_private_access_services.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_endpoint_services.rb similarity index 80% rename from management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_private_access_services.rb rename to management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_endpoint_services.rb index 229be36f42..5dfa6322c1 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_private_access_services.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_endpoint_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -7,11 +7,11 @@ module Azure::ARM::Network # # Network Client # - class AvailablePrivateAccessServices + class AvailableEndpointServices include MsRestAzure # - # Creates and initializes a new instance of the AvailablePrivateAccessServices class. + # Creates and initializes a new instance of the AvailableEndpointServices class. # @param client service class for accessing basic functionality. # def initialize(client) @@ -22,14 +22,13 @@ def initialize(client) attr_reader :client # - # List what values of private access services are available for use. + # List what values of endpoint services are available for use. # - # @param location [String] The location to check available private access - # values. + # @param location [String] The location to check available endpoint services. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # def list(location, custom_headers = nil) first_page = list_as_lazy(location, custom_headers) @@ -37,10 +36,9 @@ def list(location, custom_headers = nil) end # - # List what values of private access services are available for use. + # List what values of endpoint services are available for use. # - # @param location [String] The location to check available private access - # values. + # @param location [String] The location to check available endpoint services. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -51,10 +49,9 @@ def list_with_http_info(location, custom_headers = nil) end # - # List what values of private access services are available for use. + # List what values of endpoint services are available for use. # - # @param location [String] The location to check available private access - # values. + # @param location [String] The location to check available endpoint services. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -62,7 +59,7 @@ def list_with_http_info(location, custom_headers = nil) # def list_async(location, custom_headers = nil) fail ArgumentError, 'location is nil' if location.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -71,7 +68,7 @@ def list_async(location, custom_headers = nil) # Set Headers request_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.Network/locations/{location}/privateAccessServices' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices' request_url = @base_url || @client.base_url @@ -98,7 +95,7 @@ def list_async(location, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Network::Models::PrivateAccessServicesListResult.mapper() + result_mapper = Azure::ARM::Network::Models::EndpointServicesListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -112,14 +109,14 @@ def list_async(location, custom_headers = nil) end # - # List what values of private access services are available for use. + # List what values of endpoint services are available for use. # # @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 [PrivateAccessServicesListResult] operation results. + # @return [EndpointServicesListResult] operation results. # def list_next(next_page_link, custom_headers = nil) response = list_next_async(next_page_link, custom_headers).value! @@ -127,7 +124,7 @@ def list_next(next_page_link, custom_headers = nil) end # - # List what values of private access services are available for use. + # List what values of endpoint services are available for use. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -141,7 +138,7 @@ def list_next_with_http_info(next_page_link, custom_headers = nil) end # - # List what values of private access services are available for use. + # List what values of endpoint services are available for use. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -185,7 +182,7 @@ def list_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Network::Models::PrivateAccessServicesListResult.mapper() + result_mapper = Azure::ARM::Network::Models::EndpointServicesListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -199,15 +196,14 @@ def list_next_async(next_page_link, custom_headers = nil) end # - # List what values of private access services are available for use. + # List what values of endpoint services are available for use. # - # @param location [String] The location to check available private access - # values. + # @param location [String] The location to check available endpoint services. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PrivateAccessServicesListResult] which provide lazy access to pages - # of the response. + # @return [EndpointServicesListResult] which provide lazy access to pages of + # the response. # def list_as_lazy(location, custom_headers = nil) response = list_async(location, custom_headers).value! diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb index 6d7fbfd698..45d6d89a31 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -55,7 +55,7 @@ def list_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb new file mode 100644 index 0000000000..0f1ce18edd --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb @@ -0,0 +1,330 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class DefaultSecurityRules + include MsRestAzure + + # + # Creates and initializes a new instance of the DefaultSecurityRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # 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(resource_group_name, network_security_group_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_security_group_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # 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_with_http_info(resource_group_name, network_security_group_name, custom_headers = nil) + list_async(resource_group_name, network_security_group_name, custom_headers).value! + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # 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_async(resource_group_name, network_security_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? + api_version = '2017-09-01' + 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.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRule] operation results. + # + def get(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + response = get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers).value! + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? + fail ArgumentError, 'default_security_rule_name is nil' if default_security_rule_name.nil? + api_version = '2017-09-01' + 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.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'defaultSecurityRuleName' => default_security_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all default security rules in a network security 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 [SecurityRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all default security rules in a network security 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_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all default security rules in a network security 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_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRuleListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, network_security_group_name, custom_headers = nil) + response = list_async(resource_group_name, network_security_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb index 9f927fda25..3548921dab 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -107,7 +107,7 @@ def get_async(resource_group_name, circuit_name, authorization_name, custom_head fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'authorization_name is nil' if authorization_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -248,7 +248,7 @@ def list_with_http_info(resource_group_name, circuit_name, custom_headers = nil) def list_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -342,7 +342,7 @@ def begin_delete_async(resource_group_name, circuit_name, authorization_name, cu fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'authorization_name is nil' if authorization_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -437,7 +437,7 @@ def begin_create_or_update_async(resource_group_name, circuit_name, authorizatio fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'authorization_name is nil' if authorization_name.nil? fail ArgumentError, 'authorization_parameters is nil' if authorization_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb index 90036de289..dc6899a755 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -107,7 +107,7 @@ def get_async(resource_group_name, circuit_name, peering_name, custom_headers = fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -246,7 +246,7 @@ def list_with_http_info(resource_group_name, circuit_name, custom_headers = nil) def list_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -340,7 +340,7 @@ def begin_delete_async(resource_group_name, circuit_name, peering_name, custom_h fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -432,7 +432,7 @@ def begin_create_or_update_async(resource_group_name, circuit_name, peering_name fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'peering_parameters is nil' if peering_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb index 9113f173ab..3f1c1d97aa 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -101,7 +101,7 @@ def get_with_http_info(resource_group_name, circuit_name, custom_headers = nil) def get_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -379,7 +379,7 @@ def get_stats_with_http_info(resource_group_name, circuit_name, custom_headers = def get_stats_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -474,7 +474,7 @@ def get_peering_stats_async(resource_group_name, circuit_name, peering_name, cus fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -561,7 +561,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -644,7 +644,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -734,7 +734,7 @@ def begin_delete_with_http_info(resource_group_name, circuit_name, custom_header def begin_delete_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -822,7 +822,7 @@ def begin_create_or_update_async(resource_group_name, circuit_name, parameters, fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -943,7 +943,7 @@ def begin_list_arp_table_async(resource_group_name, circuit_name, peering_name, fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'device_path is nil' if device_path.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1045,7 +1045,7 @@ def begin_list_routes_table_async(resource_group_name, circuit_name, peering_nam fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'device_path is nil' if device_path.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1147,7 +1147,7 @@ def begin_list_routes_table_summary_async(resource_group_name, circuit_name, pee fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'device_path is nil' if device_path.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb index 86d676501a..ab58a5e5fa 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -55,7 +55,7 @@ def list_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb new file mode 100644 index 0000000000..6254487021 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb @@ -0,0 +1,616 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class InboundNatRules + include MsRestAzure + + # + # Creates and initializes a new instance of the InboundNatRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @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, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_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, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] 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, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/inboundNatRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + response = delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def get(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param custom_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, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand, custom_headers).value! + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param [Hash{String => String}] 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, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version,'$expand' => expand}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule 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, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + nil + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 204 || 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? + + result + end + + promise.execute + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def begin_create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule 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, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule 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, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + fail ArgumentError, 'inbound_nat_rule_parameters is nil' if inbound_nat_rule_parameters.nil? + api_version = '2017-09-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + request_content = @client.serialize(request_mapper, inbound_nat_rule_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @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 [InboundNatRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRuleListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb new file mode 100644 index 0000000000..4212b13556 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb @@ -0,0 +1,323 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerBackendAddressPools + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerBackendAddressPools class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @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, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_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, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] 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, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/backendAddressPools' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerBackendAddressPoolListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackendAddressPool] operation results. + # + def get(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param custom_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, load_balancer_name, backend_address_pool_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers).value! + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param [Hash{String => String}] 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, load_balancer_name, backend_address_pool_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'backend_address_pool_name is nil' if backend_address_pool_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'backendAddressPoolName' => backend_address_pool_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::BackendAddressPool.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer backed address pools. + # + # @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 [LoadBalancerBackendAddressPoolListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerBackendAddressPoolListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerBackendAddressPoolListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb new file mode 100644 index 0000000000..294d8dad57 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb @@ -0,0 +1,323 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerFrontendIPConfigurations + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerFrontendIPConfigurations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @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, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_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, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] 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, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerFrontendIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FrontendIPConfiguration] operation results. + # + def get(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param custom_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, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers).value! + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param [Hash{String => String}] 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, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'frontend_ipconfiguration_name is nil' if frontend_ipconfiguration_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'frontendIPConfigurationName' => frontend_ipconfiguration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::FrontendIPConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @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 [LoadBalancerFrontendIPConfigurationListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerFrontendIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] which provide lazy + # access to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb new file mode 100644 index 0000000000..86f64c1067 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerLoadBalancingRules + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerLoadBalancingRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @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, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_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, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] 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, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/loadBalancingRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerLoadBalancingRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancingRule] operation results. + # + def get(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers).value! + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'load_balancing_rule_name is nil' if load_balancing_rule_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'loadBalancingRuleName' => load_balancing_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancingRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @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 [LoadBalancerLoadBalancingRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerLoadBalancingRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerLoadBalancingRuleListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb new file mode 100644 index 0000000000..8611f9adae --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.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::ARM::Network + # + # Network Client + # + class LoadBalancerNetworkInterfaces + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerNetworkInterfaces class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @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, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_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, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] 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, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/networkInterfaces' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 associated load balancer network interfaces. + # + # @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 [NetworkInterfaceListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets associated load balancer network interfaces. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets associated load balancer network interfaces. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb new file mode 100644 index 0000000000..94b5e62688 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerProbes + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerProbes class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @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, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_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, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] 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, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/probes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerProbeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Probe] operation results. + # + def get(resource_group_name, load_balancer_name, probe_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, probe_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param custom_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, load_balancer_name, probe_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, probe_name, custom_headers).value! + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param [Hash{String => String}] 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, load_balancer_name, probe_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'probe_name is nil' if probe_name.nil? + api_version = '2017-09-01' + 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.Network/loadBalancers/{loadBalancerName}/probes/{probeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'probeName' => probe_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::Probe.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer probes. + # + # @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 [LoadBalancerProbeListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerProbeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerProbeListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb index 8fa4963039..a37dcbb3bb 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, load_balancer_name, expand = nil, cu def get_async(resource_group_name, load_balancer_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -410,7 +410,7 @@ def begin_delete_with_http_info(resource_group_name, load_balancer_name, custom_ def begin_delete_async(resource_group_name, load_balancer_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -498,7 +498,7 @@ def begin_create_or_update_async(resource_group_name, load_balancer_name, parame fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb index a91df67865..11123a2359 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -114,7 +114,7 @@ def get_with_http_info(resource_group_name, local_network_gateway_name, custom_h def get_async(resource_group_name, local_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -241,7 +241,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -342,7 +342,7 @@ def begin_create_or_update_async(resource_group_name, local_network_gateway_name fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -454,7 +454,7 @@ def begin_delete_with_http_info(resource_group_name, local_network_gateway_name, def begin_delete_async(resource_group_name, local_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/access.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/access.rb index e47983cec7..a3f0a8caa3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/access.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/access.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/address_space.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/address_space.rb index efc780f021..c899e97156 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/address_space.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/address_space.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AddressSpace include MsRestAzure - include MsRest::JSONable # @return [Array] A list of address blocks reserved for this # virtual network in CIDR notation. attr_accessor :address_prefixes diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway.rb index e38938018a..40700ce4c9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Application gateway resource # - class ApplicationGateway < MsRestAzure::Resource + class ApplicationGateway < Resource include MsRestAzure - include MsRest::JSONable # @return [ApplicationGatewaySku] SKU of the application gateway # resource. attr_accessor :sku diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb index 523c63bd39..9350b05bd3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Authentication certificates of an application gateway. # - class ApplicationGatewayAuthenticationCertificate < MsRestAzure::SubResource + class ApplicationGatewayAuthenticationCertificate < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] Certificate public data. attr_accessor :data diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_options.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_options.rb index 900ae4e7d2..c820365050 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_options.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Response for ApplicationGatewayAvailableSslOptions API service call. # - class ApplicationGatewayAvailableSslOptions < MsRestAzure::Resource + class ApplicationGatewayAvailableSslOptions < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] List of available Ssl predefined policy. attr_accessor :predefined_policies diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb index 7aede9a3a2..3c2c1c177f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb index a8df23393a..9a7b793fad 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayAvailableWafRuleSetsResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of # application gateway rule sets. attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb index 4588a63dd7..81eaf4ac9f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayBackendAddress include MsRestAzure - include MsRest::JSONable # @return [String] Fully qualified domain name (FQDN). attr_accessor :fqdn diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb index 900321c572..adb497b517 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Backend Address Pool of an application gateway. # - class ApplicationGatewayBackendAddressPool < MsRestAzure::SubResource + class ApplicationGatewayBackendAddressPool < SubResource include MsRestAzure - include MsRest::JSONable # @return [Array] Collection of # references to IPs defined in network interfaces. attr_accessor :backend_ipconfigurations diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health.rb index 1650d9a946..48d989e37c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayBackendHealth include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :backend_address_pools diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb index b1f29b0105..2c214fac08 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayBackendHealthHttpSettings include MsRestAzure - include MsRest::JSONable # @return [ApplicationGatewayBackendHttpSettings] Reference of an # ApplicationGatewayBackendHttpSettings resource. attr_accessor :backend_http_settings diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb index 234838eeba..aabeedc4dc 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayBackendHealthPool include MsRestAzure - include MsRest::JSONable # @return [ApplicationGatewayBackendAddressPool] Reference of an # ApplicationGatewayBackendAddressPool resource. attr_accessor :backend_address_pool diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb index a3eabff122..ac2fb20af9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayBackendHealthServer include MsRestAzure - include MsRest::JSONable # @return [String] IP address or FQDN of backend server. attr_accessor :address diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb index 8bb3aa6894..9319ab4da6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb index 3adb2d532a..338604edca 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Backend address pool settings of an application gateway. # - class ApplicationGatewayBackendHttpSettings < MsRestAzure::SubResource + class ApplicationGatewayBackendHttpSettings < SubResource include MsRestAzure - include MsRest::JSONable # @return [Integer] Port attr_accessor :port diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_connection_draining.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_connection_draining.rb index 5006554030..ba3b3a5507 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_connection_draining.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_connection_draining.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -14,7 +14,6 @@ class ApplicationGatewayConnectionDraining include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether connection draining is enabled or not. attr_accessor :enabled diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb index 2d47a0fbc9..eaf8de16a5 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb index 67e025d751..4888a93fc2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayFirewallDisabledRuleGroup include MsRestAzure - include MsRest::JSONable # @return [String] The name of the rule group that will be disabled. attr_accessor :rule_group_name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb index 07d4b8b2f2..922dfad68b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb index 27fe4911d6..9bd052b888 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayFirewallRule include MsRestAzure - include MsRest::JSONable # @return [Integer] The identifier of the web application firewall rule. attr_accessor :rule_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb index cafbbf293d..30f9f16f4f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayFirewallRuleGroup include MsRestAzure - include MsRest::JSONable # @return [String] The name of the web application firewall rule group. attr_accessor :rule_group_name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_set.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_set.rb index 56a315f52c..2a5864f3b6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_set.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_firewall_rule_set.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A web application firewall rule set. # - class ApplicationGatewayFirewallRuleSet < MsRestAzure::Resource + class ApplicationGatewayFirewallRuleSet < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The provisioning state of the web application firewall # rule set. attr_accessor :provisioning_state diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb index 9c6e16dceb..8515ce916a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Frontend IP configuration of an application gateway. # - class ApplicationGatewayFrontendIPConfiguration < MsRestAzure::SubResource + class ApplicationGatewayFrontendIPConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] PrivateIPAddress of the network interface IP # Configuration. attr_accessor :private_ipaddress diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb index d2f8b2b7ee..127454259f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Frontend port of an application gateway. # - class ApplicationGatewayFrontendPort < MsRestAzure::SubResource + class ApplicationGatewayFrontendPort < SubResource include MsRestAzure - include MsRest::JSONable # @return [Integer] Frontend port attr_accessor :port diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb index c991ae92cf..f17e948f17 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Http listener of an application gateway. # - class ApplicationGatewayHttpListener < MsRestAzure::SubResource + class ApplicationGatewayHttpListener < SubResource include MsRestAzure - include MsRest::JSONable # @return [SubResource] Frontend IP configuration resource of an # application gateway. attr_accessor :frontend_ipconfiguration diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb index aca473a5d2..52ba52a24c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # IP configuration of an application gateway. Currently 1 public and 1 # private IP configuration is allowed. # - class ApplicationGatewayIPConfiguration < MsRestAzure::SubResource + class ApplicationGatewayIPConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [SubResource] Reference of the subnet resource. A subnet from # where application gateway gets its private address. attr_accessor :subnet diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb index 8b7692dd0d..6503c6a953 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_operational_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_operational_state.rb index b3ad6c7a2b..7d32e60d6b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_operational_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_operational_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb index 39af0df55c..1d9546bcc9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Path rule of URL path map of an application gateway. # - class ApplicationGatewayPathRule < MsRestAzure::SubResource + class ApplicationGatewayPathRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [Array] Path rules of URL path map. attr_accessor :paths diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb index 0544e8e786..47a3a5c88c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Probe of the application gateway. # - class ApplicationGatewayProbe < MsRestAzure::SubResource + class ApplicationGatewayProbe < SubResource include MsRestAzure - include MsRest::JSONable # @return [ApplicationGatewayProtocol] Protocol. Possible values include: # 'Http', 'Https' attr_accessor :protocol diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb index b84a5d3a60..dd5de6b819 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayProbeHealthResponseMatch include MsRestAzure - include MsRest::JSONable # @return [String] Body that must be contained in the health response. # Default value is empty. attr_accessor :body diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_protocol.rb index 5613f5a1b8..7c9d254c9e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_configuration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_configuration.rb index 235bbe4352..d74de1943b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_configuration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Redirect configuration of an application gateway. # - class ApplicationGatewayRedirectConfiguration < MsRestAzure::SubResource + class ApplicationGatewayRedirectConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [ApplicationGatewayRedirectType] Supported http redirection # types - Permanent, Temporary, Found, SeeOther. Possible values include: # 'Permanent', 'Found', 'SeeOther', 'Temporary' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_type.rb index 7a1da5b068..c22b055f81 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_redirect_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb index ba018080cb..2502cc2b07 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Request routing rule of an application gateway. # - class ApplicationGatewayRequestRoutingRule < MsRestAzure::SubResource + class ApplicationGatewayRequestRoutingRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [ApplicationGatewayRequestRoutingRuleType] Rule type. Possible # values include: 'Basic', 'PathBasedRouting' attr_accessor :rule_type diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb index a605de575a..9b484313f9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb index c3b439cc46..2ff01a715d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewaySku include MsRestAzure - include MsRest::JSONable # @return [ApplicationGatewaySkuName] Name of an application gateway SKU. # Possible values include: 'Standard_Small', 'Standard_Medium', # 'Standard_Large', 'WAF_Medium', 'WAF_Large' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku_name.rb index d5d5ada416..7e71b9eb49 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku_name.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb index 859bbc2af5..aeb411de42 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # SSL certificates of an application gateway. # - class ApplicationGatewaySslCertificate < MsRestAzure::SubResource + class ApplicationGatewaySslCertificate < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] Base-64 encoded pfx certificate. Only applicable in # PUT Request. attr_accessor :data diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_cipher_suite.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_cipher_suite.rb index f9915529b9..75a9668e13 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_cipher_suite.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_cipher_suite.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb index 14e639ff7c..8e0faa0c82 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewaySslPolicy include MsRestAzure - include MsRest::JSONable # @return [Array] Ssl protocols to be # disabled on application gateway. attr_accessor :disabled_ssl_protocols diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_name.rb index dc8611a238..6b39442bc9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_name.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_type.rb index 6843d40d06..2b1b231428 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_predefined_policy.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_predefined_policy.rb index 4df9ba88de..1172aa8a28 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_predefined_policy.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_predefined_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # An Ssl predefined policy # - class ApplicationGatewaySslPredefinedPolicy < MsRestAzure::SubResource + class ApplicationGatewaySslPredefinedPolicy < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] Name of Ssl predefined policy. attr_accessor :name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb index 128a2da624..e10996c579 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_tier.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_tier.rb index 9e256db1ec..c6b47670b6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_tier.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb index 9ae8299a78..7dba938f2a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # UrlPathMaps give a url path to the backend mapping information for # PathBasedRouting. # - class ApplicationGatewayUrlPathMap < MsRestAzure::SubResource + class ApplicationGatewayUrlPathMap < SubResource include MsRestAzure - include MsRest::JSONable # @return [SubResource] Default backend address pool resource of URL path # map. attr_accessor :default_backend_address_pool diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb index fb20135351..702fec75cf 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationGatewayWebApplicationFirewallConfiguration include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether the web application firewall is enabled or # not. attr_accessor :enabled diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_security_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_security_group.rb new file mode 100644 index 0000000000..315766fbe4 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_security_group.rb @@ -0,0 +1,117 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # An application security group in a resource group. + # + class ApplicationSecurityGroup < Resource + + include MsRestAzure + + # @return [String] The resource GUID property of the application security + # group resource. It uniquely identifies a resource, even if the user + # changes its name or migrate the resource across subscriptions or + # resource groups. + attr_accessor :resource_guid + + # @return [String] The provisioning state of the application security + # group resource. Possible values are: 'Succeeded', 'Updating', + # 'Deleting', and 'Failed'. + attr_accessor :provisioning_state + + # @return [String] A unique read-only string that changes whenever the + # resource is updated. + attr_accessor :etag + + + # + # Mapper for ApplicationSecurityGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplicationSecurityGroup', + type: { + name: 'Composite', + class_name: 'ApplicationSecurityGroup', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + resource_guid: { + required: false, + read_only: true, + serialized_name: 'properties.resourceGuid', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + 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_network/lib/generated/azure_mgmt_network/models/private_access_services_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_security_group_list_result.rb similarity index 70% rename from management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_services_list_result.rb rename to management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_security_group_list_result.rb index e8dc584dc4..a98d061fe5 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_services_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/application_security_group_list_result.rb @@ -1,20 +1,20 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Network module Models # - # Response for the ListAvailablePrivateAccessServices API service call. + # A list of application security groups. # - class PrivateAccessServicesListResult + class ApplicationSecurityGroupListResult include MsRestAzure include MsRest::JSONable - # @return [Array] List of available private - # access service values in a region. + # @return [Array] A list of application + # security groups. attr_accessor :value # @return [String] The URL to get the next set of results. @@ -26,7 +26,7 @@ class PrivateAccessServicesListResult # # Gets the rest of the items for the request, enabling auto-pagination. # - # @return [Array] operation results. + # @return [Array] operation results. # def get_all_items items = @value @@ -41,7 +41,7 @@ def get_all_items # # Gets the next page of results. # - # @return [PrivateAccessServicesListResult] with next page content. + # @return [ApplicationSecurityGroupListResult] with next page content. # def get_next_page response = @next_method.call(@next_link).value! unless @next_method.nil? @@ -53,16 +53,16 @@ def get_next_page end # - # Mapper for PrivateAccessServicesListResult class as Ruby Hash. + # Mapper for ApplicationSecurityGroupListResult class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'PrivateAccessServicesListResult', + serialized_name: 'ApplicationSecurityGroupListResult', type: { name: 'Composite', - class_name: 'PrivateAccessServicesListResult', + class_name: 'ApplicationSecurityGroupListResult', model_properties: { value: { required: false, @@ -71,16 +71,17 @@ def self.mapper() name: 'Sequence', element: { required: false, - serialized_name: 'PrivateAccessServiceResultElementType', + serialized_name: 'ApplicationSecurityGroupElementType', type: { name: 'Composite', - class_name: 'PrivateAccessServiceResult' + class_name: 'ApplicationSecurityGroup' } } } }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/association_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/association_type.rb index e539b47a21..060dffd665 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/association_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/association_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authentication_method.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authentication_method.rb index d5782a203c..4f760ea110 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authentication_method.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authentication_method.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_list_result.rb index d4f1a7d63d..5909d93157 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_use_status.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_use_status.rb index 484cb6a393..93270b9aa9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_use_status.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/authorization_use_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list.rb new file mode 100644 index 0000000000..738b3051d3 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # List of available countries with details. + # + class AvailableProvidersList + + include MsRestAzure + + # @return [Array] List of available + # countries. + attr_accessor :countries + + + # + # Mapper for AvailableProvidersList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProvidersList', + type: { + name: 'Composite', + class_name: 'AvailableProvidersList', + model_properties: { + countries: { + required: true, + serialized_name: 'countries', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AvailableProvidersListCountryElementType', + type: { + name: 'Composite', + class_name: 'AvailableProvidersListCountry' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_city.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_city.rb new file mode 100644 index 0000000000..8c1f268d32 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_city.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::ARM::Network + module Models + # + # City or town details. + # + class AvailableProvidersListCity + + include MsRestAzure + + # @return [String] The city or town name. + attr_accessor :city_name + + # @return [Array] A list of Internet service providers. + attr_accessor :providers + + + # + # Mapper for AvailableProvidersListCity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProvidersListCity', + type: { + name: 'Composite', + class_name: 'AvailableProvidersListCity', + model_properties: { + city_name: { + required: false, + serialized_name: 'cityName', + type: { + name: 'String' + } + }, + providers: { + required: false, + serialized_name: 'providers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_country.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_country.rb new file mode 100644 index 0000000000..c4e13d7027 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_country.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::ARM::Network + module Models + # + # Country details. + # + class AvailableProvidersListCountry + + include MsRestAzure + + # @return [String] The country name. + attr_accessor :country_name + + # @return [Array] A list of Internet service providers. + attr_accessor :providers + + # @return [Array] List of available states + # in the country. + attr_accessor :states + + + # + # Mapper for AvailableProvidersListCountry class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProvidersListCountry', + type: { + name: 'Composite', + class_name: 'AvailableProvidersListCountry', + model_properties: { + country_name: { + required: false, + serialized_name: 'countryName', + type: { + name: 'String' + } + }, + providers: { + required: false, + serialized_name: 'providers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + states: { + required: false, + serialized_name: 'states', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AvailableProvidersListStateElementType', + type: { + name: 'Composite', + class_name: 'AvailableProvidersListState' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_parameters.rb new file mode 100644 index 0000000000..ffa8be3d98 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_parameters.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Constraints that determine the list of available Internet service + # providers. + # + class AvailableProvidersListParameters + + include MsRestAzure + + # @return [Array] A list of Azure regions. + attr_accessor :azure_locations + + # @return [String] The country for available providers list. + attr_accessor :country + + # @return [String] The state for available providers list. + attr_accessor :state + + # @return [String] The city or town for available providers list. + attr_accessor :city + + + # + # Mapper for AvailableProvidersListParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProvidersListParameters', + type: { + name: 'Composite', + class_name: 'AvailableProvidersListParameters', + model_properties: { + azure_locations: { + required: false, + serialized_name: 'azureLocations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + country: { + required: false, + serialized_name: 'country', + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + city: { + required: false, + serialized_name: 'city', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_state.rb new file mode 100644 index 0000000000..7201a429a8 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/available_providers_list_state.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::ARM::Network + module Models + # + # State details. + # + class AvailableProvidersListState + + include MsRestAzure + + # @return [String] The state name. + attr_accessor :state_name + + # @return [Array] A list of Internet service providers. + attr_accessor :providers + + # @return [Array] List of available cities or + # towns in the state. + attr_accessor :cities + + + # + # Mapper for AvailableProvidersListState class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProvidersListState', + type: { + name: 'Composite', + class_name: 'AvailableProvidersListState', + model_properties: { + state_name: { + required: false, + serialized_name: 'stateName', + type: { + name: 'String' + } + }, + providers: { + required: false, + serialized_name: 'providers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + cities: { + required: false, + serialized_name: 'cities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AvailableProvidersListCityElementType', + type: { + name: 'Composite', + class_name: 'AvailableProvidersListCity' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb index edcb1adcc9..ccd91f6172 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -19,7 +19,6 @@ class AzureAsyncOperationResult include MsRestAzure - include MsRest::JSONable # @return [NetworkOperationStatus] Status of the Azure async operation. # Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible # values include: 'InProgress', 'Succeeded', 'Failed' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report.rb new file mode 100644 index 0000000000..90285070fe --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report.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::ARM::Network + module Models + # + # Azure reachability report details. + # + class AzureReachabilityReport + + include MsRestAzure + + # @return [String] The aggregation level of Azure reachability report. + # Can be Country, State or City. + attr_accessor :aggregation_level + + # @return [AzureReachabilityReportLocation] + attr_accessor :provider_location + + # @return [Array] List of Azure reachability + # report items. + attr_accessor :reachability_report + + + # + # Mapper for AzureReachabilityReport class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureReachabilityReport', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReport', + model_properties: { + aggregation_level: { + required: true, + serialized_name: 'aggregationLevel', + type: { + name: 'String' + } + }, + provider_location: { + required: true, + serialized_name: 'providerLocation', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportLocation' + } + }, + reachability_report: { + required: true, + serialized_name: 'reachabilityReport', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AzureReachabilityReportItemElementType', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportItem' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_item.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_item.rb new file mode 100644 index 0000000000..fab45c92f1 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_item.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Azure reachability report details for a given provider location. + # + class AzureReachabilityReportItem + + include MsRestAzure + + # @return [String] The Internet service provider. + attr_accessor :provider + + # @return [String] The Azure region. + attr_accessor :azure_location + + # @return [Array] List of latency + # details for each of the time series. + attr_accessor :latencies + + + # + # Mapper for AzureReachabilityReportItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureReachabilityReportItem', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportItem', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + azure_location: { + required: false, + serialized_name: 'azureLocation', + type: { + name: 'String' + } + }, + latencies: { + required: false, + serialized_name: 'latencies', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AzureReachabilityReportLatencyInfoElementType', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportLatencyInfo' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_latency_info.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_latency_info.rb new file mode 100644 index 0000000000..142899cceb --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_latency_info.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Details on latency for a time series. + # + class AzureReachabilityReportLatencyInfo + + include MsRestAzure + + # @return [DateTime] The time stamp. + attr_accessor :time_stamp + + # @return [Integer] The relative latency score between 1 and 100, higher + # values indicating a faster connection. + attr_accessor :score + + + # + # Mapper for AzureReachabilityReportLatencyInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureReachabilityReportLatencyInfo', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportLatencyInfo', + model_properties: { + time_stamp: { + required: false, + serialized_name: 'timeStamp', + type: { + name: 'DateTime' + } + }, + score: { + required: false, + serialized_name: 'score', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_location.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_location.rb new file mode 100644 index 0000000000..19c902ea52 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_location.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::ARM::Network + module Models + # + # Parameters that define a geographic location. + # + class AzureReachabilityReportLocation + + include MsRestAzure + + # @return [String] The name of the country. + attr_accessor :country + + # @return [String] The name of the state. + attr_accessor :state + + # @return [String] The name of the city or town. + attr_accessor :city + + + # + # Mapper for AzureReachabilityReportLocation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureReachabilityReportLocation', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportLocation', + model_properties: { + country: { + required: true, + serialized_name: 'country', + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + city: { + required: false, + serialized_name: 'city', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_parameters.rb new file mode 100644 index 0000000000..97d76c197d --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/azure_reachability_report_parameters.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::ARM::Network + module Models + # + # Geographic and time constraints for Azure reachability report. + # + class AzureReachabilityReportParameters + + include MsRestAzure + + # @return [AzureReachabilityReportLocation] + attr_accessor :provider_location + + # @return [Array] List of Internet service providers. + attr_accessor :providers + + # @return [Array] Optional Azure regions to scope the query to. + attr_accessor :azure_locations + + # @return [DateTime] The start time for the Azure reachability report. + attr_accessor :start_time + + # @return [DateTime] The end time for the Azure reachability report. + attr_accessor :end_time + + + # + # Mapper for AzureReachabilityReportParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureReachabilityReportParameters', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportParameters', + model_properties: { + provider_location: { + required: true, + serialized_name: 'providerLocation', + type: { + name: 'Composite', + class_name: 'AzureReachabilityReportLocation' + } + }, + providers: { + required: false, + serialized_name: 'providers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + azure_locations: { + required: false, + serialized_name: 'azureLocations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + start_time: { + required: true, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: true, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/backend_address_pool.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/backend_address_pool.rb index 1f40121003..3ca2c3c07a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/backend_address_pool.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/backend_address_pool.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Pool of backend IP addresses. # - class BackendAddressPool < MsRestAzure::SubResource + class BackendAddressPool < SubResource include MsRestAzure - include MsRest::JSONable # @return [Array] Gets collection of # references to IP addresses defined in network interfaces. attr_accessor :backend_ipconfigurations diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_state.rb index 94253ed5c1..93e841b500 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status.rb index 14517346b3..ac18f32534 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BgpPeerStatus include MsRestAzure - include MsRest::JSONable # @return [String] The virtual network gateway's local address attr_accessor :local_address diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb index 39f3a916c8..b093414bea 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BgpPeerStatusListResult include MsRestAzure - include MsRest::JSONable # @return [Array] List of BGP peers attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community.rb index 3676e04a76..f339f348c1 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Service Community Properties. # - class BgpServiceCommunity < MsRestAzure::Resource + class BgpServiceCommunity < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The name of the bgp community. e.g. Skype. attr_accessor :service_name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community_list_result.rb index f942d896f5..764aa99c3a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_service_community_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_settings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_settings.rb index d53cfe8831..f5668bf0cd 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_settings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgp_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BgpSettings include MsRestAzure - include MsRest::JSONable # @return [Integer] The BGP speaker's ASN. attr_accessor :asn diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgpcommunity.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgpcommunity.rb index b8c8e31d1e..c58fa83178 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgpcommunity.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/bgpcommunity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class BGPCommunity include MsRestAzure - include MsRest::JSONable # @return [String] The region which the service support. e.g. For O365, # region is Global. attr_accessor :service_supported_region diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb index c0da6205be..87458cfed3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnectionResetSharedKey include MsRestAzure - include MsRest::JSONable # @return [Integer] The virtual network connection reset shared key # length, should between 1 and 128. attr_accessor :key_length diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_shared_key.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_shared_key.rb index cafc562c95..d2c1ee038a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_shared_key.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_shared_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnectionSharedKey include MsRestAzure - include MsRest::JSONable # @return [String] The virtual network connection shared key value. attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_status.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_status.rb index 412c0dc275..379fe3eb3e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_status.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connection_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_destination.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_destination.rb index b51dd8d75d..d868409e3c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_destination.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_destination.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnectivityDestination include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the resource to which a connection attempt # will be made. attr_accessor :resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_hop.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_hop.rb index 9d8784f695..c1d8df74fc 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_hop.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_hop.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnectivityHop include MsRestAzure - include MsRest::JSONable # @return [String] The type of the hop. attr_accessor :type diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_information.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_information.rb index e9cb02a9b5..25581e8d20 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_information.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_information.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnectivityInformation include MsRestAzure - include MsRest::JSONable # @return [Array] List of hops between the source and # the destination. attr_accessor :hops diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_issue.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_issue.rb index 514a74cc28..6d8d41f43e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_issue.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_issue.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ConnectivityIssue include MsRestAzure - include MsRest::JSONable # @return [Origin] The origin of the issue. Possible values include: # 'Local', 'Inbound', 'Outbound' attr_accessor :origin diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_parameters.rb index 9c929c0ba3..d4834ba518 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnectivityParameters include MsRestAzure - include MsRest::JSONable # @return [ConnectivitySource] attr_accessor :source diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_source.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_source.rb index f3b2424cd2..417524e3f5 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_source.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/connectivity_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnectivitySource include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the resource from which a connectivity check # will be initiated. attr_accessor :resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dh_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dh_group.rb index 7cf271edb7..a4261ee20e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dh_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dh_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dhcp_options.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dhcp_options.rb index e3590350a9..2abf119eff 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dhcp_options.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dhcp_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -14,7 +14,6 @@ class DhcpOptions include MsRestAzure - include MsRest::JSONable # @return [Array] The list of DNS servers IP addresses. attr_accessor :dns_servers diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/direction.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/direction.rb index 8fdf2f3a91..e8815ade99 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/direction.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/direction.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb index afad9e680e..4bd2330450 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DnsNameAvailabilityResult include MsRestAzure - include MsRest::JSONable # @return [Boolean] Domain availability (True/False). attr_accessor :available diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb index e768016067..338e866cba 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,11 @@ class EffectiveNetworkSecurityGroup include MsRestAzure - include MsRest::JSONable # @return [SubResource] The ID of network security group that is applied. attr_accessor :network_security_group - # @return [EffectiveNetworkSecurityGroupAssociation] + # @return [EffectiveNetworkSecurityGroupAssociation] Associated + # resources. attr_accessor :association # @return [Array] A collection of effective diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb index 009dc25fbf..8e3bf18b69 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EffectiveNetworkSecurityGroupAssociation include MsRestAzure - include MsRest::JSONable # @return [SubResource] The ID of the subnet if assigned. attr_accessor :subnet diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb index 4fc86d544d..d35ae7191e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EffectiveNetworkSecurityGroupListResult include MsRestAzure - include MsRest::JSONable # @return [Array] A list of effective # network security groups. attr_accessor :value @@ -50,6 +49,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb index 8077f76556..898beccb51 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,14 +12,13 @@ class EffectiveNetworkSecurityRule include MsRestAzure - include MsRest::JSONable # @return [String] The name of the security rule specified by the user # (if created by the user). attr_accessor :name - # @return [SecurityRuleProtocol] The network protocol this rule applies - # to. Possible values are: 'Tcp', 'Udp', and '*'. Possible values - # include: 'Tcp', 'Udp', '*' + # @return [EffectiveSecurityRuleProtocol] The network protocol this rule + # applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible + # values include: 'Tcp', 'Udp', 'All' attr_accessor :protocol # @return [String] The source port or range. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route.rb index 50917cbc6d..c1906abf5b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EffectiveRoute include MsRestAzure - include MsRest::JSONable # @return [String] The name of the user defined route. This is optional. attr_accessor :name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb index e8b55d4c70..1a1c1f44bf 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EffectiveRouteListResult include MsRestAzure - include MsRest::JSONable # @return [Array] A list of effective routes. attr_accessor :value @@ -49,6 +48,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_source.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_source.rb index d0a377efec..1ade16740f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_source.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_state.rb index 6ebea9ba6c..2fa059c96b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb new file mode 100644 index 0000000000..9f53bf3f8d --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.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::ARM::Network + module Models + # + # Defines values for EffectiveSecurityRuleProtocol + # + module EffectiveSecurityRuleProtocol + Tcp = "Tcp" + Udp = "Udp" + All = "All" + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/endpoint_service_result.rb similarity index 70% rename from management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_result.rb rename to management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/endpoint_service_result.rb index 456528a804..854d7b07ce 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/endpoint_service_result.rb @@ -1,36 +1,35 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Network module Models # - # Private access service. + # Endpoint service. # - class PrivateAccessServiceResult < MsRestAzure::SubResource + class EndpointServiceResult < SubResource include MsRestAzure - include MsRest::JSONable - # @return [String] Name of the private access value. + # @return [String] Name of the endpoint service. attr_accessor :name - # @return [String] Type of the private access value. + # @return [String] Type of the endpoint service. attr_accessor :type # - # Mapper for PrivateAccessServiceResult class as Ruby Hash. + # Mapper for EndpointServiceResult class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'PrivateAccessServiceResult', + serialized_name: 'EndpointServiceResult', type: { name: 'Composite', - class_name: 'PrivateAccessServiceResult', + class_name: 'EndpointServiceResult', model_properties: { id: { required: false, diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/endpoint_services_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/endpoint_services_list_result.rb new file mode 100644 index 0000000000..edc5deaa41 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/endpoint_services_list_result.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::ARM::Network + module Models + # + # Response for the ListAvailableEndpointServices API service call. + # + class EndpointServicesListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of available endpoint + # services in a region. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [EndpointServicesListResult] 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 EndpointServicesListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EndpointServicesListResult', + type: { + name: 'Composite', + class_name: 'EndpointServicesListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EndpointServiceResultElementType', + type: { + name: 'Composite', + class_name: 'EndpointServiceResult' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error.rb index 339d177da2..fa2fb5ac17 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Error include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :code diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error_details.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error_details.rb index 24c95a95d7..6d409532a1 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error_details.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/error_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ErrorDetails include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :code diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit.rb index c7c86b2d96..75e5653f37 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # ExpressRouteCircuit resource # - class ExpressRouteCircuit < MsRestAzure::Resource + class ExpressRouteCircuit < Resource include MsRestAzure - include MsRest::JSONable # @return [ExpressRouteCircuitSku] The SKU. attr_accessor :sku diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb index 43900b5dd5..c1051a4d0d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitArpTable include MsRestAzure - include MsRest::JSONable # @return [Integer] Age attr_accessor :age diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb index c1068a7227..b1f17a24f9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Authorization in an ExpressRouteCircuit resource. # - class ExpressRouteCircuitAuthorization < MsRestAzure::SubResource + class ExpressRouteCircuitAuthorization < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The authorization key. attr_accessor :authorization_key diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb index 80f7d17078..f219c704d2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb index 9af34fb210..f3448af677 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Peering in an ExpressRouteCircuit resource. # - class ExpressRouteCircuitPeering < MsRestAzure::SubResource + class ExpressRouteCircuitPeering < SubResource include MsRestAzure - include MsRest::JSONable # @return [ExpressRouteCircuitPeeringType] The PeeringType. Possible # values are: 'AzurePublicPeering', 'AzurePrivatePeering', and # 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb index 1bfa9b3271..f43cdf3ed1 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb index 8e387c068b..625b202677 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitPeeringConfig include MsRestAzure - include MsRest::JSONable # @return [Array] The reference of AdvertisedPublicPrefixes. attr_accessor :advertised_public_prefixes diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb index 3c2a4191a7..a937474774 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb index 06a3a58a46..ad8286a4be 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_type.rb index c67caea51d..46f72dae54 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb index 0370726fe6..8bc51b2a78 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitRoutesTable include MsRestAzure - include MsRest::JSONable # @return [String] network attr_accessor :network diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb index acad35fdec..4e6518c8bc 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitRoutesTableSummary include MsRestAzure - include MsRest::JSONable # @return [String] Neighbor attr_accessor :neighbor diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb index 5cd5ada198..e214084ec7 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitServiceProviderProperties include MsRestAzure - include MsRest::JSONable # @return [String] The serviceProviderName. attr_accessor :service_provider_name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb index 71130b7ed9..92172e3e91 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitSku include MsRestAzure - include MsRest::JSONable # @return [String] The name of the SKU. attr_accessor :name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb index 6c137799d8..14d6437767 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb index 77c6b19b97..804c0f7afd 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb index 2c3ab88f7f..cf2c0b49be 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitStats include MsRestAzure - include MsRest::JSONable # @return [Integer] Gets BytesIn of the peering. attr_accessor :primarybytes_in diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb index 1c336c4f6e..701f8e5119 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteCircuitsArpTableListResult include MsRestAzure - include MsRest::JSONable # @return [Array] Gets list of the ARP # table. attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb index 645fb892af..0d0d622fd9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ExpressRouteCircuitsRoutesTableListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of routes # table. attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb index fbdaddf433..8ba73cbae7 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ExpressRouteCircuitsRoutesTableSummaryListResult include MsRestAzure - include MsRest::JSONable # @return [Array] A list of the # routes table. attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb index a12a6df8af..60522a6e15 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A ExpressRouteResourceProvider object. # - class ExpressRouteServiceProvider < MsRestAzure::Resource + class ExpressRouteServiceProvider < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] Get a list of peering locations. attr_accessor :peering_locations diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb index b064d301bf..d6f5c319d0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExpressRouteServiceProviderBandwidthsOffered include MsRestAzure - include MsRest::JSONable # @return [String] The OfferName. attr_accessor :offer_name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb index cffe5731c7..0922fa50e9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_information.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_information.rb index cfddc18020..4490b4d9a3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_information.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_information.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FlowLogInformation include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the resource to configure for flow logging. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_status_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_status_parameters.rb index 9bc7bef2e6..5cf7578e0b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_status_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/flow_log_status_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FlowLogStatusParameters include MsRestAzure - include MsRest::JSONable # @return [String] The target resource where getting the flow logging # status. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb index c785bc7b7a..9df8a7f474 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Frontend IP address of the load balancer. # - class FrontendIPConfiguration < MsRestAzure::SubResource + class FrontendIPConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [Array] Read only. Inbound rules URIs that use # this frontend IP. attr_accessor :inbound_nat_rules @@ -55,6 +54,10 @@ class FrontendIPConfiguration < MsRestAzure::SubResource # resource is updated. attr_accessor :etag + # @return [Array] A list of availability zones denoting the IP + # allocated for the resource needs to come from. + attr_accessor :zones + # # Mapper for FrontendIPConfiguration class as Ruby Hash. @@ -189,6 +192,20 @@ def self.mapper() type: { name: 'String' } + }, + zones: { + required: false, + serialized_name: 'zones', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route.rb index 5bf5f13cff..2b9ff84845 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GatewayRoute include MsRestAzure - include MsRest::JSONable # @return [String] The gateway's local address attr_accessor :local_address diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route_list_result.rb index 1a20c28145..3d4d418a19 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_route_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GatewayRouteListResult include MsRestAzure - include MsRest::JSONable # @return [Array] List of gateway routes attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_encryption.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_encryption.rb index 2d5bac3fd0..25dd457fe0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_encryption.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_encryption.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_integrity.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_integrity.rb index ee75a606c2..fbce7b396c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_integrity.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ike_integrity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb index f5f7b476c5..11795c9ac3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,17 +8,15 @@ module Models # # Inbound NAT pool of the load balancer. # - class InboundNatPool < MsRestAzure::SubResource + class InboundNatPool < SubResource include MsRestAzure - include MsRest::JSONable # @return [SubResource] A reference to frontend IP addresses. attr_accessor :frontend_ipconfiguration - # @return [TransportProtocol] The transport protocol for the endpoint. - # Possible values are: 'Udp' or 'Tcp'. Possible values include: 'Udp', - # 'Tcp' + # @return [TransportProtocol] Possible values include: 'Udp', 'Tcp', + # 'All' attr_accessor :protocol # @return [Integer] The first port number in the range of external ports diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb index 5ac97b68a4..32949c972a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,27 +8,25 @@ module Models # # Inbound NAT rule of the load balancer. # - class InboundNatRule < MsRestAzure::SubResource + class InboundNatRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [SubResource] A reference to frontend IP addresses. attr_accessor :frontend_ipconfiguration # @return [NetworkInterfaceIPConfiguration] A reference to a private IP # address defined on a network interface of a VM. Traffic sent to the # frontend port of each of the frontend IP configurations is forwarded to - # the backed IP. + # the backend IP. attr_accessor :backend_ipconfiguration - # @return [TransportProtocol] The transport protocol for the endpoint. - # Possible values are: 'Udp' or 'Tcp'. Possible values include: 'Udp', - # 'Tcp' + # @return [TransportProtocol] Possible values include: 'Udp', 'Tcp', + # 'All' attr_accessor :protocol # @return [Integer] The port for the external endpoint. Port numbers for - # each Rule must be unique within the Load Balancer. Acceptable values + # each rule must be unique within the Load Balancer. Acceptable values # range from 1 to 65534. attr_accessor :frontend_port diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb new file mode 100644 index 0000000000..af308b8f1f --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListInboundNatRule API service call. + # + class InboundNatRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of inbound nat rules in a load + # balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [InboundNatRuleListResult] 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 InboundNatRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InboundNatRuleListResult', + type: { + name: 'Composite', + class_name: 'InboundNatRuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InboundNatRuleElementType', + type: { + name: 'Composite', + class_name: 'InboundNatRule' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb index fca2e8323c..67012efb0d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IPAddressAvailabilityResult include MsRestAzure - include MsRest::JSONable # @return [Boolean] Private IP address availability. attr_accessor :available diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipallocation_method.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipallocation_method.rb index 400de0d5a2..181927adab 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipallocation_method.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipallocation_method.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb index b7f6fb58a1..d38de2cbdb 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Network module Models # - # IPConfiguration + # IP configuration # - class IPConfiguration < MsRestAzure::SubResource + class IPConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The private IP address of the IP configuration. attr_accessor :private_ipaddress diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_encryption.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_encryption.rb index 6c76965795..f5c24d1e25 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_encryption.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_encryption.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_integrity.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_integrity.rb index 4fa0398f12..87af19fd98 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_integrity.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_integrity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_policy.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_policy.rb index fb0865bc4a..529676f2d6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_policy.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipsec_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IpsecPolicy include MsRestAzure - include MsRest::JSONable # @return [Integer] The IPSec Security Association (also called Quick # Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. attr_accessor :sa_life_time_seconds diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb index b3197ecba2..d1deb56e82 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Ipv6ExpressRouteCircuitPeeringConfig include MsRestAzure - include MsRest::JSONable # @return [String] The primary address prefix. attr_accessor :primary_peer_address_prefix diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipversion.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipversion.rb index acde569719..57b3ff3e8d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipversion.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipversion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/issue_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/issue_type.rb index 9d431a5fa1..383a11a705 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/issue_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/issue_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb index a80e1658f4..0c028890b2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # LoadBalancer resource # - class LoadBalancer < MsRestAzure::Resource + class LoadBalancer < Resource include MsRestAzure - include MsRest::JSONable + # @return [LoadBalancerSku] The load balancer SKU. + attr_accessor :sku + # @return [Array] Object representing the # frontend IPs to be used for the load balancer attr_accessor :frontend_ipconfigurations @@ -120,6 +122,14 @@ def self.mapper() } } }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'LoadBalancerSku' + } + }, frontend_ipconfigurations: { required: false, serialized_name: 'properties.frontendIPConfigurations', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb new file mode 100644 index 0000000000..0fd0465c97 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_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::ARM::Network + module Models + # + # Response for ListBackendAddressPool API service call. + # + class LoadBalancerBackendAddressPoolListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of backend address pools in + # a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerBackendAddressPoolListResult] 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 LoadBalancerBackendAddressPoolListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerBackendAddressPoolListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerBackendAddressPoolListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackendAddressPoolElementType', + type: { + name: 'Composite', + class_name: 'BackendAddressPool' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb new file mode 100644 index 0000000000..57e36dbae3 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.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::ARM::Network + module Models + # + # Response for ListFrontendIPConfiguration API service call. + # + class LoadBalancerFrontendIPConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of frontend IP + # configurations in a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] 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 LoadBalancerFrontendIPConfigurationListResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerFrontendIPConfigurationListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerFrontendIPConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FrontendIPConfigurationElementType', + type: { + name: 'Composite', + class_name: 'FrontendIPConfiguration' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb index e200c10c9a..e076d1e4c9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb new file mode 100644 index 0000000000..3f02445ce4 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_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::ARM::Network + module Models + # + # Response for ListLoadBalancingRule API service call. + # + class LoadBalancerLoadBalancingRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of load balancing rules in a + # load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerLoadBalancingRuleListResult] 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 LoadBalancerLoadBalancingRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerLoadBalancingRuleListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerLoadBalancingRuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LoadBalancingRuleElementType', + type: { + name: 'Composite', + class_name: 'LoadBalancingRule' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb new file mode 100644 index 0000000000..68c0e6cc4a --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.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::ARM::Network + module Models + # + # Response for ListProbe API service call. + # + class LoadBalancerProbeListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of probes in a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerProbeListResult] 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 LoadBalancerProbeListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerProbeListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerProbeListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProbeElementType', + type: { + name: 'Composite', + class_name: 'Probe' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku.rb new file mode 100644 index 0000000000..f66b2b8fb7 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku.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::ARM::Network + module Models + # + # SKU of a load balancer + # + class LoadBalancerSku + + include MsRestAzure + + # @return [LoadBalancerSkuName] Name of a load balancer SKU. Possible + # values include: 'Basic', 'Standard' + attr_accessor :name + + + # + # Mapper for LoadBalancerSku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerSku', + type: { + name: 'Composite', + class_name: 'LoadBalancerSku', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku_name.rb new file mode 100644 index 0000000000..02008e65eb --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku_name.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Defines values for LoadBalancerSkuName + # + module LoadBalancerSkuName + Basic = "Basic" + Standard = "Standard" + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb index 768f5b11e7..1117d6f32d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Network module Models # - # A loag balancing rule for a load balancer. + # A load balancing rule for a load balancer. # - class LoadBalancingRule < MsRestAzure::SubResource + class LoadBalancingRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [SubResource] A reference to frontend IP addresses. attr_accessor :frontend_ipconfiguration @@ -24,9 +23,8 @@ class LoadBalancingRule < MsRestAzure::SubResource # the load balancing rule. attr_accessor :probe - # @return [TransportProtocol] The transport protocol for the external - # endpoint. Possible values are 'Udp' or 'Tcp'. Possible values include: - # 'Udp', 'Tcp' + # @return [TransportProtocol] Possible values include: 'Udp', 'Tcp', + # 'All' attr_accessor :protocol # @return [LoadDistribution] The load distribution policy for this rule. @@ -35,12 +33,13 @@ class LoadBalancingRule < MsRestAzure::SubResource attr_accessor :load_distribution # @return [Integer] The port for the external endpoint. Port numbers for - # each Rule must be unique within the Load Balancer. Acceptable values - # are between 1 and 65534. + # each rule must be unique within the Load Balancer. Acceptable values + # are between 0 and 65534. Note that value 0 enables "Any Port" attr_accessor :frontend_port # @return [Integer] The port used for internal connections on the - # endpoint. Acceptable values are between 1 and 65535. + # endpoint. Acceptable values are between 0 and 65535. Note that value 0 + # enables "Any Port" attr_accessor :backend_port # @return [Integer] The timeout for the TCP idle connection. The value @@ -55,6 +54,11 @@ class LoadBalancingRule < MsRestAzure::SubResource # changed after you create the endpoint. attr_accessor :enable_floating_ip + # @return [Boolean] Configures SNAT for the VMs in the backend pool to + # use the publicIP address specified in the frontend of the load + # balancing rule. + attr_accessor :disable_outbound_snat + # @return [String] Gets the provisioning state of the PublicIP resource. # Possible values are: 'Updating', 'Deleting', and 'Failed'. attr_accessor :provisioning_state @@ -153,6 +157,13 @@ def self.mapper() name: 'Boolean' } }, + disable_outbound_snat: { + required: false, + serialized_name: 'properties.disableOutboundSnat', + type: { + name: 'Boolean' + } + }, provisioning_state: { required: false, serialized_name: 'properties.provisioningState', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_distribution.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_distribution.rb index ac8ce96b28..1aea8cfb9c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_distribution.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_distribution.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway.rb index ad61a08ba8..8c8b2aba4e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A common class for general resource information # - class LocalNetworkGateway < MsRestAzure::Resource + class LocalNetworkGateway < Resource include MsRestAzure - include MsRest::JSONable # @return [AddressSpace] Local network site address space. attr_accessor :local_network_address_space diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb index 35213fe6ee..6ecc0cdde6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface.rb index 17715c49c9..d4e0723814 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A network interface in a resource group. # - class NetworkInterface < MsRestAzure::Resource + class NetworkInterface < Resource include MsRestAzure - include MsRest::JSONable # @return [SubResource] The reference of a virtual machine. attr_accessor :virtual_machine diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_association.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_association.rb index 3d73f396d8..1ea2071c59 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_association.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_association.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NetworkInterfaceAssociation include MsRestAzure - include MsRest::JSONable # @return [String] Network interface ID. attr_accessor :id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb index 0419d6ab28..4223330a7c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NetworkInterfaceDnsSettings include MsRestAzure - include MsRest::JSONable # @return [Array] List of DNS servers IP addresses. Use # 'AzureProvidedDNS' to switch to azure provided DNS resolution. # 'AzureProvidedDNS' value cannot be combined with other IPs, it must be diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb index bdf6f54709..3289f69f71 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # IPConfiguration in a network interface. # - class NetworkInterfaceIPConfiguration < MsRestAzure::SubResource + class NetworkInterfaceIPConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [Array] The reference of # ApplicationGatewayBackendAddressPool resource. attr_accessor :application_gateway_backend_address_pools @@ -25,7 +24,7 @@ class NetworkInterfaceIPConfiguration < MsRestAzure::SubResource # LoadBalancerInboundNatRules. attr_accessor :load_balancer_inbound_nat_rules - # @return [String] + # @return [String] Private IP address of the IP configuration. attr_accessor :private_ipaddress # @return [IPAllocationMethod] Defines how a private IP address is @@ -39,17 +38,24 @@ class NetworkInterfaceIPConfiguration < MsRestAzure::SubResource # Possible values include: 'IPv4', 'IPv6' attr_accessor :private_ipaddress_version - # @return [Subnet] + # @return [Subnet] Subnet bound to the IP configuration. attr_accessor :subnet # @return [Boolean] Gets whether this is a primary customer address on # the network interface. attr_accessor :primary - # @return [PublicIPAddress] + # @return [PublicIPAddress] Public IP address bound to the IP + # configuration. attr_accessor :public_ipaddress - # @return [String] + # @return [Array] Application security groups + # in which the IP configuration is included. + attr_accessor :application_security_groups + + # @return [String] The provisioning state of the network interface IP + # configuration. Possible values are: 'Updating', 'Deleting', and + # 'Failed'. attr_accessor :provisioning_state # @return [String] The name of the resource that is unique within a @@ -169,6 +175,21 @@ def self.mapper() class_name: 'PublicIPAddress' } }, + application_security_groups: { + required: false, + serialized_name: 'properties.applicationSecurityGroups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplicationSecurityGroupElementType', + type: { + name: 'Composite', + class_name: 'ApplicationSecurityGroup' + } + } + } + }, provisioning_state: { required: false, serialized_name: 'properties.provisioningState', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb new file mode 100644 index 0000000000..65a807c3ce --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.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::ARM::Network + module Models + # + # Response for list ip configurations API service call. + # + class NetworkInterfaceIPConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of ip + # configurations. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [NetworkInterfaceIPConfigurationListResult] 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 NetworkInterfaceIPConfigurationListResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkInterfaceIPConfigurationListResult', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceIPConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NetworkInterfaceIPConfigurationElementType', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceIPConfiguration' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb index 3631658947..f4501b83c4 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb new file mode 100644 index 0000000000..73f2166caa --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_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::ARM::Network + module Models + # + # Response for list ip configurations API service call. + # + class NetworkInterfaceLoadBalancerListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of load balancers. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [NetworkInterfaceLoadBalancerListResult] 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 NetworkInterfaceLoadBalancerListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkInterfaceLoadBalancerListResult', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceLoadBalancerListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LoadBalancerElementType', + type: { + name: 'Composite', + class_name: 'LoadBalancer' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_operation_status.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_operation_status.rb index 42da4fa4cd..a697866c05 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_operation_status.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_operation_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group.rb index 79ffb80cbd..35acfab9e8 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # NetworkSecurityGroup resource. # - class NetworkSecurityGroup < MsRestAzure::Resource + class NetworkSecurityGroup < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of security rules of the # network security group. attr_accessor :security_rules diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb index ca091796f8..9c4074c3a9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher.rb index cd0f93cfaa..10b20e4fbd 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Network watcher in a resource group. # - class NetworkWatcher < MsRestAzure::Resource + class NetworkWatcher < Resource include MsRestAzure - include MsRest::JSONable # @return [String] A unique read-only string that changes whenever the # resource is updated. attr_accessor :etag diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher_list_result.rb index 52e6b70684..d756d7b168 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_watcher_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NetworkWatcherListResult include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_parameters.rb index 9fe8069ee7..4701a86f80 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NextHopParameters include MsRestAzure - include MsRest::JSONable # @return [String] The resource identifier of the target resource against # which the action is to be performed. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_result.rb index 72524d580d..8032abe66b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NextHopResult include MsRestAzure - include MsRest::JSONable # @return [NextHopType] Next hop type. Possible values include: # 'Internet', 'VirtualAppliance', 'VirtualNetworkGateway', 'VnetLocal', # 'HyperNetGateway', 'None' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_type.rb index 373f4ea72c..293c737827 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/next_hop_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/origin.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/origin.rb index 5f300093ff..d2bc57be10 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/origin.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/origin.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb index 81504b7b22..e573cd8264 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Outbound NAT pool of the load balancer. # - class OutboundNatRule < MsRestAzure::SubResource + class OutboundNatRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [Integer] The number of outbound ports to be used for NAT. attr_accessor :allocated_outbound_ports diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture.rb index 4ac182be9b..ee7e73651f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PacketCapture include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the targeted resource, only VM is currently # supported. attr_accessor :target diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_filter.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_filter.rb index cefd2eb856..b9ef046d4b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_filter.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class PacketCaptureFilter include MsRestAzure - include MsRest::JSONable # @return [PcProtocol] Protocol to be filtered on. Possible values # include: 'TCP', 'UDP', 'Any'. Default value: 'Any' . attr_accessor :protocol diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_list_result.rb index 0d013720bd..7dd9828803 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PacketCaptureListResult include MsRestAzure - include MsRest::JSONable # @return [Array] Information about packet capture # sessions. attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_parameters.rb index 8042895844..0e023d7419 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PacketCaptureParameters include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the targeted resource, only VM is currently # supported. attr_accessor :target diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_query_status_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_query_status_result.rb index 9f0eee87bd..b990dc256b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_query_status_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_query_status_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PacketCaptureQueryStatusResult include MsRestAzure - include MsRest::JSONable # @return [String] The name of the packet capture resource. attr_accessor :name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_result.rb index 7661aa2884..ed2798db38 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PacketCaptureResult include MsRestAzure - include MsRest::JSONable # @return [String] Name of the packet capture session. attr_accessor :name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_storage_location.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_storage_location.rb index 2194f5fa88..6411454511 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_storage_location.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/packet_capture_storage_location.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PacketCaptureStorageLocation include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the storage account to save the packet # capture session. Required if no local file path is provided. attr_accessor :storage_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter.rb index 0edd8c6de6..e2953b901c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Route Filter Resource. # - class PatchRouteFilter < MsRestAzure::SubResource + class PatchRouteFilter < SubResource include MsRestAzure - include MsRest::JSONable # @return [Array] Collection of RouteFilterRules # contained within a route filter. attr_accessor :rules diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter_rule.rb index 5e0f161517..770b1a6e7c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/patch_route_filter_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Route Filter Rule Resource # - class PatchRouteFilterRule < MsRestAzure::SubResource + class PatchRouteFilterRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [Access] The access type of the rule. Valid values are: # 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny' attr_accessor :access diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_error.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_error.rb index 8f9fcad396..ed5a83ecdb 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_error.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_protocol.rb index 93a9627f32..8fd170bdac 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_status.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_status.rb index 120ee984f3..b1f51e5e26 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_status.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pc_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pfs_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pfs_group.rb index 1782fd2121..8c05fe1ada 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pfs_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/pfs_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe.rb index 0a71ba139c..871280a6b9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A load balancer probe. # - class Probe < MsRestAzure::SubResource + class Probe < SubResource include MsRestAzure - include MsRest::JSONable # @return [Array] The load balancer rules that use this # probe. attr_accessor :load_balancing_rules diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe_protocol.rb index af3e40f907..a617d35425 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe_protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/probe_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/processor_architecture.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/processor_architecture.rb index 900b9d33fa..36d59a5247 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/processor_architecture.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/processor_architecture.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/protocol.rb index e56ede73a6..d909686b87 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/provisioning_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/provisioning_state.rb index c29b6cab3a..0e6a43d09c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/provisioning_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb index aa86809ef1..d29c9ddfd2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # Public IP address resource. # - class PublicIPAddress < MsRestAzure::Resource + class PublicIPAddress < Resource include MsRestAzure - include MsRest::JSONable + # @return [PublicIPAddressSku] The public IP address SKU. + attr_accessor :sku + # @return [IPAllocationMethod] The public IP allocation method. Possible # values are: 'Static' and 'Dynamic'. Possible values include: 'Static', # 'Dynamic' @@ -22,14 +24,16 @@ class PublicIPAddress < MsRestAzure::Resource # 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' attr_accessor :public_ipaddress_version - # @return [IPConfiguration] + # @return [IPConfiguration] The IP configuration associated with the + # public IP address. attr_accessor :ip_configuration # @return [PublicIPAddressDnsSettings] The FQDN of the DNS record # associated with the public IP address. attr_accessor :dns_settings - # @return [String] + # @return [String] The IP address associated with the public IP address + # resource. attr_accessor :ip_address # @return [Integer] The idle timeout of the public IP address. @@ -46,6 +50,10 @@ class PublicIPAddress < MsRestAzure::Resource # resource is updated. attr_accessor :etag + # @return [Array] A list of availability zones denoting the IP + # allocated for the resource needs to come from. + attr_accessor :zones + # # Mapper for PublicIPAddress class as Ruby Hash. @@ -103,6 +111,14 @@ def self.mapper() } } }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'PublicIPAddressSku' + } + }, public_ipallocation_method: { required: false, serialized_name: 'properties.publicIPAllocationMethod', @@ -168,6 +184,20 @@ def self.mapper() type: { name: 'String' } + }, + zones: { + required: false, + serialized_name: 'zones', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb index dee8468c76..5a83f7e296 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PublicIPAddressDnsSettings include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the Domain name label.The concatenation # of the domain name label and the regionalized DNS zone make up the # fully qualified domain name associated with the public IP address. If a diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb index 856805988a..5ac52680a8 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku.rb new file mode 100644 index 0000000000..21f9aa33f8 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku.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::ARM::Network + module Models + # + # SKU of a public IP address + # + class PublicIPAddressSku + + include MsRestAzure + + # @return [PublicIPAddressSkuName] Name of a public IP address SKU. + # Possible values include: 'Basic', 'Standard' + attr_accessor :name + + + # + # Mapper for PublicIPAddressSku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PublicIPAddressSku', + type: { + name: 'Composite', + class_name: 'PublicIPAddressSku', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb new file mode 100644 index 0000000000..af12d9903d --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Defines values for PublicIPAddressSkuName + # + module PublicIPAddressSkuName + Basic = "Basic" + Standard = "Standard" + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb index 28b9c21608..ba7937ba4c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class QueryTroubleshootingParameters include MsRestAzure - include MsRest::JSONable # @return [String] The target resource ID to query the troubleshooting # result. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/resource.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/resource.rb new file mode 100644 index 0000000000..1340ce5554 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/resource.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::ARM::Network + module Models + # + # Common resource representation. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + # @return [String] Resource location. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb index cb235f4638..d47e326005 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # ResourceNavigationLink resource. # - class ResourceNavigationLink < MsRestAzure::SubResource + class ResourceNavigationLink < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] Resource type of the linked resource. attr_accessor :linked_resource_type diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/retention_policy_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/retention_policy_parameters.rb index 4cd1ffbf19..838d4e01e7 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/retention_policy_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/retention_policy_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RetentionPolicyParameters include MsRestAzure - include MsRest::JSONable # @return [Integer] Number of days to retain flow log records. Default # value: 0 . attr_accessor :days diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route.rb index 84fa0cb8a9..f4aaddd708 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Route resource # - class Route < MsRestAzure::SubResource + class Route < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The destination CIDR to which the route applies. attr_accessor :address_prefix diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter.rb index 9007d143ba..e952fba65d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Route Filter Resource. # - class RouteFilter < MsRestAzure::Resource + class RouteFilter < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] Collection of RouteFilterRules # contained within a route filter. attr_accessor :rules diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_list_result.rb index 6d8b04c446..addec362d4 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule.rb index d38c2bcbb7..c760f50346 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Route Filter Rule Resource # - class RouteFilterRule < MsRestAzure::SubResource + class RouteFilterRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [Access] The access type of the rule. Valid values are: # 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny' attr_accessor :access diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule_list_result.rb index f80c7186b1..0bdb9a1352 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_filter_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_list_result.rb index 3a7d167c0e..f2c49dc033 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_next_hop_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_next_hop_type.rb index 0ae28980ca..cd72fab771 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_next_hop_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_next_hop_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table.rb index f19526efa8..ac521f91ee 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Route table resource. # - class RouteTable < MsRestAzure::Resource + class RouteTable < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] Collection of routes contained within a route # table. attr_accessor :routes diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table_list_result.rb index e59a85fc55..cc93b3aee5 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/route_table_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_network_interface.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_network_interface.rb index f8fb36ca50..a63057538a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_network_interface.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_network_interface.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SecurityGroupNetworkInterface include MsRestAzure - include MsRest::JSONable # @return [String] ID of the network interface. attr_accessor :id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_parameters.rb index bc29a73b1e..c32ce3424a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SecurityGroupViewParameters include MsRestAzure - include MsRest::JSONable # @return [String] ID of the target VM. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_result.rb index df6956faba..0500a1925a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_group_view_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SecurityGroupViewResult include MsRestAzure - include MsRest::JSONable # @return [Array] List of network # interfaces on the specified VM. attr_accessor :network_interfaces diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb index 4185c531c5..aeb917c0ef 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Network security rule. # - class SecurityRule < MsRestAzure::SubResource + class SecurityRule < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] A description for this rule. Restricted to 140 chars. attr_accessor :description @@ -38,6 +37,10 @@ class SecurityRule < MsRestAzure::SubResource # @return [Array] The CIDR or source IP ranges. attr_accessor :source_address_prefixes + # @return [Array] The application security + # group specified as source. + attr_accessor :source_application_security_groups + # @return [String] The destination address prefix. CIDR or destination IP # range. Asterix '*' can also be used to match all source IPs. Default # tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can @@ -45,9 +48,19 @@ class SecurityRule < MsRestAzure::SubResource attr_accessor :destination_address_prefix # @return [Array] The destination address prefixes. CIDR or - # destination IP rangees. + # destination IP ranges. attr_accessor :destination_address_prefixes + # @return [Array] The application security + # group specified as destination. + attr_accessor :destination_application_security_groups + + # @return [Array] The source port ranges. + attr_accessor :source_port_ranges + + # @return [Array] The destination port ranges. + attr_accessor :destination_port_ranges + # @return [SecurityRuleAccess] The network traffic is allowed or denied. # Possible values are: 'Allow' and 'Deny'. Possible values include: # 'Allow', 'Deny' @@ -126,7 +139,7 @@ def self.mapper() } }, source_address_prefix: { - required: true, + required: false, serialized_name: 'properties.sourceAddressPrefix', type: { name: 'String' @@ -146,8 +159,23 @@ def self.mapper() } } }, + source_application_security_groups: { + required: false, + serialized_name: 'properties.sourceApplicationSecurityGroups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplicationSecurityGroupElementType', + type: { + name: 'Composite', + class_name: 'ApplicationSecurityGroup' + } + } + } + }, destination_address_prefix: { - required: true, + required: false, serialized_name: 'properties.destinationAddressPrefix', type: { name: 'String' @@ -167,6 +195,49 @@ def self.mapper() } } }, + destination_application_security_groups: { + required: false, + serialized_name: 'properties.destinationApplicationSecurityGroups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplicationSecurityGroupElementType', + type: { + name: 'Composite', + class_name: 'ApplicationSecurityGroup' + } + } + } + }, + source_port_ranges: { + required: false, + serialized_name: 'properties.sourcePortRanges', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + destination_port_ranges: { + required: false, + serialized_name: 'properties.destinationPortRanges', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, access: { required: true, serialized_name: 'properties.access', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_access.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_access.rb index d3c0c82761..81a999a9fe 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_access.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_access.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_associations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_associations.rb index daad5a86fe..2e586a1548 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_associations.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_associations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SecurityRuleAssociations include MsRestAzure - include MsRest::JSONable # @return [NetworkInterfaceAssociation] attr_accessor :network_interface_association diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_direction.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_direction.rb index 20e2e7d353..0eae9111b6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_direction.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_direction.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb index 92217b916a..6ff4c47405 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_protocol.rb index d9cc69a4d1..c0840797d7 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_properties_format.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/service_endpoint_properties_format.rb similarity index 77% rename from management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_properties_format.rb rename to management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/service_endpoint_properties_format.rb index fd1c4a9895..a544546cb6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_properties_format.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/service_endpoint_properties_format.rb @@ -1,19 +1,18 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Network module Models # - # The private access service properties. + # The service endpoint properties. # - class PrivateAccessServicePropertiesFormat + class ServiceEndpointPropertiesFormat include MsRestAzure - include MsRest::JSONable - # @return [String] The type of the private access. + # @return [String] The type of the endpoint service. attr_accessor :service # @return [Array] A list of locations. @@ -24,16 +23,16 @@ class PrivateAccessServicePropertiesFormat # - # Mapper for PrivateAccessServicePropertiesFormat class as Ruby Hash. + # Mapper for ServiceEndpointPropertiesFormat class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'PrivateAccessServicePropertiesFormat', + serialized_name: 'ServiceEndpointPropertiesFormat', type: { name: 'Composite', - class_name: 'PrivateAccessServicePropertiesFormat', + class_name: 'ServiceEndpointPropertiesFormat', model_properties: { service: { required: false, diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb index 3978f744f1..4b7d30d5bb 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/severity.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/severity.rb index 42e47509c8..318fbd055d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/severity.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/severity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/sub_resource.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/sub_resource.rb new file mode 100644 index 0000000000..7cfe276c39 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/sub_resource.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::ARM::Network + module Models + # + # Reference to another subresource. + # + class SubResource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + + # + # Mapper for SubResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubResource', + type: { + name: 'Composite', + class_name: 'SubResource', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb index 0f3e8555ba..bb631a6844 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Subnet in a virtual network resource. # - class Subnet < MsRestAzure::SubResource + class Subnet < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The address prefix for the subnet. attr_accessor :address_prefix @@ -23,9 +22,9 @@ class Subnet < MsRestAzure::SubResource # @return [RouteTable] The reference of the RouteTable resource. attr_accessor :route_table - # @return [Array] An array of - # private access services values. - attr_accessor :private_access_services + # @return [Array] An array of service + # endpoints. + attr_accessor :service_endpoints # @return [Array] Gets an array of references to the # network interface IP configurations using subnet. @@ -89,17 +88,17 @@ def self.mapper() class_name: 'RouteTable' } }, - private_access_services: { + service_endpoints: { required: false, - serialized_name: 'properties.privateAccessServices', + serialized_name: 'properties.serviceEndpoints', type: { name: 'Sequence', element: { required: false, - serialized_name: 'PrivateAccessServicePropertiesFormatElementType', + serialized_name: 'ServiceEndpointPropertiesFormatElementType', type: { name: 'Composite', - class_name: 'PrivateAccessServicePropertiesFormat' + class_name: 'ServiceEndpointPropertiesFormat' } } } diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_association.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_association.rb index 0bf0e3fbc8..3c3e49b8f3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_association.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_association.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SubnetAssociation include MsRestAzure - include MsRest::JSONable # @return [String] Subnet ID. attr_accessor :id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_list_result.rb index ddae8993fb..2f9d675bd9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology.rb index 3f27885b0b..3cecdb9707 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Topology include MsRestAzure - include MsRest::JSONable # @return [String] GUID representing the operation id. attr_accessor :id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_association.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_association.rb index f75077f6b6..82df630907 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_association.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_association.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TopologyAssociation include MsRestAzure - include MsRest::JSONable # @return [String] The name of the resource that is associated with the # parent resource. attr_accessor :name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_parameters.rb index 99aba304a0..99d7a28286 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TopologyParameters include MsRestAzure - include MsRest::JSONable # @return [String] The name of the target resource group to perform # topology on. attr_accessor :target_resource_group_name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_resource.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_resource.rb index 1bd43ebe07..dc48722d1a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_resource.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/topology_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TopologyResource include MsRestAzure - include MsRest::JSONable # @return [String] Name of the resource. attr_accessor :name diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/transport_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/transport_protocol.rb index 2616eeb184..a386e89b89 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/transport_protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/transport_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -11,6 +11,7 @@ module Models module TransportProtocol Udp = "Udp" Tcp = "Tcp" + All = "All" end end end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_details.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_details.rb index 1f6f940147..fd2aeeb399 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_details.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TroubleshootingDetails include MsRestAzure - include MsRest::JSONable # @return [String] The id of the get troubleshoot operation. attr_accessor :id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_parameters.rb index 4e6e217f78..2bfa79f895 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TroubleshootingParameters include MsRestAzure - include MsRest::JSONable # @return [String] The target resource to troubleshoot. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb index b5566f3310..94cd39371d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TroubleshootingRecommendedActions include MsRestAzure - include MsRest::JSONable # @return [String] ID of the recommended action. attr_accessor :action_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_result.rb index 35fa01b7da..f112f34b1d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/troubleshooting_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TroubleshootingResult include MsRestAzure - include MsRest::JSONable # @return [DateTime] The start time of the troubleshooting. attr_accessor :start_time diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/tunnel_connection_health.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/tunnel_connection_health.rb index 2271019e5a..99898a7261 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/tunnel_connection_health.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/tunnel_connection_health.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TunnelConnectionHealth include MsRestAzure - include MsRest::JSONable # @return [String] Tunnel name. attr_accessor :tunnel diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage.rb index 89e31b57c6..f1146dcb36 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,9 @@ class Usage include MsRestAzure - include MsRest::JSONable + # @return [String] Resource identifier. + attr_accessor :id + # @return [String] An enum describing the unit of measurement. Default # value: 'Count' . attr_accessor :unit @@ -39,6 +41,14 @@ def self.mapper() name: 'Composite', class_name: 'Usage', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, unit: { required: true, is_constant: true, diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage_name.rb index 134581c5df..e4de6ed85e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage_name.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usage_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UsageName include MsRestAzure - include MsRest::JSONable # @return [String] A string describing the resource name. attr_accessor :value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usages_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usages_list_result.rb index e287b07b1e..e5219bd832 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usages_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/usages_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_parameters.rb index 5388d437da..1ae1fab39c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VerificationIPFlowParameters include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the target resource to perform next-hop on. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_result.rb index 72c3e5929d..0002addf33 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/verification_ipflow_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VerificationIPFlowResult include MsRestAzure - include MsRest::JSONable # @return [Access] Indicates whether the traffic is allowed or denied. # Possible values include: 'Allow', 'Deny' attr_accessor :access diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network.rb index ec9ce87f57..75f860dad3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Virtual Network resource. # - class VirtualNetwork < MsRestAzure::Resource + class VirtualNetwork < Resource include MsRestAzure - include MsRest::JSONable # @return [AddressSpace] The AddressSpace that contains an array of IP # address ranges that can be used by subnets. attr_accessor :address_space @@ -36,6 +35,14 @@ class VirtualNetwork < MsRestAzure::Resource # Possible values are: 'Updating', 'Deleting', and 'Failed'. attr_accessor :provisioning_state + # @return [Boolean] Indicates if DDoS protection is enabled for all the + # protected resources in a Virtual Network. + attr_accessor :enable_ddos_protection + + # @return [Boolean] Indicates if Vm protection is enabled for all the + # subnets in a Virtual Network. + attr_accessor :enable_vm_protection + # @return [String] Gets a unique read-only string that changes whenever # the resource is updated. attr_accessor :etag @@ -157,6 +164,20 @@ def self.mapper() name: 'String' } }, + enable_ddos_protection: { + required: false, + serialized_name: 'properties.enableDdosProtection', + type: { + name: 'Boolean' + } + }, + enable_vm_protection: { + required: false, + serialized_name: 'properties.enableVmProtection', + type: { + name: 'Boolean' + } + }, etag: { required: false, serialized_name: 'etag', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb new file mode 100644 index 0000000000..efd3168661 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.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::ARM::Network + module Models + # + # A reference to VirtualNetworkGateway or LocalNetworkGateway resource. + # + class VirtualNetworkConnectionGatewayReference + + include MsRestAzure + + # @return [String] The ID of VirtualNetworkGateway or LocalNetworkGateway + # resource. + attr_accessor :id + + + # + # Mapper for VirtualNetworkConnectionGatewayReference class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'virtualNetworkConnectionGatewayReference', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference', + model_properties: { + id: { + required: true, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb index 6ec37c0b9d..4dcdeadad6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A common class for general resource information # - class VirtualNetworkGateway < MsRestAzure::Resource + class VirtualNetworkGateway < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] IP configurations # for virtual network gateway. attr_accessor :ip_configurations @@ -52,14 +51,6 @@ class VirtualNetworkGateway < MsRestAzure::Resource # @return [BgpSettings] Virtual network gateway's BGP speaker settings. attr_accessor :bgp_settings - # @return [String] The radius server address property of the - # VirtualNetworkGateway resource for vpn client connection. - attr_accessor :radius_server - - # @return [String] The radius secret property of the - # VirtualNetworkGateway resource for vpn client connection. - attr_accessor :radius_secret - # @return [String] The resource GUID property of the # VirtualNetworkGateway resource. attr_accessor :resource_guid @@ -204,20 +195,6 @@ def self.mapper() class_name: 'BgpSettings' } }, - radius_server: { - required: false, - serialized_name: 'properties.radiusServer', - type: { - name: 'String' - } - }, - radius_secret: { - required: false, - serialized_name: 'properties.radiusSecret', - type: { - name: 'String' - } - }, resource_guid: { required: false, serialized_name: 'properties.resourceGuid', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb index c6ed76e26d..d298b7365b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,21 +8,23 @@ module Models # # A common class for general resource information # - class VirtualNetworkGatewayConnection < MsRestAzure::Resource + class VirtualNetworkGatewayConnection < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The authorizationKey. attr_accessor :authorization_key - # @return [VirtualNetworkGateway] + # @return [VirtualNetworkGateway] The reference to virtual network + # gateway resource. attr_accessor :virtual_network_gateway1 - # @return [VirtualNetworkGateway] + # @return [VirtualNetworkGateway] The reference to virtual network + # gateway resource. attr_accessor :virtual_network_gateway2 - # @return [LocalNetworkGateway] + # @return [LocalNetworkGateway] The reference to local network gateway + # resource. attr_accessor :local_network_gateway2 # @return [VirtualNetworkGatewayConnectionType] Gateway connection type. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb new file mode 100644 index 0000000000..721d02e255 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb @@ -0,0 +1,299 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # A common class for general resource information + # + class VirtualNetworkGatewayConnectionListEntity < Resource + + include MsRestAzure + + # @return [String] The authorizationKey. + attr_accessor :authorization_key + + # @return [VirtualNetworkConnectionGatewayReference] The reference to + # virtual network gateway resource. + attr_accessor :virtual_network_gateway1 + + # @return [VirtualNetworkConnectionGatewayReference] The reference to + # virtual network gateway resource. + attr_accessor :virtual_network_gateway2 + + # @return [VirtualNetworkConnectionGatewayReference] The reference to + # local network gateway resource. + attr_accessor :local_network_gateway2 + + # @return [VirtualNetworkGatewayConnectionType] Gateway connection type. + # Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and + # 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', + # 'ExpressRoute', 'VPNClient' + attr_accessor :connection_type + + # @return [Integer] The routing weight. + attr_accessor :routing_weight + + # @return [String] The IPSec shared key. + attr_accessor :shared_key + + # @return [VirtualNetworkGatewayConnectionStatus] Virtual network Gateway + # connection status. Possible values are 'Unknown', 'Connecting', + # 'Connected' and 'NotConnected'. Possible values include: 'Unknown', + # 'Connecting', 'Connected', 'NotConnected' + attr_accessor :connection_status + + # @return [Array] Collection of all tunnels' + # connection health status. + attr_accessor :tunnel_connection_status + + # @return [Integer] The egress bytes transferred in this connection. + attr_accessor :egress_bytes_transferred + + # @return [Integer] The ingress bytes transferred in this connection. + attr_accessor :ingress_bytes_transferred + + # @return [SubResource] The reference to peerings resource. + attr_accessor :peer + + # @return [Boolean] EnableBgp flag + attr_accessor :enable_bgp + + # @return [Boolean] Enable policy-based traffic selectors. + attr_accessor :use_policy_based_traffic_selectors + + # @return [Array] The IPSec Policies to be considered by + # this connection. + attr_accessor :ipsec_policies + + # @return [String] The resource GUID property of the + # VirtualNetworkGatewayConnection resource. + attr_accessor :resource_guid + + # @return [String] The provisioning state of the + # VirtualNetworkGatewayConnection resource. Possible values are: + # 'Updating', 'Deleting', and 'Failed'. + attr_accessor :provisioning_state + + # @return [String] Gets a unique read-only string that changes whenever + # the resource is updated. + attr_accessor :etag + + + # + # Mapper for VirtualNetworkGatewayConnectionListEntity class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualNetworkGatewayConnectionListEntity', + type: { + name: 'Composite', + class_name: 'VirtualNetworkGatewayConnectionListEntity', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + authorization_key: { + required: false, + serialized_name: 'properties.authorizationKey', + type: { + name: 'String' + } + }, + virtual_network_gateway1: { + required: true, + serialized_name: 'properties.virtualNetworkGateway1', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference' + } + }, + virtual_network_gateway2: { + required: false, + serialized_name: 'properties.virtualNetworkGateway2', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference' + } + }, + local_network_gateway2: { + required: false, + serialized_name: 'properties.localNetworkGateway2', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference' + } + }, + connection_type: { + required: true, + serialized_name: 'properties.connectionType', + type: { + name: 'String' + } + }, + routing_weight: { + required: false, + serialized_name: 'properties.routingWeight', + type: { + name: 'Number' + } + }, + shared_key: { + required: false, + serialized_name: 'properties.sharedKey', + type: { + name: 'String' + } + }, + connection_status: { + required: false, + read_only: true, + serialized_name: 'properties.connectionStatus', + type: { + name: 'String' + } + }, + tunnel_connection_status: { + required: false, + read_only: true, + serialized_name: 'properties.tunnelConnectionStatus', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TunnelConnectionHealthElementType', + type: { + name: 'Composite', + class_name: 'TunnelConnectionHealth' + } + } + } + }, + egress_bytes_transferred: { + required: false, + read_only: true, + serialized_name: 'properties.egressBytesTransferred', + type: { + name: 'Number' + } + }, + ingress_bytes_transferred: { + required: false, + read_only: true, + serialized_name: 'properties.ingressBytesTransferred', + type: { + name: 'Number' + } + }, + peer: { + required: false, + serialized_name: 'properties.peer', + type: { + name: 'Composite', + class_name: 'SubResource' + } + }, + enable_bgp: { + required: false, + serialized_name: 'properties.enableBgp', + type: { + name: 'Boolean' + } + }, + use_policy_based_traffic_selectors: { + required: false, + serialized_name: 'properties.usePolicyBasedTrafficSelectors', + type: { + name: 'Boolean' + } + }, + ipsec_policies: { + required: false, + serialized_name: 'properties.ipsecPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IpsecPolicyElementType', + type: { + name: 'Composite', + class_name: 'IpsecPolicy' + } + } + } + }, + resource_guid: { + required: false, + serialized_name: 'properties.resourceGuid', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb index 9104d1410b..a88ffbce29 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -84,6 +84,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb index 8f93ea5f69..375a18baaa 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb index dd17e96474..bc4cc06d50 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb index 9dc905dfa0..774638e2d6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # IP configuration for virtual network gateway # - class VirtualNetworkGatewayIPConfiguration < MsRestAzure::SubResource + class VirtualNetworkGatewayIPConfiguration < SubResource include MsRestAzure - include MsRest::JSONable # @return [IPAllocationMethod] The private IP allocation method. Possible # values are: 'Static' and 'Dynamic'. Possible values include: 'Static', # 'Dynamic' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb new file mode 100644 index 0000000000..6166287300 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.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::ARM::Network + module Models + # + # Response for the VirtualNetworkGatewayListConnections API service call + # + class VirtualNetworkGatewayListConnectionsResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets a list + # of VirtualNetworkGatewayConnection resources that exists in a resource + # group. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation + # results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [VirtualNetworkGatewayListConnectionsResult] 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 VirtualNetworkGatewayListConnectionsResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualNetworkGatewayListConnectionsResult', + type: { + name: 'Composite', + class_name: 'VirtualNetworkGatewayListConnectionsResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VirtualNetworkGatewayConnectionListEntityElementType', + type: { + name: 'Composite', + class_name: 'VirtualNetworkGatewayConnectionListEntity' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb index bcea63eb67..7b7375ad43 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb index 01e6fbd3bf..99e9243b0c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualNetworkGatewaySku include MsRestAzure - include MsRest::JSONable # @return [VirtualNetworkGatewaySkuName] Gateway SKU name. Possible # values include: 'Basic', 'HighPerformance', 'Standard', # 'UltraPerformance', 'VpnGw1', 'VpnGw2', 'VpnGw3' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb index 6765c1a497..383fa110d1 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb index 50e9cc7941..4164505f1c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb index 717544746b..d0bbed7056 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb index f3572563aa..190ad53290 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb index 0718f39bc8..45cd310baa 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb index cd1af80750..161f10b2f6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Peerings in a virtual network resource. # - class VirtualNetworkPeering < MsRestAzure::SubResource + class VirtualNetworkPeering < SubResource include MsRestAzure - include MsRest::JSONable # @return [Boolean] Whether the VMs in the linked virtual network space # would be able to access all the VMs in local Virtual network space. attr_accessor :allow_virtual_network_access @@ -32,7 +31,10 @@ class VirtualNetworkPeering < MsRestAzure::SubResource # true. This flag cannot be set if virtual network already has a gateway. attr_accessor :use_remote_gateways - # @return [SubResource] The reference of the remote virtual network. + # @return [SubResource] The reference of the remote virtual network. The + # remote virtual network can be in the same or different region + # (preview). See here to register for the preview and learn more + # (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). attr_accessor :remote_virtual_network # @return [VirtualNetworkPeeringState] The status of the virtual network diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb index a717456e99..ae4def3503 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb index 61ece74612..716473c536 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage.rb index 6411976925..ede6cb7a0c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualNetworkUsage include MsRestAzure - include MsRest::JSONable # @return [Float] Indicates number of IPs used from the Subnet. attr_accessor :current_value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage_name.rb index 4877776d15..4653b09107 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage_name.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_usage_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualNetworkUsageName include MsRestAzure - include MsRest::JSONable # @return [String] Localized subnet size and usage string. attr_accessor :localized_value diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb index 8f4347460a..ef96ded96d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VpnClientConfiguration include MsRestAzure - include MsRest::JSONable # @return [AddressSpace] The reference of the address space resource # which represents Address space for P2S VpnClient. attr_accessor :vpn_client_address_pool @@ -29,6 +28,14 @@ class VpnClientConfiguration # network gateway. attr_accessor :vpn_client_protocols + # @return [String] The radius server address property of the + # VirtualNetworkGateway resource for vpn client connection. + attr_accessor :radius_server_address + + # @return [String] The radius secret property of the + # VirtualNetworkGateway resource for vpn client connection. + attr_accessor :radius_server_secret + # # Mapper for VpnClientConfiguration class as Ruby Hash. @@ -93,6 +100,20 @@ def self.mapper() } } } + }, + radius_server_address: { + required: false, + serialized_name: 'radiusServerAddress', + type: { + name: 'String' + } + }, + radius_server_secret: { + required: false, + serialized_name: 'radiusServerSecret', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb index 47c367a308..d9d49ee846 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VpnClientParameters include MsRestAzure - include MsRest::JSONable # @return [ProcessorArchitecture] VPN client Processor Architecture. # Possible values are: 'AMD64' and 'X86'. Possible values include: # 'Amd64', 'X86' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_protocol.rb index 8e1fff9f7d..418ea0edad 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_protocol.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb index 5222944708..42b3f22c2d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # VPN client revoked certificate of virtual network gateway. # - class VpnClientRevokedCertificate < MsRestAzure::SubResource + class VpnClientRevokedCertificate < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The revoked VPN client certificate thumbprint. attr_accessor :thumbprint diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb index 0e0e200a00..64a43ff384 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # VPN client root certificate of virtual network gateway # - class VpnClientRootCertificate < MsRestAzure::SubResource + class VpnClientRootCertificate < SubResource include MsRestAzure - include MsRest::JSONable # @return [String] The certificate public data. attr_accessor :public_cert_data diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_device_script_parameters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_device_script_parameters.rb new file mode 100644 index 0000000000..037cd2cf62 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_device_script_parameters.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::ARM::Network + module Models + # + # Vpn device configuration script generation parameters + # + class VpnDeviceScriptParameters + + include MsRestAzure + + # @return [String] The vendor for the vpn device. + attr_accessor :vendor + + # @return [String] The device family for the vpn device. + attr_accessor :device_family + + # @return [String] The firmware version for the vpn device. + attr_accessor :firmware_version + + + # + # Mapper for VpnDeviceScriptParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VpnDeviceScriptParameters', + type: { + name: 'Composite', + class_name: 'VpnDeviceScriptParameters', + model_properties: { + vendor: { + required: false, + serialized_name: 'vendor', + type: { + name: 'String' + } + }, + device_family: { + required: false, + serialized_name: 'deviceFamily', + type: { + name: 'String' + } + }, + firmware_version: { + required: false, + serialized_name: 'firmwareVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_type.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_type.rb index 255e52ab6b..e05cc51ffb 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_type.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/module_definition.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/module_definition.rb index 2aa08fc700..a38eea1f7f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/module_definition.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb new file mode 100644 index 0000000000..9cf44bfdd3 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class NetworkInterfaceIPConfigurations + include MsRestAzure + + # + # Creates and initializes a new instance of the NetworkInterfaceIPConfigurations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @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, network_interface_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_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, network_interface_name, custom_headers = nil) + list_async(resource_group_name, network_interface_name, custom_headers).value! + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param [Hash{String => String}] 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, network_interface_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + api_version = '2017-09-01' + 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.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfiguration] operation results. + # + def get(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + response = get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers).value! + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + fail ArgumentError, 'ip_configuration_name is nil' if ip_configuration_name.nil? + api_version = '2017-09-01' + 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.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'ipConfigurationName' => ip_configuration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all ip configurations in a network interface + # + # @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 [NetworkInterfaceIPConfigurationListResult] 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 + + # + # Get all ip configurations in a network interface + # + # @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 + + # + # Get all ip configurations in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfigurationListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = list_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb new file mode 100644 index 0000000000..d92477f7f6 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.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::ARM::Network + # + # Network Client + # + class NetworkInterfaceLoadBalancers + include MsRestAzure + + # + # Creates and initializes a new instance of the NetworkInterfaceLoadBalancers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # List all load balancers in a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @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, network_interface_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items + end + + # + # List all load balancers in a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_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, network_interface_name, custom_headers = nil) + list_async(resource_group_name, network_interface_name, custom_headers).value! + end + + # + # List all load balancers in a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param [Hash{String => String}] 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, network_interface_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + api_version = '2017-09-01' + 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.Network/networkInterfaces/{networkInterfaceName}/loadBalancers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceLoadBalancerListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 load balancers in a network interface. + # + # @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 [NetworkInterfaceLoadBalancerListResult] 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 + + # + # List all load balancers in a network interface. + # + # @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 + + # + # List all load balancers in a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceLoadBalancerListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 load balancers in a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceLoadBalancerListResult] which provide lazy access to + # pages of the response. + # + def list_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = list_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb index 73d79fdb86..abeab3f8e2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, network_interface_name, expand = nil def get_async(resource_group_name, network_interface_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -794,7 +794,7 @@ def begin_delete_with_http_info(resource_group_name, network_interface_name, cus def begin_delete_async(resource_group_name, network_interface_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -882,7 +882,7 @@ def begin_create_or_update_async(resource_group_name, network_interface_name, pa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -992,7 +992,7 @@ def begin_get_effective_route_table_with_http_info(resource_group_name, network_ def begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1083,7 +1083,7 @@ def begin_list_effective_network_security_groups_with_http_info(resource_group_n def begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb index 870dc97ff4..e072bca4e7 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -36,6 +36,12 @@ class NetworkManagementClient < MsRestAzure::AzureServiceClient # @return [ApplicationGateways] application_gateways attr_reader :application_gateways + # @return [ApplicationSecurityGroups] application_security_groups + attr_reader :application_security_groups + + # @return [AvailableEndpointServices] available_endpoint_services + attr_reader :available_endpoint_services + # @return [ExpressRouteCircuitAuthorizations] # express_route_circuit_authorizations attr_reader :express_route_circuit_authorizations @@ -52,25 +58,52 @@ class NetworkManagementClient < MsRestAzure::AzureServiceClient # @return [LoadBalancers] load_balancers attr_reader :load_balancers + # @return [LoadBalancerBackendAddressPools] + # load_balancer_backend_address_pools + attr_reader :load_balancer_backend_address_pools + + # @return [LoadBalancerFrontendIPConfigurations] + # load_balancer_frontend_ipconfigurations + attr_reader :load_balancer_frontend_ipconfigurations + + # @return [InboundNatRules] inbound_nat_rules + attr_reader :inbound_nat_rules + + # @return [LoadBalancerLoadBalancingRules] + # load_balancer_load_balancing_rules + attr_reader :load_balancer_load_balancing_rules + + # @return [LoadBalancerNetworkInterfaces] load_balancer_network_interfaces + attr_reader :load_balancer_network_interfaces + + # @return [LoadBalancerProbes] load_balancer_probes + attr_reader :load_balancer_probes + # @return [NetworkInterfaces] network_interfaces attr_reader :network_interfaces + # @return [NetworkInterfaceIPConfigurations] + # network_interface_ipconfigurations + attr_reader :network_interface_ipconfigurations + + # @return [NetworkInterfaceLoadBalancers] network_interface_load_balancers + attr_reader :network_interface_load_balancers + # @return [NetworkSecurityGroups] network_security_groups attr_reader :network_security_groups # @return [SecurityRules] security_rules attr_reader :security_rules + # @return [DefaultSecurityRules] default_security_rules + attr_reader :default_security_rules + # @return [NetworkWatchers] network_watchers attr_reader :network_watchers # @return [PacketCaptures] packet_captures attr_reader :packet_captures - # @return [AvailablePrivateAccessServices] - # available_private_access_services - attr_reader :available_private_access_services - # @return [PublicIPAddresses] public_ipaddresses attr_reader :public_ipaddresses @@ -125,17 +158,27 @@ def initialize(credentials = nil, base_url = nil, options = nil) @credentials = credentials @application_gateways = ApplicationGateways.new(self) + @application_security_groups = ApplicationSecurityGroups.new(self) + @available_endpoint_services = AvailableEndpointServices.new(self) @express_route_circuit_authorizations = ExpressRouteCircuitAuthorizations.new(self) @express_route_circuit_peerings = ExpressRouteCircuitPeerings.new(self) @express_route_circuits = ExpressRouteCircuits.new(self) @express_route_service_providers = ExpressRouteServiceProviders.new(self) @load_balancers = LoadBalancers.new(self) + @load_balancer_backend_address_pools = LoadBalancerBackendAddressPools.new(self) + @load_balancer_frontend_ipconfigurations = LoadBalancerFrontendIPConfigurations.new(self) + @inbound_nat_rules = InboundNatRules.new(self) + @load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRules.new(self) + @load_balancer_network_interfaces = LoadBalancerNetworkInterfaces.new(self) + @load_balancer_probes = LoadBalancerProbes.new(self) @network_interfaces = NetworkInterfaces.new(self) + @network_interface_ipconfigurations = NetworkInterfaceIPConfigurations.new(self) + @network_interface_load_balancers = NetworkInterfaceLoadBalancers.new(self) @network_security_groups = NetworkSecurityGroups.new(self) @security_rules = SecurityRules.new(self) + @default_security_rules = DefaultSecurityRules.new(self) @network_watchers = NetworkWatchers.new(self) @packet_captures = PacketCaptures.new(self) - @available_private_access_services = AvailablePrivateAccessServices.new(self) @public_ipaddresses = PublicIPAddresses.new(self) @route_filters = RouteFilters.new(self) @route_filter_rules = RouteFilterRules.new(self) @@ -211,7 +254,8 @@ def make_request_async(method, path, options = {}) end # - # Checks whether a domain name in the cloudapp.net zone is available for use. + # Checks whether a domain name in the cloudapp.azure.com zone is available for + # use. # # @param location [String] The location of the domain name. # @param domain_name_label [String] The domain name to be verified. It must @@ -221,13 +265,14 @@ def make_request_async(method, path, options = {}) # # @return [DnsNameAvailabilityResult] operation results. # - def check_dns_name_availability(location, domain_name_label = nil, custom_headers = nil) + def check_dns_name_availability(location, domain_name_label, custom_headers = nil) response = check_dns_name_availability_async(location, domain_name_label, custom_headers).value! response.body unless response.nil? end # - # Checks whether a domain name in the cloudapp.net zone is available for use. + # Checks whether a domain name in the cloudapp.azure.com zone is available for + # use. # # @param location [String] The location of the domain name. # @param domain_name_label [String] The domain name to be verified. It must @@ -237,12 +282,13 @@ def check_dns_name_availability(location, domain_name_label = nil, custom_header # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def check_dns_name_availability_with_http_info(location, domain_name_label = nil, custom_headers = nil) + def check_dns_name_availability_with_http_info(location, domain_name_label, custom_headers = nil) check_dns_name_availability_async(location, domain_name_label, custom_headers).value! end # - # Checks whether a domain name in the cloudapp.net zone is available for use. + # Checks whether a domain name in the cloudapp.azure.com zone is available for + # use. # # @param location [String] The location of the domain name. # @param domain_name_label [String] The domain name to be verified. It must @@ -252,9 +298,10 @@ def check_dns_name_availability_with_http_info(location, domain_name_label = nil # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def check_dns_name_availability_async(location, domain_name_label = nil, custom_headers = nil) + def check_dns_name_availability_async(location, domain_name_label, custom_headers = nil) fail ArgumentError, 'location is nil' if location.nil? - api_version = '2017-06-01' + fail ArgumentError, 'domain_name_label is nil' if domain_name_label.nil? + api_version = '2017-09-01' fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb index de705f5cff..e3e8e45f93 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -109,7 +109,7 @@ def get_with_http_info(resource_group_name, network_security_group_name, expand def get_async(resource_group_name, network_security_group_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -240,7 +240,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -327,7 +327,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -420,7 +420,7 @@ def begin_delete_with_http_info(resource_group_name, network_security_group_name def begin_delete_async(resource_group_name, network_security_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -511,7 +511,7 @@ def begin_create_or_update_async(resource_group_name, network_security_group_nam fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb index 25b89e23b6..a0a2c8cb5c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -70,7 +70,7 @@ def create_or_update_async(resource_group_name, network_watcher_name, parameters fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -180,7 +180,7 @@ def get_with_http_info(resource_group_name, network_watcher_name, custom_headers def get_async(resource_group_name, network_watcher_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -305,7 +305,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -388,7 +388,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -486,7 +486,7 @@ def get_topology_async(resource_group_name, network_watcher_name, parameters, cu fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -931,6 +931,107 @@ def check_connectivity_async(resource_group_name, network_watcher_name, paramete promise end + # + # Gets the relative latency score for internet service providers from a + # specified location to Azure regions. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AzureReachabilityReportParameters] Parameters that + # determine Azure reachability report configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AzureReachabilityReport] operation results. + # + def get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + response = get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AzureReachabilityReportParameters] Parameters that + # determine Azure reachability report configuration. + # @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 get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + # Send request + promise = begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::AzureReachabilityReport.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists all available internet service providers for a specified Azure region. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AvailableProvidersListParameters] Parameters that scope + # the list of available providers. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AvailableProvidersList] operation results. + # + def list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + response = list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AvailableProvidersListParameters] Parameters that scope + # the list of available providers. + # @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 list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + # Send request + promise = begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::AvailableProvidersList.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + # # Deletes the specified network watcher resource. # @@ -972,7 +1073,7 @@ def begin_delete_with_http_info(resource_group_name, network_watcher_name, custo def begin_delete_async(resource_group_name, network_watcher_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1063,7 +1164,7 @@ def begin_verify_ipflow_async(resource_group_name, network_watcher_name, paramet fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1180,7 +1281,7 @@ def begin_get_next_hop_async(resource_group_name, network_watcher_name, paramete fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1297,7 +1398,7 @@ def begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1417,7 +1518,7 @@ def begin_get_troubleshooting_async(resource_group_name, network_watcher_name, p fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1537,7 +1638,7 @@ def begin_get_troubleshooting_result_async(resource_group_name, network_watcher_ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1660,7 +1761,7 @@ def begin_set_flow_log_configuration_async(resource_group_name, network_watcher_ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1783,7 +1884,7 @@ def begin_get_flow_log_status_async(resource_group_name, network_watcher_name, p fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1912,7 +2013,7 @@ def begin_check_connectivity_async(resource_group_name, network_watcher_name, pa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1980,5 +2081,254 @@ def begin_check_connectivity_async(resource_group_name, network_watcher_name, pa promise.execute end + # + # Gets the relative latency score for internet service providers from a + # specified location to Azure regions. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AzureReachabilityReportParameters] Parameters that + # determine Azure reachability report configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AzureReachabilityReport] operation results. + # + def begin_get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + response = begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the relative latency score for internet service providers from a + # specified location to Azure regions. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AzureReachabilityReportParameters] Parameters that + # determine Azure reachability report configuration. + # @param custom_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_get_azure_reachability_report_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers).value! + end + + # + # Gets the relative latency score for internet service providers from a + # specified location to Azure regions. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AzureReachabilityReportParameters] Parameters that + # determine Azure reachability report configuration. + # @param [Hash{String => String}] 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_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2017-09-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Network::Models::AzureReachabilityReportParameters.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.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Network::Models::AzureReachabilityReport.mapper() + result.body = @client.deserialize(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::ARM::Network::Models::AzureReachabilityReport.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 available internet service providers for a specified Azure region. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AvailableProvidersListParameters] Parameters that scope + # the list of available providers. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AvailableProvidersList] operation results. + # + def begin_list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + response = begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all available internet service providers for a specified Azure region. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AvailableProvidersListParameters] Parameters that scope + # the list of available providers. + # @param custom_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_list_available_providers_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers).value! + end + + # + # Lists all available internet service providers for a specified Azure region. + # + # @param resource_group_name [String] The name of the network watcher resource + # group. + # @param network_watcher_name [String] The name of the network watcher + # resource. + # @param parameters [AvailableProvidersListParameters] Parameters that scope + # the list of available providers. + # @param [Hash{String => String}] 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_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2017-09-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Network::Models::AvailableProvidersListParameters.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.Network/networkWatchers/{networkWatcherName}/availableProvidersList' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Network::Models::AvailableProvidersList.mapper() + result.body = @client.deserialize(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::ARM::Network::Models::AvailableProvidersList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_network/lib/generated/azure_mgmt_network/packet_captures.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/packet_captures.rb index cdd1e0be35..fbd4a5454e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/packet_captures.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/packet_captures.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -115,7 +115,7 @@ def get_async(resource_group_name, network_watcher_name, packet_capture_name, cu fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -337,7 +337,7 @@ def list_with_http_info(resource_group_name, network_watcher_name, custom_header def list_async(resource_group_name, network_watcher_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -439,7 +439,7 @@ def begin_create_async(resource_group_name, network_watcher_name, packet_capture fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -542,7 +542,7 @@ def begin_delete_async(resource_group_name, network_watcher_name, packet_capture fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -626,7 +626,7 @@ def begin_stop_async(resource_group_name, network_watcher_name, packet_capture_n fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -717,7 +717,7 @@ def begin_get_status_async(resource_group_name, network_watcher_name, packet_cap fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb index b83664be16..291c1785af 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, public_ip_address_name, expand = nil def get_async(resource_group_name, public_ip_address_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -729,7 +729,7 @@ def begin_delete_with_http_info(resource_group_name, public_ip_address_name, cus def begin_delete_async(resource_group_name, public_ip_address_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -817,7 +817,7 @@ def begin_create_or_update_async(resource_group_name, public_ip_address_name, pa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb index 6c10f94e47..66c61e3c3e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -107,7 +107,7 @@ def get_async(resource_group_name, route_filter_name, rule_name, custom_headers fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -294,7 +294,7 @@ def list_by_route_filter_with_http_info(resource_group_name, route_filter_name, def list_by_route_filter_async(resource_group_name, route_filter_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -388,7 +388,7 @@ def begin_delete_async(resource_group_name, route_filter_name, rule_name, custom fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -480,7 +480,7 @@ def begin_create_or_update_async(resource_group_name, route_filter_name, rule_na fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? fail ArgumentError, 'route_filter_rule_parameters is nil' if route_filter_rule_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -601,7 +601,7 @@ def begin_update_async(resource_group_name, route_filter_name, rule_name, route_ fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? fail ArgumentError, 'route_filter_rule_parameters is nil' if route_filter_rule_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb index e043e265f8..ec98877543 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -107,7 +107,7 @@ def get_with_http_info(resource_group_name, route_filter_name, expand = nil, cus def get_async(resource_group_name, route_filter_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -286,7 +286,7 @@ def list_by_resource_group_with_http_info(resource_group_name, custom_headers = # def list_by_resource_group_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -369,7 +369,7 @@ def list_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -459,7 +459,7 @@ def begin_delete_with_http_info(resource_group_name, route_filter_name, custom_h def begin_delete_async(resource_group_name, route_filter_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -547,7 +547,7 @@ def begin_create_or_update_async(resource_group_name, route_filter_name, route_f fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'route_filter_parameters is nil' if route_filter_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -664,7 +664,7 @@ def begin_update_async(resource_group_name, route_filter_name, route_filter_para fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'route_filter_parameters is nil' if route_filter_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb index c77ec11d45..191a8ab1f6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, route_table_name, expand = nil, cust def get_async(resource_group_name, route_table_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -237,7 +237,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -410,7 +410,7 @@ def begin_delete_with_http_info(resource_group_name, route_table_name, custom_he def begin_delete_async(resource_group_name, route_table_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -498,7 +498,7 @@ def begin_create_or_update_async(resource_group_name, route_table_name, paramete fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb index ee99260f57..22fc0c56d1 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -107,7 +107,7 @@ def get_async(resource_group_name, route_table_name, route_name, custom_headers fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -246,7 +246,7 @@ def list_with_http_info(resource_group_name, route_table_name, custom_headers = def list_async(resource_group_name, route_table_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -340,7 +340,7 @@ def begin_delete_async(resource_group_name, route_table_name, route_name, custom fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -432,7 +432,7 @@ def begin_create_or_update_async(resource_group_name, route_table_name, route_na fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? fail ArgumentError, 'route_parameters is nil' if route_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb index 77980315a1..328fb82667 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -112,7 +112,7 @@ def get_async(resource_group_name, network_security_group_name, security_rule_na fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -256,7 +256,7 @@ def list_with_http_info(resource_group_name, network_security_group_name, custom def list_async(resource_group_name, network_security_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -353,7 +353,7 @@ def begin_delete_async(resource_group_name, network_security_group_name, securit fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -448,7 +448,7 @@ def begin_create_or_update_async(resource_group_name, network_security_group_nam fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil? fail ArgumentError, 'security_rule_parameters is nil' if security_rule_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb index 81fa36602d..f85f3bab8b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -110,7 +110,7 @@ def get_async(resource_group_name, virtual_network_name, subnet_name, expand = n fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'subnet_name is nil' if subnet_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -249,7 +249,7 @@ def list_with_http_info(resource_group_name, virtual_network_name, custom_header def list_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -343,7 +343,7 @@ def begin_delete_async(resource_group_name, virtual_network_name, subnet_name, c fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'subnet_name is nil' if subnet_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -435,7 +435,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_name, subn fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'subnet_name is nil' if subnet_name.nil? fail ArgumentError, 'subnet_parameters is nil' if subnet_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb index 9bdf4fdb72..8aa75fcdce 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -22,7 +22,7 @@ def initialize(client) attr_reader :client # - # Lists compute usages for a subscription. + # List network usages for a subscription. # # @param location [String] The location where resource usage is queried. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -36,7 +36,7 @@ def list(location, custom_headers = nil) end # - # Lists compute usages for a subscription. + # List network usages for a subscription. # # @param location [String] The location where resource usage is queried. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -49,7 +49,7 @@ def list_with_http_info(location, custom_headers = nil) end # - # Lists compute usages for a subscription. + # List network usages for a subscription. # # @param location [String] The location where resource usage is queried. # @param [Hash{String => String}] A hash of custom headers that will be added @@ -59,7 +59,7 @@ def list_with_http_info(location, custom_headers = nil) # def list_async(location, custom_headers = nil) fail ArgumentError, 'location is nil' if location.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -109,7 +109,7 @@ def list_async(location, custom_headers = nil) end # - # Lists compute usages for a subscription. + # List network usages for a subscription. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -124,7 +124,7 @@ def list_next(next_page_link, custom_headers = nil) end # - # Lists compute usages for a subscription. + # List network usages for a subscription. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -138,7 +138,7 @@ def list_next_with_http_info(next_page_link, custom_headers = nil) end # - # Lists compute usages for a subscription. + # List network usages for a subscription. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -196,7 +196,7 @@ def list_next_async(next_page_link, custom_headers = nil) end # - # Lists compute usages for a subscription. + # List network usages for a subscription. # # @param location [String] The location where resource usage is queried. # @param custom_headers [Hash{String => String}] A hash of custom headers that diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/version.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/version.rb index cdf0014104..a1cd485bec 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/version.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Network - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb index 74dc975ad4..fc73016cf4 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -115,7 +115,7 @@ def get_with_http_info(resource_group_name, virtual_network_gateway_connection_n def get_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -307,7 +307,7 @@ def get_shared_key_with_http_info(resource_group_name, virtual_network_gateway_c def get_shared_key_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -397,7 +397,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -554,7 +554,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_gateway_co fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -666,7 +666,7 @@ def begin_delete_with_http_info(resource_group_name, virtual_network_gateway_con def begin_delete_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -766,7 +766,7 @@ def begin_set_shared_key_async(resource_group_name, virtual_network_gateway_conn fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -898,7 +898,7 @@ def begin_reset_shared_key_async(resource_group_name, virtual_network_gateway_co fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb index 3e2a713113..a9f4324a0b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -114,7 +114,7 @@ def get_with_http_info(resource_group_name, virtual_network_gateway_name, custom def get_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -241,7 +241,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -290,6 +290,100 @@ def list_async(resource_group_name, custom_headers = nil) promise.execute end + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @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_connections(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + first_page = list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_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_connections_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param [Hash{String => String}] 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_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? + api_version = '2017-09-01' + 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::VirtualNetworkGatewayListConnectionsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Resets the primary of the virtual network gateway in the specified resource # group. @@ -449,6 +543,58 @@ def generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name promise end + # + # Gets pre-generated VPN profile for P2S client of the virtual network gateway + # in the specified resource group. The profile needs to be generated first + # using generateVpnProfile. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [String] operation results. + # + def get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + response = get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @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 get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + # Send request + promise = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + # # The GetBgpPeerStatus operation retrieves the status of all BGP peers. # @@ -495,6 +641,106 @@ def get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, promise end + # + # Gets a xml format representation for supported vpn devices. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [String] operation results. + # + def supported_vpn_devices(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + response = supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a xml format representation for supported vpn devices. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def supported_vpn_devices_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + end + + # + # Gets a xml format representation for supported vpn devices. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? + api_version = '2017-09-01' + 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 retrieves a list of routes the virtual network gateway has # learned, including routes learned from BGP peers. @@ -587,6 +833,125 @@ def get_advertised_routes_async(resource_group_name, virtual_network_gateway_nam promise end + # + # Gets a xml format representation for vpn device configuration script. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_connection_name [String] The name of the + # virtual network gateway connection for which the configuration script is + # generated. + # @param parameters [VpnDeviceScriptParameters] Parameters supplied to the + # generate vpn device script operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [String] operation results. + # + def vpn_device_configuration_script(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers = nil) + response = vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a xml format representation for vpn device configuration script. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_connection_name [String] The name of the + # virtual network gateway connection for which the configuration script is + # generated. + # @param parameters [VpnDeviceScriptParameters] Parameters supplied to the + # generate vpn device script 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 vpn_device_configuration_script_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers = nil) + vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers).value! + end + + # + # Gets a xml format representation for vpn device configuration script. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_connection_name [String] The name of the + # virtual network gateway connection for which the configuration script is + # generated. + # @param parameters [VpnDeviceScriptParameters] Parameters supplied to the + # generate vpn device script 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 vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2017-09-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Network::Models::VpnDeviceScriptParameters.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.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 virtual network gateway in the specified resource group. # @@ -639,7 +1004,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_gateway_na fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -751,7 +1116,7 @@ def begin_delete_with_http_info(resource_group_name, virtual_network_gateway_nam def begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -844,7 +1209,7 @@ def begin_reset_with_http_info(resource_group_name, virtual_network_gateway_name def begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -948,7 +1313,7 @@ def begin_generatevpnclientpackage_async(resource_group_name, virtual_network_ga fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1067,7 +1432,7 @@ def begin_generate_vpn_profile_async(resource_group_name, virtual_network_gatewa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1102,7 +1467,113 @@ def begin_generate_vpn_profile_async(resource_group_name, virtual_network_gatewa http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + 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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 pre-generated VPN profile for P2S client of the virtual network gateway + # in the specified resource group. The profile needs to be generated first + # using generateVpnProfile. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [String] operation results. + # + def begin_get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + response = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets pre-generated VPN profile for P2S client of the virtual network gateway + # in the specified resource group. The profile needs to be generated first + # using generateVpnProfile. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_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_get_vpn_profile_package_url_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + end + + # + # Gets pre-generated VPN profile for P2S client of the virtual network gateway + # in the specified resource group. The profile needs to be generated first + # using generateVpnProfile. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param [Hash{String => String}] 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_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? + api_version = '2017-09-01' + 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -1179,7 +1650,7 @@ def begin_get_bgp_peer_status_with_http_info(resource_group_name, virtual_networ def begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1276,7 +1747,7 @@ def begin_get_learned_routes_with_http_info(resource_group_name, virtual_network def begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1377,7 +1848,7 @@ def begin_get_advertised_routes_async(resource_group_name, virtual_network_gatew fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'peer is nil' if peer.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1513,6 +1984,93 @@ def list_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Gets all the connections in a virtual network gateway. + # + # @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 [VirtualNetworkGatewayListConnectionsResult] operation results. + # + def list_connections_next(next_page_link, custom_headers = nil) + response = list_connections_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the connections in a virtual network gateway. + # + # @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_connections_next_with_http_info(next_page_link, custom_headers = nil) + list_connections_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the connections in a virtual network gateway. + # + # @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_connections_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::VirtualNetworkGatewayListConnectionsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Gets all virtual network gateways by resource group. # @@ -1534,5 +2092,28 @@ def list_as_lazy(resource_group_name, custom_headers = nil) end end + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualNetworkGatewayListConnectionsResult] which provide lazy + # access to pages of the response. + # + def list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + response = list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_connections_next_async(next_page_link, custom_headers) + end + page + end + end + end end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb index 4dc23305b2..27c82f1da7 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -112,7 +112,7 @@ def get_async(resource_group_name, virtual_network_name, virtual_network_peering fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'virtual_network_peering_name is nil' if virtual_network_peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -251,7 +251,7 @@ def list_with_http_info(resource_group_name, virtual_network_name, custom_header def list_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -348,7 +348,7 @@ def begin_delete_async(resource_group_name, virtual_network_name, virtual_networ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'virtual_network_peering_name is nil' if virtual_network_peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -440,7 +440,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_name, virt fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'virtual_network_peering_name is nil' if virtual_network_peering_name.nil? fail ArgumentError, 'virtual_network_peering_parameters is nil' if virtual_network_peering_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb index d94fc784d9..0ceada4876 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, virtual_network_name, expand = nil, def get_async(resource_group_name, virtual_network_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -414,7 +414,7 @@ def check_ipaddress_availability_with_http_info(resource_group_name, virtual_net def check_ipaddress_availability_async(resource_group_name, virtual_network_name, ip_address = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -505,7 +505,7 @@ def list_usage_with_http_info(resource_group_name, virtual_network_name, custom_ def list_usage_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -595,7 +595,7 @@ def begin_delete_with_http_info(resource_group_name, virtual_network_name, custo def begin_delete_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -683,7 +683,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_name, para fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-09-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_notification_hubs/azure_mgmt_notification_hubs.gemspec b/management/azure_mgmt_notification_hubs/azure_mgmt_notification_hubs.gemspec index e0861c6c0d..dbacee7fa0 100644 --- a/management/azure_mgmt_notification_hubs/azure_mgmt_notification_hubs.gemspec +++ b/management/azure_mgmt_notification_hubs/azure_mgmt_notification_hubs.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb old mode 100755 new mode 100644 index 0446f7a41c..b552d09da4 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -37,6 +37,7 @@ module Models autoload :NamespacePatchParameters, 'generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb' autoload :Sku, 'generated/azure_mgmt_notification_hubs/models/sku.rb' autoload :SharedAccessAuthorizationRuleProperties, 'generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb' + autoload :SubResource, 'generated/azure_mgmt_notification_hubs/models/sub_resource.rb' autoload :BaiduCredential, 'generated/azure_mgmt_notification_hubs/models/baidu_credential.rb' autoload :NamespaceListResult, 'generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb' autoload :NotificationHubListResult, 'generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb' diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/hubs.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/hubs.rb index ba8ff51fbd..b56ab1dfab 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/hubs.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/hubs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/access_rights.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/access_rights.rb old mode 100755 new mode 100644 index ba305fe427..c6e36fffe5 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/access_rights.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/access_rights.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb old mode 100755 new mode 100644 index 47dc03ce86..e10e535281 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AdmCredential include MsRestAzure - include MsRest::JSONable # @return [String] The client identifier. attr_accessor :client_id diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb old mode 100755 new mode 100644 index 3fd16fe306..9b54a4540e --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApnsCredential include MsRestAzure - include MsRest::JSONable # @return [String] The APNS certificate. attr_accessor :apns_certificate diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb old mode 100755 new mode 100644 index d889da73d4..049d5e49e5 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BaiduCredential include MsRestAzure - include MsRest::JSONable # @return [String] Baidu Api Key. attr_accessor :baidu_api_key diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb old mode 100755 new mode 100644 index a4846baa84..725343144e --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CheckAvailabilityParameters include MsRestAzure - include MsRest::JSONable # @return [String] Resource Id attr_accessor :id diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_result.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_result.rb old mode 100755 new mode 100644 index 4bfd84e3b5..2c23f1a944 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_result.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_availability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a CheckAvailibility resource. # - class CheckAvailabilityResult < MsRestAzure::Resource + class CheckAvailabilityResult < Resource include MsRestAzure - include MsRest::JSONable # @return [Boolean] True if the name is available and can be used to # create new Namespace/NotificationHub. Otherwise false. attr_accessor :is_availiable diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_request_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_request_parameters.rb index d2a12e7786..09467c738d 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_request_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_request_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CheckNameAvailabilityRequestParameters include MsRestAzure - include MsRest::JSONable # @return [String] Resource name attr_accessor :name diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_response.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_response.rb index 265f2a8a7d..6b31328994 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_response.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/check_name_availability_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CheckNameAvailabilityResponse include MsRestAzure - include MsRest::JSONable # @return [Boolean] Checks if the namespace name is available attr_accessor :name_available diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb old mode 100755 new mode 100644 index 2bb63c7d46..c11c5b4f62 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GcmCredential include MsRestAzure - include MsRest::JSONable # @return [String] The GCM endpoint. attr_accessor :gcm_endpoint diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb old mode 100755 new mode 100644 index 12282df2fc..6c2d566abd --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MpnsCredential include MsRestAzure - include MsRest::JSONable # @return [String] The MPNS certificate. attr_accessor :mpns_certificate diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb old mode 100755 new mode 100644 index 83c5c28d47..d3afb539d8 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Parameters supplied to the CreateOrUpdate Namespace operation. # - class NamespaceCreateOrUpdateParameters < MsRestAzure::Resource + class NamespaceCreateOrUpdateParameters < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The name of the namespace. attr_accessor :namespace_create_or_update_parameters_name diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb old mode 100755 new mode 100644 index 9128debf4c..3177a2dfd0 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb old mode 100755 new mode 100644 index 691fd80bbf..2f610a30ec --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_patch_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NamespacePatchParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags attr_accessor :tags diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb old mode 100755 new mode 100644 index 6cff2dfa7a..59f402be9b --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a Namespace resource. # - class NamespaceResource < MsRestAzure::Resource + class NamespaceResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The name of the namespace. attr_accessor :namespace_resource_name diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_type.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_type.rb old mode 100755 new mode 100644 index 35ff8f2820..325cfe6aaf --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_type.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/namespace_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb old mode 100755 new mode 100644 index ae2d1b431b..658cdff1a1 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Parameters supplied to the CreateOrUpdate NotificationHub operation. # - class NotificationHubCreateOrUpdateParameters < MsRestAzure::Resource + class NotificationHubCreateOrUpdateParameters < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The NotificationHub name. attr_accessor :notification_hub_create_or_update_parameters_name diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb old mode 100755 new mode 100644 index 31485c7391..5eb840ac73 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb old mode 100755 new mode 100644 index 65ae80c773..52e05aa963 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a NotificationHub Resource. # - class NotificationHubResource < MsRestAzure::Resource + class NotificationHubResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The NotificationHub name. attr_accessor :notification_hub_resource_name diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb old mode 100755 new mode 100644 index eaa345a2b1..267bd0e765 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/pns_credentials_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a NotificationHub PNS Credentials. # - class PnsCredentialsResource < MsRestAzure::Resource + class PnsCredentialsResource < Resource include MsRestAzure - include MsRest::JSONable # @return [ApnsCredential] The ApnsCredential of the created # NotificationHub attr_accessor :apns_credential diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb old mode 100755 new mode 100644 index a697d60dbe..2e43fc7912 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/policykey_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PolicykeyResource include MsRestAzure - include MsRest::JSONable # @return [String] Name of the key that has to be regenerated for the # Namespace/Notification Hub Authorization Rule. The value can be Primary # Key/Secondary Key. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource.rb old mode 100755 new mode 100644 index f8119fe2ee..6b996a0168 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,25 @@ module Models # Model object. # # - class Resource < MsRestAzure::Resource + class Resource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + # @return [Sku] The sku of the created namespace attr_accessor :sku diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb old mode 100755 new mode 100644 index 6287138325..ee2e0844ef --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceListKeys include MsRestAzure - include MsRest::JSONable # @return [String] PrimaryConnectionString of the AuthorizationRule. attr_accessor :primary_connection_string diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb old mode 100755 new mode 100644 index c73f00d85b..7bf1920dcd --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. # - class SharedAccessAuthorizationRuleCreateOrUpdateParameters < MsRestAzure::Resource + class SharedAccessAuthorizationRuleCreateOrUpdateParameters < Resource include MsRestAzure - include MsRest::JSONable # @return [SharedAccessAuthorizationRuleProperties] Properties of the # Namespace AuthorizationRules. attr_accessor :properties diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb old mode 100755 new mode 100644 index 3caa7c425d..a565420b9f --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb old mode 100755 new mode 100644 index e531055262..3171c31000 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SharedAccessAuthorizationRuleProperties include MsRestAzure - include MsRest::JSONable # @return [Array] The rights associated with the rule. attr_accessor :rights diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb old mode 100755 new mode 100644 index 5f618bf036..7947e8a1ac --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a Namespace AuthorizationRules. # - class SharedAccessAuthorizationRuleResource < MsRestAzure::Resource + class SharedAccessAuthorizationRuleResource < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] The rights associated with the rule. attr_accessor :rights diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb old mode 100755 new mode 100644 index ad5b8cf134..2b4a40d252 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] Name of the notification hub sku. Possible values # include: 'Free', 'Basic', 'Standard' attr_accessor :name diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb old mode 100755 new mode 100644 index 634f32d18a..1a04b14730 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sub_resource.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sub_resource.rb new file mode 100644 index 0000000000..9f0a2b0d12 --- /dev/null +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/sub_resource.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::ARM::NotificationHubs + module Models + # + # Model object. + # + # + class SubResource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + + # + # Mapper for SubResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubResource', + type: { + name: 'Composite', + class_name: 'SubResource', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb old mode 100755 new mode 100644 index f1aa120607..af84e2c214 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WnsCredential include MsRestAzure - include MsRest::JSONable # @return [String] The package ID for this credential. attr_accessor :package_sid diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/module_definition.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/module_definition.rb old mode 100755 new mode 100644 index 4881b9fd3d..75ce65ac48 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/module_definition.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/name.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/name.rb index f292261006..857a2b4031 100644 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/name.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb old mode 100755 new mode 100644 index 1db4c8e4aa..a5249f6a39 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/namespaces.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb old mode 100755 new mode 100644 index 85a5b7dc09..684aef5f37 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb old mode 100755 new mode 100644 index ee51059f20..7fb64fe776 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/version.rb b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/version.rb old mode 100755 new mode 100644 index d400503b57..0fe68e7bc6 --- a/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/version.rb +++ b/management/azure_mgmt_notification_hubs/lib/generated/azure_mgmt_notification_hubs/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::NotificationHubs - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_operational_insights/.rspec b/management/azure_mgmt_operational_insights/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_operational_insights/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_operational_insights/LICENSE.txt b/management/azure_mgmt_operational_insights/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_operational_insights/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_operational_insights/Rakefile b/management/azure_mgmt_operational_insights/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_operational_insights/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_operational_insights/azure_mgmt_operational_insights.gemspec b/management/azure_mgmt_operational_insights/azure_mgmt_operational_insights.gemspec new file mode 100644 index 0000000000..675225cb34 --- /dev/null +++ b/management/azure_mgmt_operational_insights/azure_mgmt_operational_insights.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_operational_insights/module_definition' +require 'generated/azure_mgmt_operational_insights/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_operational_insights' + spec.version = Azure::ARM::OperationalInsights::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Operational Insights Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Operational Insights.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_operational_insights/lib/azure_mgmt_operational_insights.rb b/management/azure_mgmt_operational_insights/lib/azure_mgmt_operational_insights.rb new file mode 100644 index 0000000000..50e7849be1 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/azure_mgmt_operational_insights.rb @@ -0,0 +1,8 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_operational_insights' + + + diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights.rb new file mode 100644 index 0000000000..03ff67acc3 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights.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. + +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 'generated/azure_mgmt_operational_insights/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::OperationalInsights + autoload :LinkedServices, 'generated/azure_mgmt_operational_insights/linked_services.rb' + autoload :DataSources, 'generated/azure_mgmt_operational_insights/data_sources.rb' + autoload :Workspaces, 'generated/azure_mgmt_operational_insights/workspaces.rb' + autoload :StorageInsights, 'generated/azure_mgmt_operational_insights/storage_insights.rb' + autoload :SavedSearches, 'generated/azure_mgmt_operational_insights/saved_searches.rb' + autoload :OperationalInsightsManagementClient, 'generated/azure_mgmt_operational_insights/operational_insights_management_client.rb' + + module Models + autoload :LinkTarget, 'generated/azure_mgmt_operational_insights/models/link_target.rb' + autoload :Tag, 'generated/azure_mgmt_operational_insights/models/tag.rb' + autoload :LinkedServiceListResult, 'generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb' + autoload :CoreSummary, 'generated/azure_mgmt_operational_insights/models/core_summary.rb' + autoload :DataSourceFilter, 'generated/azure_mgmt_operational_insights/models/data_source_filter.rb' + autoload :SearchSort, 'generated/azure_mgmt_operational_insights/models/search_sort.rb' + autoload :IntelligencePack, 'generated/azure_mgmt_operational_insights/models/intelligence_pack.rb' + autoload :SearchMetadataSchema, 'generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb' + autoload :MetricName, 'generated/azure_mgmt_operational_insights/models/metric_name.rb' + autoload :SearchMetadata, 'generated/azure_mgmt_operational_insights/models/search_metadata.rb' + autoload :WorkspaceListUsagesResult, 'generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb' + autoload :SavedSearch, 'generated/azure_mgmt_operational_insights/models/saved_search.rb' + autoload :WorkspaceListManagementGroupsResult, 'generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb' + autoload :SavedSearchesListResult, 'generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb' + autoload :Sku, 'generated/azure_mgmt_operational_insights/models/sku.rb' + autoload :Resource, 'generated/azure_mgmt_operational_insights/models/resource.rb' + autoload :SearchError, 'generated/azure_mgmt_operational_insights/models/search_error.rb' + autoload :ProxyResource, 'generated/azure_mgmt_operational_insights/models/proxy_resource.rb' + autoload :StorageInsightStatus, 'generated/azure_mgmt_operational_insights/models/storage_insight_status.rb' + autoload :DataSourceListResult, 'generated/azure_mgmt_operational_insights/models/data_source_list_result.rb' + autoload :SearchResultsResponse, 'generated/azure_mgmt_operational_insights/models/search_results_response.rb' + autoload :UsageMetric, 'generated/azure_mgmt_operational_insights/models/usage_metric.rb' + autoload :SearchSchemaValue, 'generated/azure_mgmt_operational_insights/models/search_schema_value.rb' + autoload :WorkspaceListResult, 'generated/azure_mgmt_operational_insights/models/workspace_list_result.rb' + autoload :SearchGetSchemaResponse, 'generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb' + autoload :SharedKeys, 'generated/azure_mgmt_operational_insights/models/shared_keys.rb' + autoload :SearchHighlight, 'generated/azure_mgmt_operational_insights/models/search_highlight.rb' + autoload :StorageInsightListResult, 'generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb' + autoload :SearchParameters, 'generated/azure_mgmt_operational_insights/models/search_parameters.rb' + autoload :ManagementGroup, 'generated/azure_mgmt_operational_insights/models/management_group.rb' + autoload :StorageAccount, 'generated/azure_mgmt_operational_insights/models/storage_account.rb' + autoload :LinkedService, 'generated/azure_mgmt_operational_insights/models/linked_service.rb' + autoload :DataSource, 'generated/azure_mgmt_operational_insights/models/data_source.rb' + autoload :Workspace, 'generated/azure_mgmt_operational_insights/models/workspace.rb' + autoload :StorageInsight, 'generated/azure_mgmt_operational_insights/models/storage_insight.rb' + autoload :DataSourceKind, 'generated/azure_mgmt_operational_insights/models/data_source_kind.rb' + autoload :SkuNameEnum, 'generated/azure_mgmt_operational_insights/models/sku_name_enum.rb' + autoload :EntityStatus, 'generated/azure_mgmt_operational_insights/models/entity_status.rb' + autoload :SearchSortEnum, 'generated/azure_mgmt_operational_insights/models/search_sort_enum.rb' + autoload :StorageInsightState, 'generated/azure_mgmt_operational_insights/models/storage_insight_state.rb' + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/data_sources.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/data_sources.rb new file mode 100644 index 0000000000..48e1ba2cb8 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/data_sources.rb @@ -0,0 +1,567 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + # + # Operational Insights Client + # + class DataSources + include MsRestAzure + + # + # Creates and initializes a new instance of the DataSources class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient + attr_reader :client + + # + # Create or update a data source. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that will + # contain the datasource + # @param data_source_name [String] The name of the datasource resource. + # @param parameters [DataSource] The parameters required to create or update a + # datasource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataSource] operation results. + # + def create_or_update(resource_group_name, workspace_name, data_source_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, workspace_name, data_source_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update a data source. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that will + # contain the datasource + # @param data_source_name [String] The name of the datasource resource. + # @param parameters [DataSource] The parameters required to create or update a + # datasource. + # @param custom_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, workspace_name, data_source_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, workspace_name, data_source_name, parameters, custom_headers).value! + end + + # + # Create or update a data source. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that will + # contain the datasource + # @param data_source_name [String] The name of the datasource resource. + # @param parameters [DataSource] The parameters required to create or update a + # datasource. + # @param [Hash{String => String}] 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, workspace_name, data_source_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'data_source_name is nil' if data_source_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2015-11-01-preview' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::OperationalInsights::Models::DataSource.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.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataSourceName' => data_source_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::DataSource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::DataSource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a data source instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the datasource. + # @param data_source_name [String] Name of the datasource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, workspace_name, data_source_name, custom_headers = nil) + response = delete_async(resource_group_name, workspace_name, data_source_name, custom_headers).value! + nil + end + + # + # Deletes a data source instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the datasource. + # @param data_source_name [String] Name of the datasource. + # @param custom_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, workspace_name, data_source_name, custom_headers = nil) + delete_async(resource_group_name, workspace_name, data_source_name, custom_headers).value! + end + + # + # Deletes a data source instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the datasource. + # @param data_source_name [String] Name of the datasource. + # @param [Hash{String => String}] 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, workspace_name, data_source_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'data_source_name is nil' if data_source_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataSourceName' => data_source_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a datasource instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the datasource. + # @param data_source_name [String] Name of the datasource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataSource] operation results. + # + def get(resource_group_name, workspace_name, data_source_name, custom_headers = nil) + response = get_async(resource_group_name, workspace_name, data_source_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a datasource instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the datasource. + # @param data_source_name [String] Name of the datasource + # @param custom_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, workspace_name, data_source_name, custom_headers = nil) + get_async(resource_group_name, workspace_name, data_source_name, custom_headers).value! + end + + # + # Gets a datasource instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the datasource. + # @param data_source_name [String] Name of the datasource + # @param [Hash{String => String}] 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, workspace_name, data_source_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'data_source_name is nil' if data_source_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataSourceName' => data_source_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::DataSource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the first page of data source instances in a workspace with the link to + # the next page. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The workspace that contains the data sources. + # @param filter [String] The filter to apply on the operation. + # @param skiptoken [String] Starting point of the collection of data source + # instances. + # @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_workspace(resource_group_name, workspace_name, filter, skiptoken = nil, custom_headers = nil) + first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, filter, skiptoken, custom_headers) + first_page.get_all_items + end + + # + # Gets the first page of data source instances in a workspace with the link to + # the next page. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The workspace that contains the data sources. + # @param filter [String] The filter to apply on the operation. + # @param skiptoken [String] Starting point of the collection of data source + # instances. + # @param custom_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_workspace_with_http_info(resource_group_name, workspace_name, filter, skiptoken = nil, custom_headers = nil) + list_by_workspace_async(resource_group_name, workspace_name, filter, skiptoken, custom_headers).value! + end + + # + # Gets the first page of data source instances in a workspace with the link to + # the next page. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The workspace that contains the data sources. + # @param filter [String] The filter to apply on the operation. + # @param skiptoken [String] Starting point of the collection of data source + # instances. + # @param [Hash{String => String}] 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_workspace_async(resource_group_name, workspace_name, filter, skiptoken = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/dataSources' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'$filter' => filter,'$skiptoken' => skiptoken,'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::DataSourceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the first page of data source instances in a workspace with the link to + # the next page. + # + # @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 [DataSourceListResult] operation results. + # + def list_by_workspace_next(next_page_link, custom_headers = nil) + response = list_by_workspace_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the first page of data source instances in a workspace with the link to + # the next page. + # + # @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_workspace_next_with_http_info(next_page_link, custom_headers = nil) + list_by_workspace_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the first page of data source instances in a workspace with the link to + # the next page. + # + # @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_workspace_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::DataSourceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the first page of data source instances in a workspace with the link to + # the next page. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The workspace that contains the data sources. + # @param filter [String] The filter to apply on the operation. + # @param skiptoken [String] Starting point of the collection of data source + # instances. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataSourceListResult] which provide lazy access to pages of the + # response. + # + def list_by_workspace_as_lazy(resource_group_name, workspace_name, filter, skiptoken = nil, custom_headers = nil) + response = list_by_workspace_async(resource_group_name, workspace_name, filter, skiptoken, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_workspace_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/linked_services.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/linked_services.rb new file mode 100644 index 0000000000..0f0c620b94 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/linked_services.rb @@ -0,0 +1,440 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + # + # Operational Insights Client + # + class LinkedServices + include MsRestAzure + + # + # Creates and initializes a new instance of the LinkedServices class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient + attr_reader :client + + # + # Create or update a linked service. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that will + # contain the linkedServices resource + # @param linked_service_name [String] Name of the linkedServices resource + # @param parameters [LinkedService] The parameters required to create or update + # a linked service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LinkedService] operation results. + # + def create_or_update(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update a linked service. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that will + # contain the linkedServices resource + # @param linked_service_name [String] Name of the linkedServices resource + # @param parameters [LinkedService] The parameters required to create or update + # a linked 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 create_or_update_with_http_info(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers).value! + end + + # + # Create or update a linked service. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that will + # contain the linkedServices resource + # @param linked_service_name [String] Name of the linkedServices resource + # @param parameters [LinkedService] The parameters required to create or update + # a linked 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 create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'linked_service_name is nil' if linked_service_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-11-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.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.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'linkedServiceName' => linked_service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a linked service instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linkedServices resource + # @param linked_service_name [String] Name of the linked 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, workspace_name, linked_service_name, custom_headers = nil) + response = delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value! + nil + end + + # + # Deletes a linked service instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linkedServices resource + # @param linked_service_name [String] Name of the linked 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, workspace_name, linked_service_name, custom_headers = nil) + delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value! + end + + # + # Deletes a linked service instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linkedServices resource + # @param linked_service_name [String] Name of the linked 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, workspace_name, linked_service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'linked_service_name is nil' if linked_service_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'linkedServiceName' => linked_service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a linked service instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linkedServices resource + # @param linked_service_name [String] Name of the linked service. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LinkedService] operation results. + # + def get(resource_group_name, workspace_name, linked_service_name, custom_headers = nil) + response = get_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a linked service instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linkedServices resource + # @param linked_service_name [String] Name of the linked 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, workspace_name, linked_service_name, custom_headers = nil) + get_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value! + end + + # + # Gets a linked service instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linkedServices resource + # @param linked_service_name [String] Name of the linked 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, workspace_name, linked_service_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'linked_service_name is nil' if linked_service_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'linkedServiceName' => linked_service_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 linked services instances in a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linked services. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LinkedServiceListResult] operation results. + # + def list_by_workspace(resource_group_name, workspace_name, custom_headers = nil) + response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the linked services instances in a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linked services. + # @param custom_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_workspace_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Gets the linked services instances in a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace that + # contains the linked services. + # @param [Hash{String => String}] 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_workspace_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/linkedServices' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::LinkedServiceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_operational_insights/lib/generated/azure_mgmt_operational_insights/models/core_summary.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/core_summary.rb new file mode 100644 index 0000000000..87f480e3dc --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/core_summary.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::ARM::OperationalInsights + module Models + # + # The core summary of a search. + # + class CoreSummary + + include MsRestAzure + + # @return [String] The status of a core summary. + attr_accessor :status + + # @return [Integer] The number of documents of a core summary. + attr_accessor :number_of_documents + + + # + # Mapper for CoreSummary class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CoreSummary', + type: { + name: 'Composite', + class_name: 'CoreSummary', + model_properties: { + status: { + required: false, + serialized_name: 'Status', + type: { + name: 'String' + } + }, + number_of_documents: { + required: true, + serialized_name: 'NumberOfDocuments', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source.rb new file mode 100644 index 0000000000..8f4f9e70b8 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source.rb @@ -0,0 +1,108 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # Datasources under OMS Workspace. + # + class DataSource < ProxyResource + + include MsRestAzure + + # @return The data source properties in raw json format, each kind of + # data source have it's own schema. + attr_accessor :properties + + # @return [String] The ETag of the data source. + attr_accessor :e_tag + + # @return [DataSourceKind] Possible values include: 'AzureActivityLog', + # 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + # 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + # 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + # 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + # 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + attr_accessor :kind + + + # + # Mapper for DataSource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataSource', + type: { + name: 'Composite', + class_name: 'DataSource', + 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' + } + } + } + }, + properties: { + required: true, + serialized_name: 'properties', + type: { + name: 'Object' + } + }, + e_tag: { + required: false, + serialized_name: 'eTag', + type: { + name: 'String' + } + }, + kind: { + required: true, + serialized_name: 'kind', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_filter.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_filter.rb new file mode 100644 index 0000000000..6896886145 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_filter.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # DataSource filter. Right now, only filter by kind is supported. + # + class DataSourceFilter + + include MsRestAzure + + # @return [DataSourceKind] Possible values include: 'AzureActivityLog', + # 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + # 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + # 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + # 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + # 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + attr_accessor :kind + + + # + # Mapper for DataSourceFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataSourceFilter', + type: { + name: 'Composite', + class_name: 'DataSourceFilter', + model_properties: { + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_kind.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_kind.rb new file mode 100644 index 0000000000..635daa203f --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_kind.rb @@ -0,0 +1,29 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # Defines values for DataSourceKind + # + module DataSourceKind + AzureActivityLog = "AzureActivityLog" + ChangeTrackingPath = "ChangeTrackingPath" + ChangeTrackingDefaultPath = "ChangeTrackingDefaultPath" + ChangeTrackingDefaultRegistry = "ChangeTrackingDefaultRegistry" + ChangeTrackingCustomRegistry = "ChangeTrackingCustomRegistry" + CustomLog = "CustomLog" + CustomLogCollection = "CustomLogCollection" + GenericDataSource = "GenericDataSource" + IISLogs = "IISLogs" + LinuxPerformanceObject = "LinuxPerformanceObject" + LinuxPerformanceCollection = "LinuxPerformanceCollection" + LinuxSyslog = "LinuxSyslog" + LinuxSyslogCollection = "LinuxSyslogCollection" + WindowsEvent = "WindowsEvent" + WindowsPerformanceCounter = "WindowsPerformanceCounter" + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb new file mode 100644 index 0000000000..8d05e7c026 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/data_source_list_result.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::ARM::OperationalInsights + module Models + # + # The list data source by workspace operation response. + # + class DataSourceListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of datasources. + attr_accessor :value + + # @return [String] The link (url) to the next page of datasources. + 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 [DataSourceListResult] 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 DataSourceListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataSourceListResult', + type: { + name: 'Composite', + class_name: 'DataSourceListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DataSourceElementType', + type: { + name: 'Composite', + class_name: 'DataSource' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/entity_status.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/entity_status.rb new file mode 100644 index 0000000000..5916c66166 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/entity_status.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::ARM::OperationalInsights + module Models + # + # Defines values for EntityStatus + # + module EntityStatus + Creating = "Creating" + Succeeded = "Succeeded" + Failed = "Failed" + Canceled = "Canceled" + Deleting = "Deleting" + ProvisioningAccount = "ProvisioningAccount" + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb new file mode 100644 index 0000000000..afa1fbb983 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/intelligence_pack.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::ARM::OperationalInsights + module Models + # + # Intelligence Pack containing a string name and boolean indicating if it's + # enabled. + # + class IntelligencePack + + include MsRestAzure + + # @return [String] The name of the intelligence pack. + attr_accessor :name + + # @return [Boolean] The enabled boolean for the intelligence pack. + attr_accessor :enabled + + + # + # Mapper for IntelligencePack class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IntelligencePack', + type: { + name: 'Composite', + class_name: 'IntelligencePack', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/link_target.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/link_target.rb new file mode 100644 index 0000000000..d7902265d1 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/link_target.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::ARM::OperationalInsights + module Models + # + # Metadata for a workspace that isn't linked to an Azure subscription. + # + class LinkTarget + + include MsRestAzure + + # @return [String] The GUID that uniquely identifies the workspace. + attr_accessor :customer_id + + # @return [String] The display name of the workspace. + attr_accessor :display_name + + # @return [String] The DNS valid workspace name. + attr_accessor :workspace_name + + # @return [String] The location of the workspace. + attr_accessor :location + + + # + # Mapper for LinkTarget class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LinkTarget', + type: { + name: 'Composite', + class_name: 'LinkTarget', + model_properties: { + customer_id: { + required: false, + serialized_name: 'customerId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'accountName', + type: { + name: 'String' + } + }, + workspace_name: { + required: false, + serialized_name: 'workspaceName', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/linked_service.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/linked_service.rb new file mode 100644 index 0000000000..ad3f06394b --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/linked_service.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::ARM::OperationalInsights + module Models + # + # The top level Linked service resource container. + # + class LinkedService < ProxyResource + + include MsRestAzure + + # @return [String] The resource id of the resource that will be linked to + # the workspace. + attr_accessor :resource_id + + + # + # Mapper for LinkedService class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LinkedService', + type: { + name: 'Composite', + class_name: 'LinkedService', + 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' + } + } + } + }, + resource_id: { + required: true, + serialized_name: 'properties.resourceId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb new file mode 100644 index 0000000000..4ea851fbb8 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # The list linked service operation response. + # + class LinkedServiceListResult + + include MsRestAzure + + # @return [Array] Gets or sets a list of linked service + # instances. + attr_accessor :value + + + # + # Mapper for LinkedServiceListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LinkedServiceListResult', + type: { + name: 'Composite', + class_name: 'LinkedServiceListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LinkedServiceElementType', + type: { + name: 'Composite', + class_name: 'LinkedService' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/management_group.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/management_group.rb new file mode 100644 index 0000000000..0082cbdf60 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/management_group.rb @@ -0,0 +1,119 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # A management group that is connected to a workspace + # + class ManagementGroup + + include MsRestAzure + + # @return [Integer] The number of servers connected to the management + # group. + attr_accessor :server_count + + # @return [Boolean] Gets or sets a value indicating whether the + # management group is a gateway. + attr_accessor :is_gateway + + # @return [String] The name of the management group. + attr_accessor :name + + # @return [String] The unique ID of the management group. + attr_accessor :id + + # @return [DateTime] The datetime that the management group was created. + attr_accessor :created + + # @return [DateTime] The last datetime that the management group received + # data. + attr_accessor :data_received + + # @return [String] The version of System Center that is managing the + # management group. + attr_accessor :version + + # @return [String] The SKU of System Center that is managing the + # management group. + attr_accessor :sku + + + # + # Mapper for ManagementGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroup', + type: { + name: 'Composite', + class_name: 'ManagementGroup', + model_properties: { + server_count: { + required: false, + serialized_name: 'properties.serverCount', + type: { + name: 'Number' + } + }, + is_gateway: { + required: false, + serialized_name: 'properties.isGateway', + type: { + name: 'Boolean' + } + }, + name: { + required: false, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + id: { + required: false, + serialized_name: 'properties.id', + type: { + name: 'String' + } + }, + created: { + required: false, + serialized_name: 'properties.created', + type: { + name: 'DateTime' + } + }, + data_received: { + required: false, + serialized_name: 'properties.dataReceived', + type: { + name: 'DateTime' + } + }, + version: { + required: false, + serialized_name: 'properties.version', + type: { + name: 'String' + } + }, + sku: { + required: false, + serialized_name: 'properties.sku', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/metric_name.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/metric_name.rb new file mode 100644 index 0000000000..220708ec21 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/metric_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::ARM::OperationalInsights + module Models + # + # The name of a metric. + # + class MetricName + + include MsRestAzure + + # @return [String] The system name of the metric. + attr_accessor :value + + # @return [String] The localized name of the metric. + attr_accessor :localized_value + + + # + # Mapper for MetricName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricName', + type: { + name: 'Composite', + class_name: 'MetricName', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + }, + localized_value: { + required: false, + serialized_name: 'localizedValue', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/proxy_resource.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/proxy_resource.rb new file mode 100644 index 0000000000..a274ff6a2b --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/proxy_resource.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # Common properties of proxy resource. + # + class ProxyResource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for ProxyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProxyResource', + type: { + name: 'Composite', + class_name: 'ProxyResource', + 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_operational_insights/lib/generated/azure_mgmt_operational_insights/models/resource.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/resource.rb new file mode 100644 index 0000000000..9c0de8fb98 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/resource.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::ARM::OperationalInsights + 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 + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/saved_search.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/saved_search.rb new file mode 100644 index 0000000000..25b80e6049 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/saved_search.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::ARM::OperationalInsights + module Models + # + # Value object for saved search results. + # + class SavedSearch + + include MsRestAzure + + # @return [String] The id of the saved search. + attr_accessor :id + + # @return [String] The etag of the saved search. + attr_accessor :etag + + # @return [String] The category of the saved search. This helps the user + # to find a saved search faster. + attr_accessor :category + + # @return [String] Saved search display name. + attr_accessor :display_name + + # @return [String] The query expression for the saved search. Please see + # https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference + # for reference. + attr_accessor :query + + # @return [Integer] The version number of the query lanuage. Only verion + # 1 is allowed here. + attr_accessor :version + + # @return [Array] The tags attached to the saved search. + attr_accessor :tags + + + # + # Mapper for SavedSearch class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SavedSearch', + type: { + name: 'Composite', + class_name: 'SavedSearch', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + }, + category: { + required: true, + serialized_name: 'properties.Category', + type: { + name: 'String' + } + }, + display_name: { + required: true, + serialized_name: 'properties.DisplayName', + type: { + name: 'String' + } + }, + query: { + required: true, + serialized_name: 'properties.Query', + type: { + name: 'String' + } + }, + version: { + required: true, + serialized_name: 'properties.Version', + constraints: { + InclusiveMaximum: 1, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + tags: { + required: false, + serialized_name: 'properties.Tags', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TagElementType', + type: { + name: 'Composite', + class_name: 'Tag' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb new file mode 100644 index 0000000000..cb47165a3c --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # The saved search operation response. + # + class SavedSearchesListResult + + include MsRestAzure + + # @return [SearchMetadata] The metadata from search results. + attr_accessor :metadata + + # @return [Array] The array of result values. + attr_accessor :value + + + # + # Mapper for SavedSearchesListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SavedSearchesListResult', + type: { + name: 'Composite', + class_name: 'SavedSearchesListResult', + model_properties: { + metadata: { + required: false, + serialized_name: '__metadata', + type: { + name: 'Composite', + class_name: 'SearchMetadata' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SavedSearchElementType', + type: { + name: 'Composite', + class_name: 'SavedSearch' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_error.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_error.rb new file mode 100644 index 0000000000..9ed7f1636f --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_error.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::ARM::OperationalInsights + module Models + # + # Details for a search error. + # + class SearchError + + include MsRestAzure + + # @return [String] The error type. + attr_accessor :type + + # @return [String] The error message. + attr_accessor :message + + + # + # Mapper for SearchError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchError', + type: { + name: 'Composite', + class_name: 'SearchError', + model_properties: { + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb new file mode 100644 index 0000000000..2095c5ae28 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # The get schema operation response. + # + class SearchGetSchemaResponse + + include MsRestAzure + + # @return [SearchMetadata] The metadata from search results. + attr_accessor :metadata + + # @return [Array] The array of result values. + attr_accessor :value + + + # + # Mapper for SearchGetSchemaResponse class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchGetSchemaResponse', + type: { + name: 'Composite', + class_name: 'SearchGetSchemaResponse', + model_properties: { + metadata: { + required: false, + serialized_name: '__metadata', + type: { + name: 'Composite', + class_name: 'SearchMetadata' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SearchSchemaValueElementType', + type: { + name: 'Composite', + class_name: 'SearchSchemaValue' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_highlight.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_highlight.rb new file mode 100644 index 0000000000..888917b116 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_highlight.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::ARM::OperationalInsights + module Models + # + # Highlight details. + # + class SearchHighlight + + include MsRestAzure + + # @return [String] The string that is put before a matched result. + attr_accessor :pre + + # @return [String] The string that is put after a matched result. + attr_accessor :post + + + # + # Mapper for SearchHighlight class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchHighlight', + type: { + name: 'Composite', + class_name: 'SearchHighlight', + model_properties: { + pre: { + required: false, + serialized_name: 'pre', + type: { + name: 'String' + } + }, + post: { + required: false, + serialized_name: 'post', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_metadata.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_metadata.rb new file mode 100644 index 0000000000..b6ebea0af1 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_metadata.rb @@ -0,0 +1,221 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # Metadata for search results. + # + class SearchMetadata + + include MsRestAzure + + # @return [String] The request id of the search. + attr_accessor :search_id + + # @return [String] The search result type. + attr_accessor :result_type + + # @return [Integer] The total number of search results. + attr_accessor :total + + # @return [Integer] The number of top search results. + attr_accessor :top + + # @return [String] The id of the search results request. + attr_accessor :id + + # @return [Array] The core summaries. + attr_accessor :core_summaries + + # @return [String] The status of the search results. + attr_accessor :status + + # @return [DateTime] The start time for the search. + attr_accessor :start_time + + # @return [DateTime] The time of last update. + attr_accessor :last_updated + + # @return [String] The ETag of the search results. + attr_accessor :etag + + # @return [Array] How the results are sorted. + attr_accessor :sort + + # @return [Integer] The request time. + attr_accessor :request_time + + # @return [String] The aggregated value field. + attr_accessor :aggregated_value_field + + # @return [String] The aggregated grouping fields. + attr_accessor :aggregated_grouping_fields + + # @return [Integer] The sum of all aggregates returned in the result set. + attr_accessor :sum + + # @return [Integer] The max of all aggregates returned in the result set. + attr_accessor :max + + # @return [SearchMetadataSchema] The schema. + attr_accessor :schema + + + # + # Mapper for SearchMetadata class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchMetadata', + type: { + name: 'Composite', + class_name: 'SearchMetadata', + model_properties: { + search_id: { + required: false, + serialized_name: 'RequestId', + type: { + name: 'String' + } + }, + result_type: { + required: false, + serialized_name: 'resultType', + type: { + name: 'String' + } + }, + total: { + required: false, + serialized_name: 'total', + type: { + name: 'Number' + } + }, + top: { + required: false, + serialized_name: 'top', + type: { + name: 'Number' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + core_summaries: { + required: false, + serialized_name: 'CoreSummaries', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CoreSummaryElementType', + type: { + name: 'Composite', + class_name: 'CoreSummary' + } + } + } + }, + status: { + required: false, + serialized_name: 'Status', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'StartTime', + type: { + name: 'DateTime' + } + }, + last_updated: { + required: false, + serialized_name: 'LastUpdated', + type: { + name: 'DateTime' + } + }, + etag: { + required: false, + serialized_name: 'ETag', + type: { + name: 'String' + } + }, + sort: { + required: false, + serialized_name: 'sort', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SearchSortElementType', + type: { + name: 'Composite', + class_name: 'SearchSort' + } + } + } + }, + request_time: { + required: false, + serialized_name: 'requestTime', + type: { + name: 'Number' + } + }, + aggregated_value_field: { + required: false, + serialized_name: 'aggregatedValueField', + type: { + name: 'String' + } + }, + aggregated_grouping_fields: { + required: false, + serialized_name: 'aggregatedGroupingFields', + type: { + name: 'String' + } + }, + sum: { + required: false, + serialized_name: 'sum', + type: { + name: 'Number' + } + }, + max: { + required: false, + serialized_name: 'max', + type: { + name: 'Number' + } + }, + schema: { + required: false, + serialized_name: 'schema', + type: { + name: 'Composite', + class_name: 'SearchMetadataSchema' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb new file mode 100644 index 0000000000..e0b57cb547 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_metadata_schema.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::ARM::OperationalInsights + module Models + # + # Schema metadata for search. + # + class SearchMetadataSchema + + include MsRestAzure + + # @return [String] The name of the metadata schema. + attr_accessor :name + + # @return [Integer] The version of the metadata schema. + attr_accessor :version + + + # + # Mapper for SearchMetadataSchema class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchMetadataSchema', + type: { + name: 'Composite', + class_name: 'SearchMetadataSchema', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + version: { + required: false, + serialized_name: 'version', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_parameters.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_parameters.rb new file mode 100644 index 0000000000..c51c88ac3b --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_parameters.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # Parameters specifying the search query and range. + # + class SearchParameters + + include MsRestAzure + + # @return [Integer] The number to get from the top. + attr_accessor :top + + # @return [SearchHighlight] The highlight that looks for all occurences + # of a string. + attr_accessor :highlight + + # @return [String] The query to search. + attr_accessor :query + + # @return [DateTime] The start date filter, so the only query results + # returned are after this date. + attr_accessor :start + + # @return [DateTime] The end date filter, so the only query results + # returned are before this date. + attr_accessor :end_property + + + # + # Mapper for SearchParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchParameters', + type: { + name: 'Composite', + class_name: 'SearchParameters', + model_properties: { + top: { + required: false, + serialized_name: 'top', + type: { + name: 'Number' + } + }, + highlight: { + required: false, + serialized_name: 'highlight', + type: { + name: 'Composite', + class_name: 'SearchHighlight' + } + }, + query: { + required: true, + serialized_name: 'query', + type: { + name: 'String' + } + }, + start: { + required: false, + serialized_name: 'start', + type: { + name: 'DateTime' + } + }, + end_property: { + required: false, + serialized_name: 'end', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_results_response.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_results_response.rb new file mode 100644 index 0000000000..6d883def3e --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_results_response.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # The get search result operation response. + # + class SearchResultsResponse + + include MsRestAzure + + # @return [String] The id of the search, which includes the full url. + attr_accessor :id + + # @return [SearchMetadata] The metadata from search results. + attr_accessor :metadata + + # @return The array of result values. + attr_accessor :value + + # @return [SearchError] The error. + attr_accessor :error + + + # + # Mapper for SearchResultsResponse class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchResultsResponse', + type: { + name: 'Composite', + class_name: 'SearchResultsResponse', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + metadata: { + required: false, + serialized_name: '__metadata', + type: { + name: 'Composite', + class_name: 'SearchMetadata' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'SearchError' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_schema_value.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_schema_value.rb new file mode 100644 index 0000000000..9ea38506c8 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_schema_value.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::ARM::OperationalInsights + module Models + # + # Value object for schema results. + # + class SearchSchemaValue + + include MsRestAzure + + # @return [String] The name of the schema. + attr_accessor :name + + # @return [String] The display name of the schema. + attr_accessor :display_name + + # @return [String] The type. + attr_accessor :type + + # @return [Boolean] The boolean that indicates the field is searchable as + # free text. + attr_accessor :indexed + + # @return [Boolean] The boolean that indicates whether or not the field + # is stored. + attr_accessor :stored + + # @return [Boolean] The boolean that indicates whether or not the field + # is a facet. + attr_accessor :facet + + # @return [Array] The array of workflows containing the field. + attr_accessor :owner_type + + + # + # Mapper for SearchSchemaValue class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchSchemaValue', + type: { + name: 'Composite', + class_name: 'SearchSchemaValue', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + indexed: { + required: true, + serialized_name: 'indexed', + type: { + name: 'Boolean' + } + }, + stored: { + required: true, + serialized_name: 'stored', + type: { + name: 'Boolean' + } + }, + facet: { + required: true, + serialized_name: 'facet', + type: { + name: 'Boolean' + } + }, + owner_type: { + required: false, + serialized_name: 'ownerType', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_sort.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_sort.rb new file mode 100644 index 0000000000..2037ada92f --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_sort.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::ARM::OperationalInsights + module Models + # + # The sort parameters for search. + # + class SearchSort + + include MsRestAzure + + # @return [String] The name of the field the search query is sorted on. + attr_accessor :name + + # @return [SearchSortEnum] The sort order of the search. Possible values + # include: 'asc', 'desc' + attr_accessor :order + + + # + # Mapper for SearchSort class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SearchSort', + type: { + name: 'Composite', + class_name: 'SearchSort', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + order: { + required: false, + serialized_name: 'order', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb new file mode 100644 index 0000000000..912ab44ee3 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/search_sort_enum.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::ARM::OperationalInsights + module Models + # + # Defines values for SearchSortEnum + # + module SearchSortEnum + Asc = "asc" + Desc = "desc" + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/shared_keys.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/shared_keys.rb new file mode 100644 index 0000000000..cf6565ccc4 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/shared_keys.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::ARM::OperationalInsights + module Models + # + # The shared keys for a workspace. + # + class SharedKeys + + include MsRestAzure + + # @return [String] The primary shared key of a workspace. + attr_accessor :primary_shared_key + + # @return [String] The secondary shared key of a workspace. + attr_accessor :secondary_shared_key + + + # + # Mapper for SharedKeys class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SharedKeys', + type: { + name: 'Composite', + class_name: 'SharedKeys', + model_properties: { + primary_shared_key: { + required: false, + serialized_name: 'primarySharedKey', + type: { + name: 'String' + } + }, + secondary_shared_key: { + required: false, + serialized_name: 'secondarySharedKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/sku.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/sku.rb new file mode 100644 index 0000000000..4452241eac --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/sku.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::ARM::OperationalInsights + module Models + # + # The SKU (tier) of a workspace. + # + class Sku + + include MsRestAzure + + # @return [SkuNameEnum] The name of the SKU. Possible values include: + # 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'Standalone' + attr_accessor :name + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb new file mode 100644 index 0000000000..6bac5149d1 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/sku_name_enum.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::ARM::OperationalInsights + module Models + # + # Defines values for SkuNameEnum + # + module SkuNameEnum + Free = "Free" + Standard = "Standard" + Premium = "Premium" + Unlimited = "Unlimited" + PerNode = "PerNode" + Standalone = "Standalone" + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_account.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_account.rb new file mode 100644 index 0000000000..3d30c86631 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_account.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::ARM::OperationalInsights + module Models + # + # Describes a storage account connection. + # + class StorageAccount + + include MsRestAzure + + # @return [String] The Azure Resource Manager ID of the storage account + # resource. + attr_accessor :id + + # @return [String] The storage account key. + attr_accessor :key + + + # + # Mapper for StorageAccount class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageAccount', + type: { + name: 'Composite', + class_name: 'StorageAccount', + model_properties: { + id: { + required: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + key: { + required: true, + serialized_name: 'key', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight.rb new file mode 100644 index 0000000000..25ab38be4c --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight.rb @@ -0,0 +1,141 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # The top level storage insight resource container. + # + class StorageInsight < ProxyResource + + include MsRestAzure + + # @return [Array] The names of the blob containers that the + # workspace should read + attr_accessor :containers + + # @return [Array] The names of the Azure tables that the + # workspace should read + attr_accessor :tables + + # @return [StorageAccount] The storage account connection details + attr_accessor :storage_account + + # @return [StorageInsightStatus] The status of the storage insight + attr_accessor :status + + # @return [String] The ETag of the storage insight. + attr_accessor :e_tag + + + # + # Mapper for StorageInsight class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageInsight', + type: { + name: 'Composite', + class_name: 'StorageInsight', + 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' + } + } + } + }, + containers: { + required: false, + serialized_name: 'properties.containers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + tables: { + required: false, + serialized_name: 'properties.tables', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + storage_account: { + required: true, + serialized_name: 'properties.storageAccount', + type: { + name: 'Composite', + class_name: 'StorageAccount' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'properties.status', + type: { + name: 'Composite', + class_name: 'StorageInsightStatus' + } + }, + e_tag: { + required: false, + serialized_name: 'eTag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb new file mode 100644 index 0000000000..de9be1b35a --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.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::ARM::OperationalInsights + module Models + # + # The list storage insights operation response. + # + class StorageInsightListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets or sets a list of storage insight + # instances. + attr_accessor :value + + # @return [String] The link (url) to the next page of results. + attr_accessor :odata_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.odatanext_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [StorageInsightListResult] with next page content. + # + def get_next_page + response = @next_method.call(@odatanext_link).value! unless @next_method.nil? + unless response.nil? + @odatanext_link = response.body.odatanext_link + @value = response.body.value + self + end + end + + # + # Mapper for StorageInsightListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageInsightListResult', + type: { + name: 'Composite', + class_name: 'StorageInsightListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StorageInsightElementType', + type: { + name: 'Composite', + class_name: 'StorageInsight' + } + } + } + }, + odata_next_link: { + required: false, + serialized_name: '@odata\\.nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb new file mode 100644 index 0000000000..b3c126895d --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_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::ARM::OperationalInsights + module Models + # + # Defines values for StorageInsightState + # + module StorageInsightState + OK = "OK" + ERROR = "ERROR" + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb new file mode 100644 index 0000000000..dde52f3490 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/storage_insight_status.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::ARM::OperationalInsights + module Models + # + # The status of the storage insight. + # + class StorageInsightStatus + + include MsRestAzure + + # @return [StorageInsightState] The state of the storage insight + # connection to the workspace. Possible values include: 'OK', 'ERROR' + attr_accessor :state + + # @return [String] Description of the state of the storage insight. + attr_accessor :description + + + # + # Mapper for StorageInsightStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageInsightStatus', + type: { + name: 'Composite', + class_name: 'StorageInsightStatus', + model_properties: { + state: { + required: true, + serialized_name: 'state', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/tag.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/tag.rb new file mode 100644 index 0000000000..cdda0b4426 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/tag.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::ARM::OperationalInsights + module Models + # + # A tag of a saved search. + # + class Tag + + include MsRestAzure + + # @return [String] The tag name. + attr_accessor :name + + # @return [String] The tag value. + attr_accessor :value + + + # + # Mapper for Tag class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Tag', + type: { + name: 'Composite', + class_name: 'Tag', + 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_operational_insights/lib/generated/azure_mgmt_operational_insights/models/usage_metric.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/usage_metric.rb new file mode 100644 index 0000000000..25fb183d5c --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/usage_metric.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::ARM::OperationalInsights + module Models + # + # A metric describing the usage of a resource. + # + class UsageMetric + + include MsRestAzure + + # @return [MetricName] The name of the metric. + attr_accessor :name + + # @return [String] The units used for the metric. + attr_accessor :unit + + # @return [Float] The current value of the metric. + attr_accessor :current_value + + # @return [Float] The quota limit for the metric. + attr_accessor :limit + + # @return [DateTime] The time that the metric's value will reset. + attr_accessor :next_reset_time + + # @return [String] The quota period that determines the length of time + # between value resets. + attr_accessor :quota_period + + + # + # Mapper for UsageMetric class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UsageMetric', + type: { + name: 'Composite', + class_name: 'UsageMetric', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'Composite', + class_name: 'MetricName' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + current_value: { + required: false, + serialized_name: 'currentValue', + type: { + name: 'Double' + } + }, + limit: { + required: false, + serialized_name: 'limit', + type: { + name: 'Double' + } + }, + next_reset_time: { + required: false, + serialized_name: 'nextResetTime', + type: { + name: 'DateTime' + } + }, + quota_period: { + required: false, + serialized_name: 'quotaPeriod', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace.rb new file mode 100644 index 0000000000..fd3c70a1a7 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace.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::ARM::OperationalInsights + module Models + # + # The top level Workspace resource container. + # + class Workspace < Resource + + include MsRestAzure + + # @return [EntityStatus] The provisioning state of the workspace. + # Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + # 'Deleting', 'ProvisioningAccount' + attr_accessor :provisioning_state + + # @return [String] The source of the workspace. Source defines where the + # workspace was created. 'Azure' implies it was created in Azure. + # 'External' implies it was created via the Operational Insights Portal. + # This value is set on the service side and read-only on the client side. + attr_accessor :source + + # @return [String] The ID associated with the workspace. Setting this + # value at creation time allows the workspace being created to be linked + # to an existing workspace. + attr_accessor :customer_id + + # @return [String] The URL of the Operational Insights portal for this + # workspace. This value is set on the service side and read-only on the + # client side. + attr_accessor :portal_url + + # @return [Sku] The SKU of the workspace. + attr_accessor :sku + + # @return [Integer] The workspace data retention in days. -1 means + # Unlimited retention for the Unlimited Sku. 730 days is the maximum + # allowed for all other Skus. + attr_accessor :retention_in_days + + # @return [String] The ETag of the workspace. + attr_accessor :e_tag + + + # + # Mapper for Workspace class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Workspace', + type: { + name: 'Composite', + class_name: 'Workspace', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + source: { + required: false, + serialized_name: 'properties.source', + type: { + name: 'String' + } + }, + customer_id: { + required: false, + serialized_name: 'properties.customerId', + type: { + name: 'String' + } + }, + portal_url: { + required: false, + serialized_name: 'properties.portalUrl', + type: { + name: 'String' + } + }, + sku: { + required: false, + serialized_name: 'properties.sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + retention_in_days: { + required: false, + serialized_name: 'properties.retentionInDays', + constraints: { + InclusiveMaximum: 730, + InclusiveMinimum: -1 + }, + type: { + name: 'Number' + } + }, + e_tag: { + required: false, + serialized_name: 'eTag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb new file mode 100644 index 0000000000..d283d165de --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # The list workspace managmement groups operation response. + # + class WorkspaceListManagementGroupsResult + + include MsRestAzure + + # @return [Array] Gets or sets a list of management + # groups attached to the workspace. + attr_accessor :value + + + # + # Mapper for WorkspaceListManagementGroupsResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WorkspaceListManagementGroupsResult', + type: { + name: 'Composite', + class_name: 'WorkspaceListManagementGroupsResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagementGroupElementType', + type: { + name: 'Composite', + class_name: 'ManagementGroup' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb new file mode 100644 index 0000000000..1127d0c83c --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_result.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::ARM::OperationalInsights + module Models + # + # The list workspaces operation response. + # + class WorkspaceListResult + + include MsRestAzure + + # @return [Array] A list of workspaces. + attr_accessor :value + + + # + # Mapper for WorkspaceListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WorkspaceListResult', + type: { + name: 'Composite', + class_name: 'WorkspaceListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WorkspaceElementType', + type: { + name: 'Composite', + class_name: 'Workspace' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb new file mode 100644 index 0000000000..eef89c08ac --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + module Models + # + # The list workspace usages operation response. + # + class WorkspaceListUsagesResult + + include MsRestAzure + + # @return [Array] Gets or sets a list of usage metrics for a + # workspace. + attr_accessor :value + + + # + # Mapper for WorkspaceListUsagesResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WorkspaceListUsagesResult', + type: { + name: 'Composite', + class_name: 'WorkspaceListUsagesResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UsageMetricElementType', + type: { + name: 'Composite', + class_name: 'UsageMetric' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/module_definition.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/module_definition.rb new file mode 100644 index 0000000000..a7c1533ea7 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/module_definition.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 end +module Azure::ARM end +module Azure::ARM::OperationalInsights end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb new file mode 100644 index 0000000000..8cbab465a0 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb @@ -0,0 +1,143 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + # + # A service client - single point of access to the REST API. + # + class OperationalInsightsManagementClient < 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] Gets subscription credentials which uniquely identify + # Microsoft Azure subscription. The subscription ID forms part of the URI + # for every service call. + attr_accessor :subscription_id + + # @return [String] 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 [LinkedServices] linked_services + attr_reader :linked_services + + # @return [DataSources] data_sources + attr_reader :data_sources + + # @return [Workspaces] workspaces + attr_reader :workspaces + + # @return [StorageInsights] storage_insights + attr_reader :storage_insights + + # @return [SavedSearches] saved_searches + attr_reader :saved_searches + + # + # Creates initializes a new instance of the OperationalInsightsManagementClient 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 + + @linked_services = LinkedServices.new(self) + @data_sources = DataSources.new(self) + @workspaces = Workspaces.new(self) + @storage_insights = StorageInsights.new(self) + @saved_searches = SavedSearches.new(self) + @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_operational_insights' + if defined? Azure::ARM::OperationalInsights::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::OperationalInsights::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/saved_searches.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/saved_searches.rb new file mode 100644 index 0000000000..d970b403ca --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/saved_searches.rb @@ -0,0 +1,513 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + # + # Operational Insights Client + # + class SavedSearches + include MsRestAzure + + # + # Creates and initializes a new instance of the SavedSearches class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient + attr_reader :client + + # + # Deletes the specified saved search in a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] Name of the saved search. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, workspace_name, saved_search_name, custom_headers = nil) + response = delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value! + nil + end + + # + # Deletes the specified saved search in a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] Name of the saved search. + # @param custom_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, workspace_name, saved_search_name, custom_headers = nil) + delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value! + end + + # + # Deletes the specified saved search in a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] Name of the saved search. + # @param [Hash{String => String}] 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, workspace_name, saved_search_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates or updates a saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The id of the saved search. + # @param parameters [SavedSearch] The parameters required to save a search. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SavedSearch] operation results. + # + def create_or_update(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The id of the saved search. + # @param parameters [SavedSearch] The parameters required to save a search. + # @param custom_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, workspace_name, saved_search_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers).value! + end + + # + # Creates or updates a saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The id of the saved search. + # @param parameters [SavedSearch] The parameters required to save a search. + # @param [Hash{String => String}] 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, workspace_name, saved_search_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2015-03-20' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::OperationalInsights::Models::SavedSearch.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.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::SavedSearch.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the specified saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The id of the saved search. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SavedSearch] operation results. + # + def get(resource_group_name, workspace_name, saved_search_name, custom_headers = nil) + response = get_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The id of the saved search. + # @param custom_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, workspace_name, saved_search_name, custom_headers = nil) + get_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value! + end + + # + # Gets the specified saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The id of the saved search. + # @param [Hash{String => String}] 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, workspace_name, saved_search_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::SavedSearch.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 saved searches for a given Log Analytics Workspace + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SavedSearchesListResult] operation results. + # + def list_by_workspace(resource_group_name, workspace_name, custom_headers = nil) + response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the saved searches for a given Log Analytics Workspace + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Gets the saved searches for a given Log Analytics Workspace + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_workspace_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/savedSearches' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::SavedSearchesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 results from a saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The name of the saved search. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SearchResultsResponse] operation results. + # + def get_results(resource_group_name, workspace_name, saved_search_name, custom_headers = nil) + response = get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the results from a saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The name of the saved search. + # @param custom_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_results_with_http_info(resource_group_name, workspace_name, saved_search_name, custom_headers = nil) + get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value! + end + + # + # Gets the results from a saved search for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param saved_search_name [String] The name of the saved search. + # @param [Hash{String => String}] 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_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::SearchResultsResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_operational_insights/lib/generated/azure_mgmt_operational_insights/storage_insights.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/storage_insights.rb new file mode 100644 index 0000000000..a51b06fac7 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/storage_insights.rb @@ -0,0 +1,560 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + # + # Operational Insights Client + # + class StorageInsights + include MsRestAzure + + # + # Creates and initializes a new instance of the StorageInsights class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient + attr_reader :client + + # + # Create or update a storage insight. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that will contain + # the storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param parameters [StorageInsight] The parameters required to create or + # update a storage insight. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageInsight] operation results. + # + def create_or_update(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update a storage insight. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that will contain + # the storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param parameters [StorageInsight] The parameters required to create or + # update a storage insight. + # @param custom_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, workspace_name, storage_insight_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers).value! + end + + # + # Create or update a storage insight. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that will contain + # the storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param parameters [StorageInsight] The parameters required to create or + # update a storage insight. + # @param [Hash{String => String}] 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, workspace_name, storage_insight_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'storage_insight_name is nil' if storage_insight_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2015-03-20' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::OperationalInsights::Models::StorageInsight.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.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'storageInsightName' => storage_insight_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::StorageInsight.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::StorageInsight.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a storage insight instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that contains the + # storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageInsight] operation results. + # + def get(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil) + response = get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a storage insight instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that contains the + # storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil) + get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value! + end + + # + # Gets a storage insight instance. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that contains the + # storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'storage_insight_name is nil' if storage_insight_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'storageInsightName' => storage_insight_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::StorageInsight.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a storageInsightsConfigs resource + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that contains the + # storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil) + response = delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value! + nil + end + + # + # Deletes a storageInsightsConfigs resource + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that contains the + # storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil) + delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value! + end + + # + # Deletes a storageInsightsConfigs resource + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that contains the + # storageInsightsConfigs resource + # @param storage_insight_name [String] Name of the storageInsightsConfigs + # resource + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'storage_insight_name is nil' if storage_insight_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'storageInsightName' => storage_insight_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 + + # + # Lists the storage insight instances within a workspace + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that will contain + # the storageInsightsConfigs resource + # @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_workspace(resource_group_name, workspace_name, custom_headers = nil) + first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers) + first_page.get_all_items + end + + # + # Lists the storage insight instances within a workspace + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that will contain + # the storageInsightsConfigs resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Lists the storage insight instances within a workspace + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that will contain + # the storageInsightsConfigs resource + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_workspace_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::StorageInsightListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 storage insight instances within a workspace + # + # @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 [StorageInsightListResult] operation results. + # + def list_by_workspace_next(next_page_link, custom_headers = nil) + response = list_by_workspace_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the storage insight instances within a workspace + # + # @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_workspace_next_with_http_info(next_page_link, custom_headers = nil) + list_by_workspace_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the storage insight instances within a workspace + # + # @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_workspace_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::StorageInsightListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 storage insight instances within a workspace + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics Workspace name that will contain + # the storageInsightsConfigs resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageInsightListResult] which provide lazy access to pages of the + # response. + # + def list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers = nil) + response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_workspace_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/version.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/version.rb new file mode 100644 index 0000000000..a903b5c804 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/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::ARM::OperationalInsights + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/workspaces.rb b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/workspaces.rb new file mode 100644 index 0000000000..e9357449c4 --- /dev/null +++ b/management/azure_mgmt_operational_insights/lib/generated/azure_mgmt_operational_insights/workspaces.rb @@ -0,0 +1,1569 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::OperationalInsights + # + # Operational Insights Client + # + class Workspaces + include MsRestAzure + + # + # Creates and initializes a new instance of the Workspaces class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient + attr_reader :client + + # + # Disables an intelligence pack for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param intelligence_pack_name [String] The name of the intelligence pack to + # be disabled. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def disable_intelligence_pack(resource_group_name, workspace_name, intelligence_pack_name, custom_headers = nil) + response = disable_intelligence_pack_async(resource_group_name, workspace_name, intelligence_pack_name, custom_headers).value! + nil + end + + # + # Disables an intelligence pack for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param intelligence_pack_name [String] The name of the intelligence pack to + # be disabled. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def disable_intelligence_pack_with_http_info(resource_group_name, workspace_name, intelligence_pack_name, custom_headers = nil) + disable_intelligence_pack_async(resource_group_name, workspace_name, intelligence_pack_name, custom_headers).value! + end + + # + # Disables an intelligence pack for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param intelligence_pack_name [String] The name of the intelligence pack to + # be disabled. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def disable_intelligence_pack_async(resource_group_name, workspace_name, intelligence_pack_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'intelligence_pack_name is nil' if intelligence_pack_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'intelligencePackName' => intelligence_pack_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Enables an intelligence pack for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param intelligence_pack_name [String] The name of the intelligence pack to + # be enabled. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def enable_intelligence_pack(resource_group_name, workspace_name, intelligence_pack_name, custom_headers = nil) + response = enable_intelligence_pack_async(resource_group_name, workspace_name, intelligence_pack_name, custom_headers).value! + nil + end + + # + # Enables an intelligence pack for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param intelligence_pack_name [String] The name of the intelligence pack to + # be enabled. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def enable_intelligence_pack_with_http_info(resource_group_name, workspace_name, intelligence_pack_name, custom_headers = nil) + enable_intelligence_pack_async(resource_group_name, workspace_name, intelligence_pack_name, custom_headers).value! + end + + # + # Enables an intelligence pack for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param intelligence_pack_name [String] The name of the intelligence pack to + # be enabled. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def enable_intelligence_pack_async(resource_group_name, workspace_name, intelligence_pack_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'intelligence_pack_name is nil' if intelligence_pack_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'intelligencePackName' => intelligence_pack_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists all the intelligence packs possible and whether they are enabled or + # disabled for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @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_intelligence_packs(resource_group_name, workspace_name, custom_headers = nil) + response = list_intelligence_packs_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all the intelligence packs possible and whether they are enabled or + # disabled for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param custom_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_intelligence_packs_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + list_intelligence_packs_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Lists all the intelligence packs possible and whether they are enabled or + # disabled for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param [Hash{String => String}] 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_intelligence_packs_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/intelligencePacks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IntelligencePackElementType', + type: { + name: 'Composite', + class_name: 'IntelligencePack' + } + } + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 keys for a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SharedKeys] operation results. + # + def get_shared_keys(resource_group_name, workspace_name, custom_headers = nil) + response = get_shared_keys_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the shared keys for a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param custom_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_keys_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + get_shared_keys_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Gets the shared keys for a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param [Hash{String => String}] 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_keys_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/sharedKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::OperationalInsights::Models::SharedKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of usage metrics for a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The name of the workspace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WorkspaceListUsagesResult] operation results. + # + def list_usages(resource_group_name, workspace_name, custom_headers = nil) + response = list_usages_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of usage metrics for a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The name of the workspace. + # @param custom_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_usages_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + list_usages_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Gets a list of usage metrics for a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The name of the workspace. + # @param [Hash{String => String}] 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_usages_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/usages' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::WorkspaceListUsagesResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of management groups connected to a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The name of the workspace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WorkspaceListManagementGroupsResult] operation results. + # + def list_management_groups(resource_group_name, workspace_name, custom_headers = nil) + response = list_management_groups_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of management groups connected to a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The name of the workspace. + # @param custom_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_management_groups_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + list_management_groups_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Gets a list of management groups connected to a workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] The name of the workspace. + # @param [Hash{String => String}] 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_management_groups_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}/managementGroups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::WorkspaceListManagementGroupsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 workspaces in a resource group. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WorkspaceListResult] operation results. + # + def list_by_resource_group(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets workspaces in a resource group. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) + list_by_resource_group_async(resource_group_name, custom_headers).value! + end + + # + # Gets workspaces in a resource group. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param [Hash{String => String}] 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? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces' + + 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' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::WorkspaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 workspaces in a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WorkspaceListResult] operation results. + # + def list(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the workspaces in a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the workspaces in a 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) + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces' + + 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' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::WorkspaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or update a workspace. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] The name of the workspace. + # @param parameters [Workspace] The parameters required to create or update a + # workspace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Workspace] operation results. + # + def create_or_update(resource_group_name, workspace_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] The name of the workspace. + # @param parameters [Workspace] The parameters required to create or update a + # workspace. + # @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, workspace_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::OperationalInsights::Models::Workspace.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a workspace instance. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, workspace_name, custom_headers = nil) + response = delete_async(resource_group_name, workspace_name, custom_headers).value! + nil + end + + # + # Deletes a workspace instance. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param custom_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, workspace_name, custom_headers = nil) + delete_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Deletes a workspace instance. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param [Hash{String => String}] 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, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a workspace instance. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Workspace] operation results. + # + def get(resource_group_name, workspace_name, custom_headers = nil) + response = get_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a workspace instance. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param custom_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, workspace_name, custom_headers = nil) + get_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Gets a workspace instance. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] Name of the Log Analytics Workspace. + # @param [Hash{String => String}] 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, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-11-01-preview' + 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.OperationalInsights/workspaces/{workspaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::Workspace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a list of workspaces which the current user has administrator privileges + # and are not associated with an Azure Subscription. The subscriptionId + # parameter in the Url is ignored. + # + # @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_link_targets(custom_headers = nil) + response = list_link_targets_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Get a list of workspaces which the current user has administrator privileges + # and are not associated with an Azure Subscription. The subscriptionId + # parameter in the Url is ignored. + # + # @param custom_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_link_targets_with_http_info(custom_headers = nil) + list_link_targets_async(custom_headers).value! + end + + # + # Get a list of workspaces which the current user has administrator privileges + # and are not associated with an Azure Subscription. The subscriptionId + # parameter in the Url is ignored. + # + # @param [Hash{String => String}] 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_link_targets_async(custom_headers = nil) + api_version = '2015-03-20' + 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.OperationalInsights/linkTargets' + + 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' => 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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LinkTargetElementType', + type: { + name: 'Composite', + class_name: 'LinkTarget' + } + } + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 schema for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SearchGetSchemaResponse] operation results. + # + def get_schema(resource_group_name, workspace_name, custom_headers = nil) + response = get_schema_async(resource_group_name, workspace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the schema for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_schema_with_http_info(resource_group_name, workspace_name, custom_headers = nil) + get_schema_async(resource_group_name, workspace_name, custom_headers).value! + end + + # + # Gets the schema for a given workspace. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_schema_async(resource_group_name, workspace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/schema' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::OperationalInsights::Models::SearchGetSchemaResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Submit a search for a given workspace. The response will contain an id to + # track the search. User can use the id to poll the search status and get the + # full search result later if the search takes long time to finish. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param parameters [SearchParameters] The parameters required to execute a + # search query. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SearchResultsResponse] operation results. + # + def get_search_results(resource_group_name, workspace_name, parameters, custom_headers = nil) + response = get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param parameters [SearchParameters] The parameters required to execute a + # search query. + # @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 get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers = nil) + # Send request + promise = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::OperationalInsights::Models::SearchResultsResponse.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 updated search results for a given search query. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param id [String] The id of the search that will have results updated. You + # can get the id from the response of the GetResults call. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SearchResultsResponse] operation results. + # + def update_search_results(resource_group_name, workspace_name, id, custom_headers = nil) + response = update_search_results_async(resource_group_name, workspace_name, id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets updated search results for a given search query. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param id [String] The id of the search that will have results updated. You + # can get the id from the response of the GetResults call. + # @param custom_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_search_results_with_http_info(resource_group_name, workspace_name, id, custom_headers = nil) + update_search_results_async(resource_group_name, workspace_name, id, custom_headers).value! + end + + # + # Gets updated search results for a given search query. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param id [String] The id of the search that will have results updated. You + # can get the id from the response of the GetResults call. + # @param [Hash{String => String}] 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_search_results_async(resource_group_name, workspace_name, id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'id is nil' if id.nil? + api_version = '2015-03-20' + 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.OperationalInsights/workspaces/{workspaceName}/search/{id}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'id' => id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::OperationalInsights::Models::SearchResultsResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or update a workspace. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] The name of the workspace. + # @param parameters [Workspace] The parameters required to create or update a + # workspace. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Workspace] operation results. + # + def begin_create_or_update(resource_group_name, workspace_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update a workspace. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] The name of the workspace. + # @param parameters [Workspace] The parameters required to create or update a + # workspace. + # @param custom_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, workspace_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers).value! + end + + # + # Create or update a workspace. + # + # @param resource_group_name [String] The resource group name of the workspace. + # @param workspace_name [String] The name of the workspace. + # @param parameters [Workspace] The parameters required to create or update a + # workspace. + # @param [Hash{String => String}] 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, workspace_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2015-11-01-preview' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::OperationalInsights::Models::Workspace.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.OperationalInsights/workspaces/{workspaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::Workspace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::OperationalInsights::Models::Workspace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Submit a search for a given workspace. The response will contain an id to + # track the search. User can use the id to poll the search status and get the + # full search result later if the search takes long time to finish. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param parameters [SearchParameters] The parameters required to execute a + # search query. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SearchResultsResponse] operation results. + # + def begin_get_search_results(resource_group_name, workspace_name, parameters, custom_headers = nil) + response = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Submit a search for a given workspace. The response will contain an id to + # track the search. User can use the id to poll the search status and get the + # full search result later if the search takes long time to finish. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param parameters [SearchParameters] The parameters required to execute a + # search query. + # @param custom_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_get_search_results_with_http_info(resource_group_name, workspace_name, parameters, custom_headers = nil) + begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers).value! + end + + # + # Submit a search for a given workspace. The response will contain an id to + # track the search. User can use the id to poll the search status and get the + # full search result later if the search takes long time to finish. + # + # @param resource_group_name [String] The name of the resource group to get. + # The name is case insensitive. + # @param workspace_name [String] Log Analytics workspace name + # @param parameters [SearchParameters] The parameters required to execute a + # search query. + # @param [Hash{String => String}] 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_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'workspace_name is nil' if workspace_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2015-03-20' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::OperationalInsights::Models::SearchParameters.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.OperationalInsights/workspaces/{workspaceName}/search' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::OperationalInsights::Models::SearchResultsResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_operational_insights/spec/spec_helper.rb b/management/azure_mgmt_operational_insights/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_operational_insights/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_policy/azure_mgmt_policy.gemspec b/management/azure_mgmt_policy/azure_mgmt_policy.gemspec index 43c9136dd7..31e478318a 100644 --- a/management/azure_mgmt_policy/azure_mgmt_policy.gemspec +++ b/management/azure_mgmt_policy/azure_mgmt_policy.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy.rb index 6bb80210aa..ee91f4bb33 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,14 +21,21 @@ module Azure::ARM::Policy autoload :PolicyAssignments, 'generated/azure_mgmt_policy/policy_assignments.rb' + autoload :PolicySetDefinitions, 'generated/azure_mgmt_policy/policy_set_definitions.rb' autoload :PolicyDefinitions, 'generated/azure_mgmt_policy/policy_definitions.rb' autoload :PolicyClient, 'generated/azure_mgmt_policy/policy_client.rb' module Models + autoload :PolicyDefinitionReference, 'generated/azure_mgmt_policy/models/policy_definition_reference.rb' + autoload :PolicySetDefinition, 'generated/azure_mgmt_policy/models/policy_set_definition.rb' autoload :PolicyAssignment, 'generated/azure_mgmt_policy/models/policy_assignment.rb' + autoload :PolicySetDefinitionListResult, 'generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_policy/models/error_response.rb' autoload :PolicyDefinition, 'generated/azure_mgmt_policy/models/policy_definition.rb' autoload :PolicyAssignmentListResult, 'generated/azure_mgmt_policy/models/policy_assignment_list_result.rb' autoload :PolicyDefinitionListResult, 'generated/azure_mgmt_policy/models/policy_definition_list_result.rb' + autoload :PolicySku, 'generated/azure_mgmt_policy/models/policy_sku.rb' autoload :PolicyType, 'generated/azure_mgmt_policy/models/policy_type.rb' + autoload :PolicyMode, 'generated/azure_mgmt_policy/models/policy_mode.rb' end end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/error_response.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/error_response.rb new file mode 100644 index 0000000000..c2f5b77163 --- /dev/null +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/error_response.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::ARM::Policy + module Models + # + # Error reponse indicates ARM is not able to process the incoming request. + # The reason is provided in the error message. + # + class ErrorResponse + + include MsRestAzure + + # @return [String] Http status code. + attr_accessor :http_status + + # @return [String] Error code. + attr_accessor :error_code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :error_message + + + # + # 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: { + http_status: { + required: false, + serialized_name: 'httpStatus', + type: { + name: 'String' + } + }, + error_code: { + required: false, + serialized_name: 'errorCode', + type: { + name: 'String' + } + }, + error_message: { + required: false, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment.rb index 6da9f25513..6807eced16 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Policy module Models # - # The policy definition. + # The policy assignment. # class PolicyAssignment include MsRestAzure - include MsRest::JSONable # @return [String] The display name of the policy assignment. attr_accessor :display_name @@ -22,6 +21,9 @@ class PolicyAssignment # @return [String] The scope for the policy assignment. attr_accessor :scope + # @return [Array] The policy's excluded scopes. + attr_accessor :not_scopes + # @return Required if a parameter is used in policy rule. attr_accessor :parameters @@ -29,6 +31,9 @@ class PolicyAssignment # policy violation. attr_accessor :description + # @return The policy assignment metadata. + attr_accessor :metadata + # @return [String] The ID of the policy assignment. attr_accessor :id @@ -38,6 +43,9 @@ class PolicyAssignment # @return [String] The name of the policy assignment. attr_accessor :name + # @return [PolicySku] The policy sku. + attr_accessor :sku + # # Mapper for PolicyAssignment class as Ruby Hash. @@ -72,6 +80,20 @@ def self.mapper() name: 'String' } }, + not_scopes: { + required: false, + serialized_name: 'properties.notScopes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, parameters: { required: false, serialized_name: 'properties.parameters', @@ -86,8 +108,16 @@ def self.mapper() name: 'String' } }, + metadata: { + required: false, + serialized_name: 'properties.metadata', + type: { + name: 'Object' + } + }, id: { required: false, + read_only: true, serialized_name: 'id', type: { name: 'String' @@ -95,6 +125,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' @@ -102,10 +133,19 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'PolicySku' + } } } } diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb index b65f76cea2..a26abae56e 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition.rb index 22d02feec4..caa74fb957 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,12 +12,16 @@ class PolicyDefinition include MsRestAzure - include MsRest::JSONable # @return [PolicyType] The type of policy definition. Possible values are # NotSpecified, BuiltIn, and Custom. Possible values include: # 'NotSpecified', 'BuiltIn', 'Custom' attr_accessor :policy_type + # @return [PolicyMode] The policy definition mode. Possible values are + # NotSpecified, Indexed, and All. Possible values include: + # 'NotSpecified', 'Indexed', 'All' + attr_accessor :mode + # @return [String] The display name of the policy definition. attr_accessor :display_name @@ -27,15 +31,16 @@ class PolicyDefinition # @return The policy rule. attr_accessor :policy_rule + # @return The policy definition metadata. + attr_accessor :metadata + # @return Required if a parameter is used in policy rule. attr_accessor :parameters # @return [String] The ID of the policy definition. attr_accessor :id - # @return [String] The name of the policy definition. If you do not - # specify a value for name, the value is inferred from the name value in - # the request URI. + # @return [String] The name of the policy definition. attr_accessor :name @@ -58,6 +63,13 @@ def self.mapper() name: 'String' } }, + mode: { + required: false, + serialized_name: 'properties.mode', + type: { + name: 'String' + } + }, display_name: { required: false, serialized_name: 'properties.displayName', @@ -79,6 +91,13 @@ def self.mapper() name: 'Object' } }, + metadata: { + required: false, + serialized_name: 'properties.metadata', + type: { + name: 'Object' + } + }, parameters: { required: false, serialized_name: 'properties.parameters', @@ -88,6 +107,7 @@ def self.mapper() }, id: { required: false, + read_only: true, serialized_name: 'id', type: { name: 'String' @@ -95,6 +115,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition_list_result.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition_list_result.rb index 56ab89b8db..dc135c22bd 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition_reference.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition_reference.rb new file mode 100644 index 0000000000..33a960634d --- /dev/null +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_definition_reference.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::ARM::Policy + module Models + # + # The policy definition reference. + # + class PolicyDefinitionReference + + include MsRestAzure + + # @return [String] The ID of the policy definition or policy set + # definition. + attr_accessor :policy_definition_id + + # @return Required if a parameter is used in policy rule. + attr_accessor :parameters + + + # + # Mapper for PolicyDefinitionReference class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicyDefinitionReference', + type: { + name: 'Composite', + class_name: 'PolicyDefinitionReference', + model_properties: { + policy_definition_id: { + required: false, + serialized_name: 'policyDefinitionId', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'parameters', + type: { + name: 'Object' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_mode.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_mode.rb new file mode 100644 index 0000000000..53189353c2 --- /dev/null +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_mode.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Policy + module Models + # + # Defines values for PolicyMode + # + module PolicyMode + NotSpecified = "NotSpecified" + Indexed = "Indexed" + All = "All" + end + end +end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_set_definition.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_set_definition.rb new file mode 100644 index 0000000000..ef9ec85026 --- /dev/null +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_set_definition.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::ARM::Policy + module Models + # + # The policy set definition. + # + class PolicySetDefinition + + include MsRestAzure + + # @return [PolicyType] The type of policy definition. Possible values are + # NotSpecified, BuiltIn, and Custom. Possible values include: + # 'NotSpecified', 'BuiltIn', 'Custom' + attr_accessor :policy_type + + # @return [String] The display name of the policy set definition. + attr_accessor :display_name + + # @return [String] The policy set definition description. + attr_accessor :description + + # @return The policy set definition metadata. + attr_accessor :metadata + + # @return The policy set definition parameters that can be used in policy + # definition references. + attr_accessor :parameters + + # @return [Array] An array of policy + # definition references. + attr_accessor :policy_definitions + + # @return [String] The ID of the policy set definition. + attr_accessor :id + + # @return [String] The name of the policy set definition. + attr_accessor :name + + # @return [String] The type of the resource + # (Microsoft.Authorization/policySetDefinitions). + attr_accessor :type + + + # + # Mapper for PolicySetDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicySetDefinition', + type: { + name: 'Composite', + class_name: 'PolicySetDefinition', + model_properties: { + policy_type: { + required: false, + serialized_name: 'properties.policyType', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + metadata: { + required: false, + serialized_name: 'properties.metadata', + type: { + name: 'Object' + } + }, + parameters: { + required: false, + serialized_name: 'properties.parameters', + type: { + name: 'Object' + } + }, + policy_definitions: { + required: true, + serialized_name: 'properties.policyDefinitions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PolicyDefinitionReferenceElementType', + type: { + name: 'Composite', + class_name: 'PolicyDefinitionReference' + } + } + } + }, + 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_policy/lib/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb new file mode 100644 index 0000000000..eed390898e --- /dev/null +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_set_definition_list_result.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::ARM::Policy + module Models + # + # List of policy set definitions. + # + class PolicySetDefinitionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] An array of policy set + # definitions. + attr_accessor :value + + # @return [String] The URL to use for getting the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [PolicySetDefinitionListResult] 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 PolicySetDefinitionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicySetDefinitionListResult', + type: { + name: 'Composite', + class_name: 'PolicySetDefinitionListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PolicySetDefinitionElementType', + type: { + name: 'Composite', + class_name: 'PolicySetDefinition' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_sku.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_sku.rb new file mode 100644 index 0000000000..5ce8c4742f --- /dev/null +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_sku.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::ARM::Policy + module Models + # + # The policy sku. + # + class PolicySku + + include MsRestAzure + + # @return [String] The name of the policy sku. Possible values are A0 and + # A1. + attr_accessor :name + + # @return [String] The policy sku tier. Possible values are Free and + # Standard. + attr_accessor :tier + + + # + # Mapper for PolicySku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicySku', + type: { + name: 'Composite', + class_name: 'PolicySku', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tier: { + required: false, + serialized_name: 'tier', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_type.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_type.rb index 555f97c7ad..f4cdbfb6a2 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_type.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/models/policy_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/module_definition.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/module_definition.rb index 1d42e099d8..062e20922d 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/module_definition.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_assignments.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_assignments.rb index 9985641d96..bd997d2ad6 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_assignments.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_assignments.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -67,7 +67,7 @@ def delete_with_http_info(scope, policy_assignment_name, custom_headers = nil) def delete_async(scope, policy_assignment_name, custom_headers = nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' request_headers = {} @@ -75,7 +75,7 @@ def delete_async(scope, policy_assignment_name, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' request_url = @base_url || @client.base_url @@ -83,7 +83,7 @@ def delete_async(scope, policy_assignment_name, custom_headers = nil) middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'policyAssignmentName' => policy_assignment_name}, skip_encoding_path_params: {'scope' => scope}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -93,9 +93,9 @@ def delete_async(scope, policy_assignment_name, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -174,7 +174,7 @@ def create_async(scope, policy_assignment_name, parameters, custom_headers = nil fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' request_headers = {} @@ -190,7 +190,7 @@ def create_async(scope, policy_assignment_name, parameters, custom_headers = nil request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = '{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' request_url = @base_url || @client.base_url @@ -198,7 +198,7 @@ def create_async(scope, policy_assignment_name, parameters, custom_headers = nil middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'policyAssignmentName' => policy_assignment_name}, skip_encoding_path_params: {'scope' => scope}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -211,7 +211,7 @@ def create_async(scope, policy_assignment_name, parameters, custom_headers = nil response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -277,7 +277,7 @@ def get_with_http_info(scope, policy_assignment_name, custom_headers = nil) def get_async(scope, policy_assignment_name, custom_headers = nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'policy_assignment_name is nil' if policy_assignment_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' request_headers = {} @@ -285,7 +285,7 @@ def get_async(scope, policy_assignment_name, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}' + path_template = '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}' request_url = @base_url || @client.base_url @@ -293,7 +293,7 @@ def get_async(scope, policy_assignment_name, custom_headers = nil) middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'policyAssignmentName' => policy_assignment_name}, skip_encoding_path_params: {'scope' => scope}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -305,7 +305,7 @@ def get_async(scope, policy_assignment_name, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -370,7 +370,7 @@ def list_for_resource_group_with_http_info(resource_group_name, filter = nil, cu # def list_for_resource_group_async(resource_group_name, filter = nil, 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? + api_version = '2017-06-01-preview' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -386,7 +386,7 @@ def list_for_resource_group_async(resource_group_name, filter = nil, custom_head 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}, + query_params: {'api-version' => api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -399,7 +399,7 @@ def list_for_resource_group_async(resource_group_name, filter = nil, custom_head response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -486,7 +486,7 @@ def list_for_resource_async(resource_group_name, resource_provider_namespace, pa fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil? fail ArgumentError, 'resource_type is nil' if resource_type.nil? fail ArgumentError, 'resource_name is nil' if resource_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -495,7 +495,7 @@ def list_for_resource_async(resource_group_name, resource_provider_namespace, pa # Set Headers request_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/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments' + path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments' request_url = @base_url || @client.base_url @@ -503,7 +503,7 @@ def list_for_resource_async(resource_group_name, resource_provider_namespace, pa middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'resourceProviderNamespace' => resource_provider_namespace,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id}, skip_encoding_path_params: {'parentResourcePath' => parent_resource_path,'resourceType' => resource_type}, - query_params: {'$filter' => filter,'api-version' => @client.api_version}, + query_params: {'$filter' => filter,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -515,7 +515,7 @@ def list_for_resource_async(resource_group_name, resource_provider_namespace, pa response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -573,7 +573,7 @@ def list_with_http_info(filter = nil, custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(filter = nil, custom_headers = nil) - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -582,14 +582,14 @@ def list_async(filter = nil, custom_headers = nil) # Set Headers request_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.Authorization/policyassignments' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments' 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: {'$filter' => filter,'api-version' => @client.api_version}, + query_params: {'$filter' => filter,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -601,7 +601,7 @@ def list_async(filter = nil, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -687,7 +687,7 @@ def delete_by_id_with_http_info(policy_assignment_id, custom_headers = nil) # def delete_by_id_async(policy_assignment_id, custom_headers = nil) fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' request_headers = {} @@ -702,7 +702,7 @@ def delete_by_id_async(policy_assignment_id, custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -714,7 +714,7 @@ def delete_by_id_async(policy_assignment_id, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -810,7 +810,7 @@ def create_by_id_with_http_info(policy_assignment_id, parameters, custom_headers def create_by_id_async(policy_assignment_id, parameters, custom_headers = nil) fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' request_headers = {} @@ -833,7 +833,7 @@ def create_by_id_async(policy_assignment_id, parameters, custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -846,7 +846,7 @@ def create_by_id_async(policy_assignment_id, parameters, custom_headers = nil) response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -932,7 +932,7 @@ def get_by_id_with_http_info(policy_assignment_id, custom_headers = nil) # def get_by_id_async(policy_assignment_id, custom_headers = nil) fail ArgumentError, 'policy_assignment_id is nil' if policy_assignment_id.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-06-01-preview' request_headers = {} @@ -947,7 +947,7 @@ def get_by_id_async(policy_assignment_id, custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'policyAssignmentId' => policy_assignment_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -959,7 +959,7 @@ def get_by_id_async(policy_assignment_id, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -1046,7 +1046,7 @@ def list_for_resource_group_next_async(next_page_link, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -1133,7 +1133,7 @@ def list_for_resource_next_async(next_page_link, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? @@ -1220,7 +1220,7 @@ def list_next_async(next_page_link, custom_headers = nil) response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_client.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_client.rb index b6f8ce000d..55d96376db 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_client.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -20,9 +20,6 @@ class PolicyClient < MsRestAzure::AzureServiceClient # @return [String] The ID of the target subscription. attr_accessor :subscription_id - # @return [String] The API version to use for the operation. - attr_reader :api_version - # @return [String] Gets or sets the preferred language for the response. attr_accessor :accept_language @@ -37,6 +34,9 @@ class PolicyClient < MsRestAzure::AzureServiceClient # @return [PolicyAssignments] policy_assignments attr_reader :policy_assignments + # @return [PolicySetDefinitions] policy_set_definitions + attr_reader :policy_set_definitions + # @return [PolicyDefinitions] policy_definitions attr_reader :policy_definitions @@ -54,8 +54,8 @@ def initialize(credentials = nil, base_url = nil, options = nil) @credentials = credentials @policy_assignments = PolicyAssignments.new(self) + @policy_set_definitions = PolicySetDefinitions.new(self) @policy_definitions = PolicyDefinitions.new(self) - @api_version = '2016-12-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_definitions.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_definitions.rb index 523a4dc480..7ece5ca668 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_definitions.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_definitions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -67,7 +67,7 @@ def create_or_update_with_http_info(policy_definition_name, parameters, custom_h def create_or_update_async(policy_definition_name, parameters, custom_headers = nil) fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2016-12-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -84,14 +84,14 @@ def create_or_update_async(policy_definition_name, parameters, custom_headers = 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.Authorization/policydefinitions/{policyDefinitionName}' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'policyDefinitionName' => policy_definition_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -165,7 +165,7 @@ def delete_with_http_info(policy_definition_name, custom_headers = nil) # def delete_async(policy_definition_name, custom_headers = nil) fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2016-12-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -174,14 +174,14 @@ def delete_async(policy_definition_name, custom_headers = nil) # Set Headers request_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.Authorization/policydefinitions/{policyDefinitionName}' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'policyDefinitionName' => policy_definition_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -245,7 +245,7 @@ def get_with_http_info(policy_definition_name, custom_headers = nil) # def get_async(policy_definition_name, custom_headers = nil) fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2016-12-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -254,14 +254,14 @@ def get_async(policy_definition_name, custom_headers = nil) # Set Headers request_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.Authorization/policydefinitions/{policyDefinitionName}' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'policyDefinitionName' => policy_definition_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -294,45 +294,579 @@ def get_async(policy_definition_name, custom_headers = nil) promise.execute end + # + # Gets the built in policy definition. + # + # @param policy_definition_name [String] The name of the built in policy + # definition to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyDefinition] operation results. + # + def get_built_in(policy_definition_name, custom_headers = nil) + response = get_built_in_async(policy_definition_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the built in policy definition. + # + # @param policy_definition_name [String] The name of the built in policy + # definition to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_built_in_with_http_info(policy_definition_name, custom_headers = nil) + get_built_in_async(policy_definition_name, custom_headers).value! + end + + # + # Gets the built in policy definition. + # + # @param policy_definition_name [String] The name of the built in policy + # definition to get. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_built_in_async(policy_definition_name, custom_headers = nil) + fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil? + api_version = '2016-12-01' + + + request_headers = {} + + # Set 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.Authorization/policyDefinitions/{policyDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policyDefinitionName' => policy_definition_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicyDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # create. + # @param parameters [PolicyDefinition] The policy definition properties. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyDefinition] operation results. + # + def create_or_update_at_management_group(policy_definition_name, parameters, management_group_id, custom_headers = nil) + response = create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # create. + # @param parameters [PolicyDefinition] The policy definition properties. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_at_management_group_with_http_info(policy_definition_name, parameters, management_group_id, custom_headers = nil) + create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers).value! + end + + # + # Creates or updates a policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # create. + # @param parameters [PolicyDefinition] The policy definition properties. + # @param management_group_id [String] The ID of the management group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_at_management_group_async(policy_definition_name, parameters, management_group_id, custom_headers = nil) + fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2016-12-01' + fail ArgumentError, 'management_group_id is nil' if management_group_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Policy::Models::PolicyDefinition.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policyDefinitionName' => policy_definition_name,'managementGroupId' => management_group_id}, + query_params: {'api-version' => 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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicyDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # delete. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_at_management_group(policy_definition_name, management_group_id, custom_headers = nil) + response = delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value! + nil + end + + # + # Deletes a policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # delete. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_at_management_group_with_http_info(policy_definition_name, management_group_id, custom_headers = nil) + delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value! + end + + # + # Deletes a policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # delete. + # @param management_group_id [String] The ID of the management group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_at_management_group_async(policy_definition_name, management_group_id, custom_headers = nil) + fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil? + api_version = '2016-12-01' + fail ArgumentError, 'management_group_id is nil' if management_group_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 = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policyDefinitionName' => policy_definition_name,'managementGroupId' => management_group_id}, + query_params: {'api-version' => 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 == 204 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # get. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyDefinition] operation results. + # + def get_at_management_group(policy_definition_name, management_group_id, custom_headers = nil) + response = get_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # get. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_at_management_group_with_http_info(policy_definition_name, management_group_id, custom_headers = nil) + get_at_management_group_async(policy_definition_name, management_group_id, custom_headers).value! + end + + # + # Gets the policy definition at management group level. + # + # @param policy_definition_name [String] The name of the policy definition to + # get. + # @param management_group_id [String] The ID of the management group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_at_management_group_async(policy_definition_name, management_group_id, custom_headers = nil) + fail ArgumentError, 'policy_definition_name is nil' if policy_definition_name.nil? + api_version = '2016-12-01' + fail ArgumentError, 'management_group_id is nil' if management_group_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 = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policyDefinitionName' => policy_definition_name,'managementGroupId' => management_group_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicyDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy definitions for a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets all the policy definitions for a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + # # Gets all the policy definitions for a subscription. # - # @param filter [String] The filter to apply on the 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_async(custom_headers = nil) + api_version = '2016-12-01' + 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.Authorization/policyDefinitions' + + 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' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicyDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the built in policy definitions. + # + # @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_built_in(custom_headers = nil) + first_page = list_built_in_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets all the built in policy definitions. + # + # @param custom_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_built_in_with_http_info(custom_headers = nil) + list_built_in_async(custom_headers).value! + end + + # + # Gets all the built in policy definitions. + # + # @param [Hash{String => String}] 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_built_in_async(custom_headers = nil) + api_version = '2016-12-01' + + + request_headers = {} + + # Set 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.Authorization/policyDefinitions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicyDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy definitions for a subscription at management group level. + # + # @param management_group_id [String] The ID of the management 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(filter = nil, custom_headers = nil) - first_page = list_as_lazy(filter, custom_headers) + def list_by_management_group(management_group_id, custom_headers = nil) + first_page = list_by_management_group_as_lazy(management_group_id, custom_headers) first_page.get_all_items end # - # Gets all the policy definitions for a subscription. + # Gets all the policy definitions for a subscription at management group level. # - # @param filter [String] The filter to apply on the operation. + # @param management_group_id [String] The ID of the management 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_with_http_info(filter = nil, custom_headers = nil) - list_async(filter, custom_headers).value! + def list_by_management_group_with_http_info(management_group_id, custom_headers = nil) + list_by_management_group_async(management_group_id, custom_headers).value! end # - # Gets all the policy definitions for a subscription. + # Gets all the policy definitions for a subscription at management group level. # - # @param filter [String] The filter to apply on the operation. + # @param management_group_id [String] The ID of the management 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_async(filter = nil, custom_headers = nil) - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + def list_by_management_group_async(management_group_id, custom_headers = nil) + api_version = '2016-12-01' + fail ArgumentError, 'management_group_id is nil' if management_group_id.nil? request_headers = {} @@ -340,14 +874,14 @@ def list_async(filter = nil, custom_headers = nil) # Set Headers request_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.Authorization/policydefinitions' + path_template = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions' 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: {'$filter' => filter,'api-version' => @client.api_version}, + path_params: {'managementGroupId' => management_group_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -467,18 +1001,191 @@ def list_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Gets all the built in policy definitions. + # + # @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 [PolicyDefinitionListResult] operation results. + # + def list_built_in_next(next_page_link, custom_headers = nil) + response = list_built_in_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the built in policy definitions. + # + # @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_built_in_next_with_http_info(next_page_link, custom_headers = nil) + list_built_in_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the built in policy definitions. + # + # @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_built_in_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicyDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy definitions for a subscription at management group 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 [PolicyDefinitionListResult] operation results. + # + def list_by_management_group_next(next_page_link, custom_headers = nil) + response = list_by_management_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the policy definitions for a subscription at management group 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_management_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_management_group_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the policy definitions for a subscription at management group 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_management_group_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicyDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Gets all the policy definitions for a subscription. # - # @param filter [String] The filter to apply on the operation. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [PolicyDefinitionListResult] which provide lazy access to pages of # the response. # - def list_as_lazy(filter = nil, custom_headers = nil) - response = list_async(filter, 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| @@ -488,5 +1195,46 @@ def list_as_lazy(filter = nil, custom_headers = nil) end end + # + # Gets all the built in policy definitions. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyDefinitionListResult] which provide lazy access to pages of + # the response. + # + def list_built_in_as_lazy(custom_headers = nil) + response = list_built_in_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_built_in_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all the policy definitions for a subscription at management group level. + # + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyDefinitionListResult] which provide lazy access to pages of + # the response. + # + def list_by_management_group_as_lazy(management_group_id, custom_headers = nil) + response = list_by_management_group_async(management_group_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_management_group_next_async(next_page_link, custom_headers) + end + page + end + end + end end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_set_definitions.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_set_definitions.rb new file mode 100644 index 0000000000..9d3eb06058 --- /dev/null +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/policy_set_definitions.rb @@ -0,0 +1,1260 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Policy + # + # To manage and control access to your resources, you can define customized + # policies and assign them at a scope. + # + class PolicySetDefinitions + include MsRestAzure + + # + # Creates and initializes a new instance of the PolicySetDefinitions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [PolicyClient] reference to the PolicyClient + attr_reader :client + + # + # Creates or updates a policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to create. + # @param parameters [PolicySetDefinition] The policy set definition properties. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinition] operation results. + # + def create_or_update(policy_set_definition_name, parameters, custom_headers = nil) + response = create_or_update_async(policy_set_definition_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to create. + # @param parameters [PolicySetDefinition] The policy set definition properties. + # @param custom_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(policy_set_definition_name, parameters, custom_headers = nil) + create_or_update_async(policy_set_definition_name, parameters, custom_headers).value! + end + + # + # Creates or updates a policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to create. + # @param parameters [PolicySetDefinition] The policy set definition properties. + # @param [Hash{String => String}] 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(policy_set_definition_name, parameters, custom_headers = nil) + fail ArgumentError, 'policy_set_definition_name is nil' if policy_set_definition_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2017-06-01-preview' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Policy::Models::PolicySetDefinition.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.Authorization/policySetDefinitions/{policySetDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policySetDefinitionName' => policy_set_definition_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Policy::Models::PolicySetDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicySetDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(policy_set_definition_name, custom_headers = nil) + response = delete_async(policy_set_definition_name, custom_headers).value! + nil + end + + # + # Deletes a policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to delete. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(policy_set_definition_name, custom_headers = nil) + delete_async(policy_set_definition_name, custom_headers).value! + end + + # + # Deletes a policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to delete. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(policy_set_definition_name, custom_headers = nil) + fail ArgumentError, 'policy_set_definition_name is nil' if policy_set_definition_name.nil? + api_version = '2017-06-01-preview' + 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.Authorization/policySetDefinitions/{policySetDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policySetDefinitionName' => policy_set_definition_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 204 || 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 policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinition] operation results. + # + def get(policy_set_definition_name, custom_headers = nil) + response = get_async(policy_set_definition_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(policy_set_definition_name, custom_headers = nil) + get_async(policy_set_definition_name, custom_headers).value! + end + + # + # Gets the policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(policy_set_definition_name, custom_headers = nil) + fail ArgumentError, 'policy_set_definition_name is nil' if policy_set_definition_name.nil? + api_version = '2017-06-01-preview' + 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.Authorization/policySetDefinitions/{policySetDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policySetDefinitionName' => policy_set_definition_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Policy::Models::PolicySetDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 built in policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinition] operation results. + # + def get_built_in(policy_set_definition_name, custom_headers = nil) + response = get_built_in_async(policy_set_definition_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the built in policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_built_in_with_http_info(policy_set_definition_name, custom_headers = nil) + get_built_in_async(policy_set_definition_name, custom_headers).value! + end + + # + # Gets the built in policy set definition. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_built_in_async(policy_set_definition_name, custom_headers = nil) + fail ArgumentError, 'policy_set_definition_name is nil' if policy_set_definition_name.nil? + api_version = '2017-06-01-preview' + + + request_headers = {} + + # Set 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.Authorization/policySetDefinitions/{policySetDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policySetDefinitionName' => policy_set_definition_name}, + query_params: {'api-version' => 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::ARM::Policy::Models::PolicySetDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy set definitions for a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets all the policy set definitions for a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets all the policy set definitions for a 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) + api_version = '2017-06-01-preview' + 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.Authorization/policySetDefinitions' + + 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' => 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::ARM::Policy::Models::PolicySetDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the built in policy set definitions. + # + # @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_built_in(custom_headers = nil) + first_page = list_built_in_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets all the built in policy set definitions. + # + # @param custom_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_built_in_with_http_info(custom_headers = nil) + list_built_in_async(custom_headers).value! + end + + # + # Gets all the built in policy set definitions. + # + # @param [Hash{String => String}] 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_built_in_async(custom_headers = nil) + api_version = '2017-06-01-preview' + + + request_headers = {} + + # Set 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.Authorization/policySetDefinitions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'api-version' => 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::ARM::Policy::Models::PolicySetDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to create. + # @param parameters [PolicySetDefinition] The policy set definition properties. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinition] operation results. + # + def create_or_update_at_management_group(policy_set_definition_name, parameters, management_group_id, custom_headers = nil) + response = create_or_update_at_management_group_async(policy_set_definition_name, parameters, management_group_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to create. + # @param parameters [PolicySetDefinition] The policy set definition properties. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_at_management_group_with_http_info(policy_set_definition_name, parameters, management_group_id, custom_headers = nil) + create_or_update_at_management_group_async(policy_set_definition_name, parameters, management_group_id, custom_headers).value! + end + + # + # Creates or updates a policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to create. + # @param parameters [PolicySetDefinition] The policy set definition properties. + # @param management_group_id [String] The ID of the management group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_at_management_group_async(policy_set_definition_name, parameters, management_group_id, custom_headers = nil) + fail ArgumentError, 'policy_set_definition_name is nil' if policy_set_definition_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2017-06-01-preview' + fail ArgumentError, 'management_group_id is nil' if management_group_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Policy::Models::PolicySetDefinition.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policySetDefinitionName' => policy_set_definition_name,'managementGroupId' => management_group_id}, + query_params: {'api-version' => 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::ARM::Policy::Models::PolicySetDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicySetDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to delete. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_at_management_group(policy_set_definition_name, management_group_id, custom_headers = nil) + response = delete_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers).value! + nil + end + + # + # Deletes a policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to delete. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_at_management_group_with_http_info(policy_set_definition_name, management_group_id, custom_headers = nil) + delete_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers).value! + end + + # + # Deletes a policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to delete. + # @param management_group_id [String] The ID of the management group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers = nil) + fail ArgumentError, 'policy_set_definition_name is nil' if policy_set_definition_name.nil? + api_version = '2017-06-01-preview' + fail ArgumentError, 'management_group_id is nil' if management_group_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 = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policySetDefinitionName' => policy_set_definition_name,'managementGroupId' => management_group_id}, + query_params: {'api-version' => 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 == 204 || 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 policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinition] operation results. + # + def get_at_management_group(policy_set_definition_name, management_group_id, custom_headers = nil) + response = get_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_at_management_group_with_http_info(policy_set_definition_name, management_group_id, custom_headers = nil) + get_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers).value! + end + + # + # Gets the policy set definition at management group level. + # + # @param policy_set_definition_name [String] The name of the policy set + # definition to get. + # @param management_group_id [String] The ID of the management group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_at_management_group_async(policy_set_definition_name, management_group_id, custom_headers = nil) + fail ArgumentError, 'policy_set_definition_name is nil' if policy_set_definition_name.nil? + api_version = '2017-06-01-preview' + fail ArgumentError, 'management_group_id is nil' if management_group_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 = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'policySetDefinitionName' => policy_set_definition_name,'managementGroupId' => management_group_id}, + query_params: {'api-version' => 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::ARM::Policy::Models::PolicySetDefinition.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy set definitions for a subscription at management group. + # + # @param management_group_id [String] The ID of the management 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_management_group(management_group_id, custom_headers = nil) + first_page = list_by_management_group_as_lazy(management_group_id, custom_headers) + first_page.get_all_items + end + + # + # Gets all the policy set definitions for a subscription at management group. + # + # @param management_group_id [String] The ID of the management 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_management_group_with_http_info(management_group_id, custom_headers = nil) + list_by_management_group_async(management_group_id, custom_headers).value! + end + + # + # Gets all the policy set definitions for a subscription at management group. + # + # @param management_group_id [String] The ID of the management 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_management_group_async(management_group_id, custom_headers = nil) + api_version = '2017-06-01-preview' + fail ArgumentError, 'management_group_id is nil' if management_group_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 = 'providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'managementGroupId' => management_group_id}, + query_params: {'api-version' => 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::ARM::Policy::Models::PolicySetDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy set definitions for a 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 [PolicySetDefinitionListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the policy set definitions for a subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the policy set definitions for a 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicySetDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the built in policy set definitions. + # + # @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 [PolicySetDefinitionListResult] operation results. + # + def list_built_in_next(next_page_link, custom_headers = nil) + response = list_built_in_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the built in policy set definitions. + # + # @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_built_in_next_with_http_info(next_page_link, custom_headers = nil) + list_built_in_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the built in policy set definitions. + # + # @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_built_in_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::ARM::Policy::Models::PolicySetDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy set definitions for a subscription at management 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 [PolicySetDefinitionListResult] operation results. + # + def list_by_management_group_next(next_page_link, custom_headers = nil) + response = list_by_management_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the policy set definitions for a subscription at management 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_management_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_management_group_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the policy set definitions for a subscription at management 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_management_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Policy::Models::PolicySetDefinitionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the policy set definitions for a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinitionListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(custom_headers = nil) + response = list_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all the built in policy set definitions. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinitionListResult] which provide lazy access to pages of + # the response. + # + def list_built_in_as_lazy(custom_headers = nil) + response = list_built_in_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_built_in_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all the policy set definitions for a subscription at management group. + # + # @param management_group_id [String] The ID of the management group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicySetDefinitionListResult] which provide lazy access to pages of + # the response. + # + def list_by_management_group_as_lazy(management_group_id, custom_headers = nil) + response = list_by_management_group_async(management_group_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_management_group_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/version.rb b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/version.rb index 80ef7c9a83..20f244fa78 100644 --- a/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/version.rb +++ b/management/azure_mgmt_policy/lib/generated/azure_mgmt_policy/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Policy - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_powerbi_embedded/azure_mgmt_powerbi_embedded.gemspec b/management/azure_mgmt_powerbi_embedded/azure_mgmt_powerbi_embedded.gemspec index 65f4407f28..702349adbf 100644 --- a/management/azure_mgmt_powerbi_embedded/azure_mgmt_powerbi_embedded.gemspec +++ b/management/azure_mgmt_powerbi_embedded/azure_mgmt_powerbi_embedded.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded.rb index 2c62f461c5..fd65ba6682 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/access_key_name.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/access_key_name.rb index 5a6cdce93d..e0ecb2ff7d 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/access_key_name.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/access_key_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/azure_sku.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/azure_sku.rb index f9d595c99a..b7fefb62c4 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/azure_sku.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/azure_sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AzureSku include MsRestAzure - include MsRest::JSONable # @return [String] SKU name. Default value: 'S1' . attr_accessor :name diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_reason.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_reason.rb index 96cb14e861..8a0e14d095 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_reason.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_request.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_request.rb index c2cc0dc4fd..0a6b9a5384 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_request.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CheckNameRequest include MsRestAzure - include MsRest::JSONable # @return [String] Workspace collection name attr_accessor :name diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_response.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_response.rb index 08610c4ded..3252d65926 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_response.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/check_name_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CheckNameResponse include MsRestAzure - include MsRest::JSONable # @return [Boolean] Specifies a Boolean value that indicates whether the # specified Power BI Workspace Collection name is available to use. attr_accessor :name_available diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/create_workspace_collection_request.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/create_workspace_collection_request.rb index 6950c8c40d..7dfe32435d 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/create_workspace_collection_request.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/create_workspace_collection_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CreateWorkspaceCollectionRequest include MsRestAzure - include MsRest::JSONable # @return [String] Azure location attr_accessor :location diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/display.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/display.rb index 9e1919f514..63af1ecfb4 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/display.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Display include MsRestAzure - include MsRest::JSONable # @return [String] The localized friendly form of the resource provider # name. This form is also expected to include the publisher/company # responsible. Use Title Casing. Begin with “Microsoft” for 1st party diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error.rb index 712b8272ff..171732d8f2 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Error include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :code diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error_detail.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error_detail.rb index 6d1b3ac0dc..5ac0c2dd5a 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error_detail.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/error_detail.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ErrorDetail include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :code diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/migrate_workspace_collection_request.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/migrate_workspace_collection_request.rb index 1beabc5a1e..6c0bc868e7 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/migrate_workspace_collection_request.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/migrate_workspace_collection_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class MigrateWorkspaceCollectionRequest include MsRestAzure - include MsRest::JSONable # @return [String] Name of the resource group the Power BI workspace # collections will be migrated to. attr_accessor :target_resource_group diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation.rb index ec596de6ce..f1a30e0f4f 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] The name of the operation being performed on this # particular object. This name should match the action name that appears # in RBAC / the event service. diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation_list.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation_list.rb index 6048f22774..fc1aea1038 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation_list.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/operation_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class OperationList include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :value diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/update_workspace_collection_request.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/update_workspace_collection_request.rb index 58486f60ae..fcd5835a50 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/update_workspace_collection_request.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/update_workspace_collection_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class UpdateWorkspaceCollectionRequest include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] attr_accessor :tags diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace.rb index fb8d21cab2..a205ffbd7b 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Workspace include MsRestAzure - include MsRest::JSONable # @return [String] Workspace id attr_accessor :id diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection.rb index ec27b77f0a..a5b2d7bdc9 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class WorkspaceCollection include MsRestAzure - include MsRest::JSONable # @return [String] Resource id attr_accessor :id diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_key.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_key.rb index f634d2277e..e21b8fc266 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_key.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class WorkspaceCollectionAccessKey include MsRestAzure - include MsRest::JSONable # @return [AccessKeyName] Key name. Possible values include: 'key1', # 'key2' attr_accessor :key_name diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_keys.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_keys.rb index cade20fe9d..aef244cafe 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_keys.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_access_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class WorkspaceCollectionAccessKeys include MsRestAzure - include MsRest::JSONable # @return [String] Access key 1 attr_accessor :key1 diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_list.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_list.rb index 58e38cfb03..0816ca8d66 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_list.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_collection_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class WorkspaceCollectionList include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :value diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_list.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_list.rb index 396f6194d6..72571e92cb 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_list.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/models/workspace_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class WorkspaceList include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :value diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/module_definition.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/module_definition.rb index ee4d6bb170..97df95b31a 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/module_definition.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/power_biembedded_management_client.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/power_biembedded_management_client.rb index 3de93e3788..e3927535c0 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/power_biembedded_management_client.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/power_biembedded_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/version.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/version.rb index 9ce8020676..8fc188a581 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/version.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::PowerBiEmbedded - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspace_collections.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspace_collections.rb index 9fdbe2cbc1..3a521984ac 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspace_collections.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspace_collections.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspaces.rb b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspaces.rb index 852c5e06a3..e46bf632ef 100644 --- a/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspaces.rb +++ b/management/azure_mgmt_powerbi_embedded/lib/generated/azure_mgmt_powerbi_embedded/workspaces.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/azure_mgmt_recovery_services.gemspec b/management/azure_mgmt_recovery_services/azure_mgmt_recovery_services.gemspec index 37e390b900..d63d6a9afd 100644 --- a/management/azure_mgmt_recovery_services/azure_mgmt_recovery_services.gemspec +++ b/management/azure_mgmt_recovery_services/azure_mgmt_recovery_services.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services.rb index 83fd859278..df0d137ea5 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -33,26 +33,27 @@ module Azure::ARM::RecoveryServices module Models autoload :VaultCertificateResponse, 'generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb' + autoload :JobsSummary, 'generated/azure_mgmt_recovery_services/models/jobs_summary.rb' autoload :VaultList, 'generated/azure_mgmt_recovery_services/models/vault_list.rb' - autoload :ClientDiscoveryResponse, 'generated/azure_mgmt_recovery_services/models/client_discovery_response.rb' - autoload :Sku, 'generated/azure_mgmt_recovery_services/models/sku.rb' autoload :ResourceCertificateDetails, 'generated/azure_mgmt_recovery_services/models/resource_certificate_details.rb' - autoload :VaultProperties, 'generated/azure_mgmt_recovery_services/models/vault_properties.rb' + autoload :Sku, 'generated/azure_mgmt_recovery_services/models/sku.rb' + autoload :UpgradeDetails, 'generated/azure_mgmt_recovery_services/models/upgrade_details.rb' autoload :ClientDiscoveryValueForSingleApi, 'generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb' - autoload :NameInfo, 'generated/azure_mgmt_recovery_services/models/name_info.rb' - autoload :JobsSummary, 'generated/azure_mgmt_recovery_services/models/jobs_summary.rb' - autoload :RawCertificateData, 'generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb' - autoload :MonitoringSummary, 'generated/azure_mgmt_recovery_services/models/monitoring_summary.rb' autoload :VaultUsageList, 'generated/azure_mgmt_recovery_services/models/vault_usage_list.rb' + autoload :ClientDiscoveryResponse, 'generated/azure_mgmt_recovery_services/models/client_discovery_response.rb' + autoload :Resource, 'generated/azure_mgmt_recovery_services/models/resource.rb' + autoload :MonitoringSummary, 'generated/azure_mgmt_recovery_services/models/monitoring_summary.rb' + autoload :CertificateRequest, 'generated/azure_mgmt_recovery_services/models/certificate_request.rb' autoload :ReplicationUsage, 'generated/azure_mgmt_recovery_services/models/replication_usage.rb' - autoload :VaultUsage, 'generated/azure_mgmt_recovery_services/models/vault_usage.rb' autoload :ReplicationUsageList, 'generated/azure_mgmt_recovery_services/models/replication_usage_list.rb' - autoload :CertificateRequest, 'generated/azure_mgmt_recovery_services/models/certificate_request.rb' + autoload :VaultUsage, 'generated/azure_mgmt_recovery_services/models/vault_usage.rb' autoload :ClientDiscoveryDisplay, 'generated/azure_mgmt_recovery_services/models/client_discovery_display.rb' - autoload :Resource, 'generated/azure_mgmt_recovery_services/models/resource.rb' + autoload :NameInfo, 'generated/azure_mgmt_recovery_services/models/name_info.rb' autoload :ClientDiscoveryForLogSpecification, 'generated/azure_mgmt_recovery_services/models/client_discovery_for_log_specification.rb' - autoload :UpgradeDetails, 'generated/azure_mgmt_recovery_services/models/upgrade_details.rb' + autoload :RawCertificateData, 'generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb' autoload :ClientDiscoveryForServiceSpecification, 'generated/azure_mgmt_recovery_services/models/client_discovery_for_service_specification.rb' + autoload :VaultProperties, 'generated/azure_mgmt_recovery_services/models/vault_properties.rb' + autoload :ClientDiscoveryForProperties, 'generated/azure_mgmt_recovery_services/models/client_discovery_for_properties.rb' autoload :BackupStorageConfig, 'generated/azure_mgmt_recovery_services/models/backup_storage_config.rb' autoload :BackupVaultConfig, 'generated/azure_mgmt_recovery_services/models/backup_vault_config.rb' autoload :VaultExtendedInfoResource, 'generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb' diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_storage_configs.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_storage_configs.rb index 418774cfb1..d1bd61b4bc 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_storage_configs.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_storage_configs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_vault_configs.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_vault_configs.rb index e7065f81ec..2c4c7e7692 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_vault_configs.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/backup_vault_configs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/auth_type.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/auth_type.rb index 003b955b9e..67caef652c 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/auth_type.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/auth_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_storage_config.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_storage_config.rb index 1243ad0c18..332795c717 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_storage_config.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_storage_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The backup storage config. # - class BackupStorageConfig < MsRestAzure::Resource + class BackupStorageConfig < Resource include MsRestAzure - include MsRest::JSONable # @return [StorageModelType] Storage model type. Possible values include: # 'Invalid', 'GeoRedundant', 'LocallyRedundant' attr_accessor :storage_model_type diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_vault_config.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_vault_config.rb index 6ad0cdc086..1d4e9e6c48 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_vault_config.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/backup_vault_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Backup vault config details. # - class BackupVaultConfig < MsRestAzure::Resource + class BackupVaultConfig < Resource include MsRestAzure - include MsRest::JSONable # @return [StorageType] Storage type. Possible values include: 'Invalid', # 'GeoRedundant', 'LocallyRedundant' attr_accessor :storage_type diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/certificate_request.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/certificate_request.rb index d8668236c1..93fde9c310 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/certificate_request.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/certificate_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CertificateRequest include MsRestAzure - include MsRest::JSONable # @return [RawCertificateData] attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_display.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_display.rb index 1d99560999..542ff83ba0 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_display.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,17 +12,16 @@ class ClientDiscoveryDisplay include MsRestAzure - include MsRest::JSONable - # @return [String] Name of the resource provider. + # @return [String] Name of the provider for display purposes attr_accessor :provider - # @return [String] Type of the resource. + # @return [String] Name of the resource type for display purposes attr_accessor :resource - # @return [String] Name of the operation. + # @return [String] Name of the operation for display purposes attr_accessor :operation - # @return [String] Operation description. + # @return [String] Description of the operation for display purposes attr_accessor :description @@ -40,7 +39,6 @@ def self.mapper() model_properties: { provider: { required: false, - read_only: true, serialized_name: 'Provider', type: { name: 'String' @@ -48,7 +46,6 @@ def self.mapper() }, resource: { required: false, - read_only: true, serialized_name: 'Resource', type: { name: 'String' @@ -56,7 +53,6 @@ def self.mapper() }, operation: { required: false, - read_only: true, serialized_name: 'Operation', type: { name: 'String' @@ -64,7 +60,6 @@ def self.mapper() }, description: { required: false, - read_only: true, serialized_name: 'Description', type: { name: 'String' diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_log_specification.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_log_specification.rb index 74c9ff90a2..ee640523c9 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_log_specification.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_log_specification.rb @@ -1,25 +1,24 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::RecoveryServices module Models # - # Log specification for the operation. + # Class to represent shoebox log specification in json client discovery. # class ClientDiscoveryForLogSpecification include MsRestAzure - include MsRest::JSONable # @return [String] Name of the log. attr_accessor :name - # @return [String] Localized display name. + # @return [String] Localized display name attr_accessor :display_name - # @return [DateTime] Blob duration. + # @return [String] Blobs created in customer storage account per hour attr_accessor :blob_duration @@ -37,7 +36,6 @@ def self.mapper() model_properties: { name: { required: false, - read_only: true, serialized_name: 'name', type: { name: 'String' @@ -45,7 +43,6 @@ def self.mapper() }, display_name: { required: false, - read_only: true, serialized_name: 'displayName', type: { name: 'String' @@ -53,10 +50,9 @@ def self.mapper() }, blob_duration: { required: false, - read_only: true, serialized_name: 'blobDuration', type: { - name: 'DateTime' + name: 'String' } } } diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_properties.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_properties.rb new file mode 100644 index 0000000000..1e3e520613 --- /dev/null +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_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::ARM::RecoveryServices + module Models + # + # Class to represent shoebox properties in json client discovery. + # + class ClientDiscoveryForProperties + + include MsRestAzure + + # @return [ClientDiscoveryForServiceSpecification] Operation properties. + attr_accessor :service_specification + + + # + # Mapper for ClientDiscoveryForProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClientDiscoveryForProperties', + type: { + name: 'Composite', + class_name: 'ClientDiscoveryForProperties', + model_properties: { + service_specification: { + required: false, + serialized_name: 'serviceSpecification', + type: { + name: 'Composite', + class_name: 'ClientDiscoveryForServiceSpecification' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_service_specification.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_service_specification.rb index 24077117d8..8bec22ab76 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_service_specification.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_service_specification.rb @@ -1,18 +1,18 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::RecoveryServices module Models # - # Operation properties. + # Class to represent shoebox service specification in json client + # discovery. # class ClientDiscoveryForServiceSpecification include MsRestAzure - include MsRest::JSONable # @return [Array] List of log # specifications of this operation. attr_accessor :log_specifications @@ -32,7 +32,6 @@ def self.mapper() model_properties: { log_specifications: { required: false, - read_only: true, serialized_name: 'logSpecifications', type: { name: 'Sequence', diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_response.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_response.rb index 704596d054..49d80ed248 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_response.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_response.rb @@ -1,12 +1,12 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::RecoveryServices module Models # - # List of available operations. + # Operations List response which contains list of available APIs. # class ClientDiscoveryResponse @@ -17,7 +17,7 @@ class ClientDiscoveryResponse # operationss. attr_accessor :value - # @return [String] NextLink + # @return [String] NextLink of the Response. attr_accessor :next_link # return [Proc] with next page method call. @@ -66,7 +66,6 @@ def self.mapper() model_properties: { value: { required: false, - read_only: true, serialized_name: 'Value', type: { name: 'Sequence', @@ -82,7 +81,6 @@ def self.mapper() }, next_link: { required: false, - read_only: true, serialized_name: 'NextLink', type: { name: 'String' diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb index 61e681294d..ac9b950bc0 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,19 +12,19 @@ class ClientDiscoveryValueForSingleApi include MsRestAzure - include MsRest::JSONable - # @return [String] Name of the operation. + # @return [String] Name of the operation attr_accessor :name # @return [ClientDiscoveryDisplay] Contains the localized display - # information for this particular operation. + # information for this particular operation attr_accessor :display - # @return [String] The intended executor of the operation. + # @return [String] The intended executor of the operation;governs the + # display of the operation in the RBAC UX and the audit logs UX attr_accessor :origin - # @return [ClientDiscoveryForServiceSpecification] Operation properties. - attr_accessor :service_specification + # @return [ClientDiscoveryForProperties] Properties + attr_accessor :properties # @@ -41,7 +41,6 @@ def self.mapper() model_properties: { name: { required: false, - read_only: true, serialized_name: 'Name', type: { name: 'String' @@ -49,7 +48,6 @@ def self.mapper() }, display: { required: false, - read_only: true, serialized_name: 'Display', type: { name: 'Composite', @@ -58,19 +56,17 @@ def self.mapper() }, origin: { required: false, - read_only: true, serialized_name: 'Origin', type: { name: 'String' } }, - service_specification: { + properties: { required: false, - read_only: true, - serialized_name: 'Properties.serviceSpecification', + serialized_name: 'Properties', type: { name: 'Composite', - class_name: 'ClientDiscoveryForServiceSpecification' + class_name: 'ClientDiscoveryForProperties' } } } diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/enhanced_security_state.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/enhanced_security_state.rb index 6915885d9a..515b4d9779 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/enhanced_security_state.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/enhanced_security_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/jobs_summary.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/jobs_summary.rb index 16d7a4cc47..000a7396c5 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/jobs_summary.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/jobs_summary.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class JobsSummary include MsRestAzure - include MsRest::JSONable # @return [Integer] Count of failed jobs. attr_accessor :failed_jobs diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/monitoring_summary.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/monitoring_summary.rb index 44b99d7254..401313d9a8 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/monitoring_summary.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/monitoring_summary.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MonitoringSummary include MsRestAzure - include MsRest::JSONable # @return [Integer] Count of unhealthy VMs. attr_accessor :un_healthy_vm_count diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/name_info.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/name_info.rb index 6258713d2e..39a9ab816b 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/name_info.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/name_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NameInfo include MsRestAzure - include MsRest::JSONable # @return [String] Value of usage. attr_accessor :value diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb index 8113281955..42b8ed6ded 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RawCertificateData include MsRestAzure - include MsRest::JSONable # @return [AuthType] Specifies the authentication type. Possible values # include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', # 'AzureActiveDirectory' diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage.rb index e94f6c4925..4eff8649c6 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ReplicationUsage include MsRestAzure - include MsRest::JSONable # @return [MonitoringSummary] Summary of the replication monitoring data # for this vault. attr_accessor :monitoring_summary diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage_list.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage_list.rb index cf8b280fee..52bd887254 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage_list.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/replication_usage_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ReplicationUsageList include MsRestAzure - include MsRest::JSONable # @return [Array] The list of replication usages for # the given vault. attr_accessor :value diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource.rb index e498b1c561..73d29c04e4 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,21 @@ module Models # # ARM Resource. # - class Resource < MsRestAzure::Resource + class Resource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id represents the complete path to the + # resource. + attr_accessor :id + + # @return [String] Resource name associated with the resource. + attr_accessor :name + + # @return [String] Resource type represents the complete path of the form + # Namespace/ResourceType/ResourceType/... + attr_accessor :type + # @return [String] Optional ETag. attr_accessor :e_tag diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_aad_details.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_aad_details.rb index a707437813..b91032b5db 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_aad_details.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_aad_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceCertificateAndAadDetails < ResourceCertificateDetails include MsRestAzure - include MsRest::JSONable def initialize @authType = "AzureActiveDirectory" diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_acs_details.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_acs_details.rb index 6e5a742c81..257e8cd541 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_acs_details.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_acs_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceCertificateAndAcsDetails < ResourceCertificateDetails include MsRestAzure - include MsRest::JSONable def initialize @authType = "AccessControlService" diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_details.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_details.rb index 7f2162f03a..1374c724a0 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_details.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceCertificateDetails include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["AzureActiveDirectory"] = "ResourceCertificateAndAadDetails" @@discriminatorMap["AccessControlService"] = "ResourceCertificateAndAcsDetails" diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku.rb index a0ca57db70..0ec0b22573 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] The Sku name. Possible values include: 'Standard', # 'RS0' attr_accessor :name diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku_name.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku_name.rb index dffc8353af..ed666ce174 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku_name.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_model_type.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_model_type.rb index 0c9e8a17a5..3c52ced0fb 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_model_type.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_model_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type.rb index 3060fe1988..8f791a540f 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type_state.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type_state.rb index c9ee761d13..f5272e0df0 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type_state.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/storage_type_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/tracked_resource.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/tracked_resource.rb index 1f035e4d9e..7b569e20a9 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/tracked_resource.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/tracked_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Tracked resource with location. # - class TrackedResource < MsRestAzure::Resource + class TrackedResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Resource location. attr_accessor :location diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/trigger_type.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/trigger_type.rb index c29efb43ee..66aa39d50b 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/trigger_type.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/trigger_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/upgrade_details.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/upgrade_details.rb index 8d588e1b7c..3db29926fc 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/upgrade_details.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/upgrade_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UpgradeDetails include MsRestAzure - include MsRest::JSONable # @return [String] ID of the vault upgrade operation. attr_accessor :operation_id diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/usages_unit.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/usages_unit.rb index 2b33a431ba..650e0fbbf0 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/usages_unit.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/usages_unit.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault.rb index 307e02c4d9..eef74b8158 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Vault < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [VaultProperties] attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb index 57f6701a48..6efdc2e509 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class VaultCertificateResponse include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :name diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb index ba28bf5f40..4c62a8b927 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Vault extended information. # - class VaultExtendedInfoResource < MsRestAzure::Resource + class VaultExtendedInfoResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Integrity key. attr_accessor :integrity_key diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_list.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_list.rb index 591fa278a0..994a82784a 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_list.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VaultList include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :value diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_properties.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_properties.rb index d3481b6c07..e36db76ace 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_properties.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VaultProperties include MsRestAzure - include MsRest::JSONable # @return [String] Provisioning State. attr_accessor :provisioning_state diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_upgrade_state.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_upgrade_state.rb index 6a8ea0e558..4ef76c1441 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_upgrade_state.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_upgrade_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage.rb index d7b533395e..874bf0f99e 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VaultUsage include MsRestAzure - include MsRest::JSONable # @return [UsagesUnit] Unit of the usage. Possible values include: # 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', # 'BytesPerSecond' diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage_list.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage_list.rb index 3245c91e2a..42f72b5020 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage_list.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/models/vault_usage_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VaultUsageList include MsRestAzure - include MsRest::JSONable # @return [Array] The list of usages for the given vault. attr_accessor :value diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/module_definition.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/module_definition.rb index 2eeba3328f..046bffa682 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/module_definition.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/operations.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/operations.rb index e3be6e17c5..974ad4873b 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/operations.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -24,46 +24,38 @@ def initialize(client) # # Returns the list of available operations. # - # @param resource_group_name [String] The name of the resource group where the - # recovery services vault is present. # @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, custom_headers = nil) - first_page = list_as_lazy(resource_group_name, custom_headers) + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) first_page.get_all_items end # # Returns the list of available operations. # - # @param resource_group_name [String] The name of the resource group where the - # recovery services vault is present. # @param custom_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, custom_headers = nil) - list_async(resource_group_name, custom_headers).value! + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! end # # Returns the list of available operations. # - # @param resource_group_name [String] The name of the resource group where the - # recovery services vault is present. # @param [Hash{String => String}] 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, custom_headers = nil) - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + def list_async(custom_headers = nil) api_version = '2016-06-01' - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? request_headers = {} @@ -71,13 +63,12 @@ def list_async(resource_group_name, custom_headers = nil) # Set Headers request_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.RecoveryServices/operations' + path_template = 'providers/Microsoft.RecoveryServices/operations' 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}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -201,16 +192,14 @@ def list_next_async(next_page_link, custom_headers = nil) # # Returns the list of available operations. # - # @param resource_group_name [String] The name of the resource group where the - # recovery services vault is present. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [ClientDiscoveryResponse] which provide lazy access to pages of the # response. # - def list_as_lazy(resource_group_name, custom_headers = nil) - response = list_async(resource_group_name, 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| diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/recovery_services_client.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/recovery_services_client.rb index 23d203b1a0..ac743efd5a 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/recovery_services_client.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/recovery_services_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/registered_identities.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/registered_identities.rb index 4329e5d228..25aef1aafb 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/registered_identities.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/registered_identities.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/replication_usages.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/replication_usages.rb index 2ce084dc3c..9068342ba4 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/replication_usages.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/replication_usages.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/usages.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/usages.rb index bb104bc2d8..f513a1dda5 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/usages.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/usages.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_certificates.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_certificates.rb index 61f0f993e4..64614b5034 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_certificates.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_certificates.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb index 48f4092937..7dfcca26bf 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vaults.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vaults.rb index d3637e78ac..e17524f3de 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vaults.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/vaults.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/version.rb b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/version.rb index 8f69baebb9..f31c466ae0 100644 --- a/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/version.rb +++ b/management/azure_mgmt_recovery_services/lib/generated/azure_mgmt_recovery_services/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::RecoveryServices - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_recovery_services_backup/azure_mgmt_recovery_services_backup.gemspec b/management/azure_mgmt_recovery_services_backup/azure_mgmt_recovery_services_backup.gemspec index 5a597c2baa..d37358be3a 100644 --- a/management/azure_mgmt_recovery_services_backup/azure_mgmt_recovery_services_backup.gemspec +++ b/management/azure_mgmt_recovery_services_backup/azure_mgmt_recovery_services_backup.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup.rb index 5e9ceeaded..fcabbdfbd7 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -24,6 +24,8 @@ require 'ms_rest_azure' module Azure::ARM::RecoveryServicesBackup + autoload :BackupJobs, 'generated/azure_mgmt_recovery_services_backup/backup_jobs.rb' + autoload :JobDetails, 'generated/azure_mgmt_recovery_services_backup/job_details.rb' autoload :BackupResourceVaultConfigs, 'generated/azure_mgmt_recovery_services_backup/backup_resource_vault_configs.rb' autoload :BackupEngines, 'generated/azure_mgmt_recovery_services_backup/backup_engines.rb' autoload :ProtectionContainerRefreshOperationResults, 'generated/azure_mgmt_recovery_services_backup/protection_container_refresh_operation_results.rb' @@ -36,8 +38,6 @@ module Azure::ARM::RecoveryServicesBackup autoload :RecoveryPoints, 'generated/azure_mgmt_recovery_services_backup/recovery_points.rb' autoload :ItemLevelRecoveryConnections, 'generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb' autoload :Restores, 'generated/azure_mgmt_recovery_services_backup/restores.rb' - autoload :BackupJobs, 'generated/azure_mgmt_recovery_services_backup/backup_jobs.rb' - autoload :JobDetails, 'generated/azure_mgmt_recovery_services_backup/job_details.rb' autoload :JobCancellations, 'generated/azure_mgmt_recovery_services_backup/job_cancellations.rb' autoload :JobOperationResults, 'generated/azure_mgmt_recovery_services_backup/job_operation_results.rb' autoload :ExportJobsOperationResults, 'generated/azure_mgmt_recovery_services_backup/export_jobs_operation_results.rb' @@ -58,89 +58,93 @@ module Azure::ARM::RecoveryServicesBackup autoload :RecoveryServicesBackupClient, 'generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb' module Models - autoload :KeyAndSecretDetails, 'generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb' - autoload :RecoveryPointTierInformation, 'generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_information.rb' + autoload :OperationWorkerResponse, 'generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb' + autoload :AzureIaaSVMErrorInfo, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb' + autoload :BackupResourceVaultConfig, 'generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config.rb' + autoload :AzureIaaSVMJobExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb' + autoload :OperationStatus, 'generated/azure_mgmt_recovery_services_backup/models/operation_status.rb' + autoload :DpmErrorInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb' + autoload :BEKDetails, 'generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb' + autoload :DpmJobExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb' autoload :BMSBackupEngineQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engine_query_object.rb' + autoload :Job, 'generated/azure_mgmt_recovery_services_backup/models/job.rb' autoload :BMSBackupEnginesQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engines_query_object.rb' - autoload :ClientDiscoveryResponse, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_response.rb' + autoload :BackupManagementUsageList, 'generated/azure_mgmt_recovery_services_backup/models/backup_management_usage_list.rb' + autoload :OperationResultInfoBase, 'generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb' + autoload :BackupRequest, 'generated/azure_mgmt_recovery_services_backup/models/backup_request.rb' + autoload :MabJobTaskDetails, 'generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb' + autoload :WorkloadProtectableItem, 'generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb' + autoload :ProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/protected_item.rb' + autoload :BackupResourceConfig, 'generated/azure_mgmt_recovery_services_backup/models/backup_resource_config.rb' + autoload :ResourceList, 'generated/azure_mgmt_recovery_services_backup/models/resource_list.rb' + autoload :AzureIaaSVMJobTaskDetails, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb' + autoload :ProtectedItemQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb' + autoload :ProtectionContainer, 'generated/azure_mgmt_recovery_services_backup/models/protection_container.rb' + autoload :MabFileFolderProtectedItemExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb' + autoload :KeyAndSecretDetails, 'generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb' + autoload :MabContainerExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb' + autoload :DpmJobTaskDetails, 'generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb' + autoload :RecoveryPoint, 'generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb' + autoload :KEKDetails, 'generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb' + autoload :AzureIaaSVMHealthDetails, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmhealth_details.rb' + autoload :JobQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb' + autoload :MonthlyRetentionSchedule, 'generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb' + autoload :RecoveryPointTierInformation, 'generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_information.rb' + autoload :RetentionPolicy, 'generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb' autoload :BMSBackupSummariesQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/bmsbackup_summaries_query_object.rb' - autoload :ClientDiscoveryForProperties, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_properties.rb' + autoload :WeeklyRetentionSchedule, 'generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb' autoload :BMSContainerQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/bmscontainer_query_object.rb' - autoload :ClientDiscoveryForLogSpecification, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_log_specification.rb' + autoload :InstantItemRecoveryTarget, 'generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb' autoload :BMSPOQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/bmspoquery_object.rb' - autoload :AzureIaaSVMErrorInfo, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb' + autoload :BackupEngineExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/backup_engine_extended_info.rb' autoload :BMSRPQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/bmsrpquery_object.rb' - autoload :AzureIaaSVMJobTaskDetails, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb' + autoload :ILRRequest, 'generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb' autoload :ClientScriptForConnect, 'generated/azure_mgmt_recovery_services_backup/models/client_script_for_connect.rb' - autoload :WorkloadProtectableItem, 'generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb' + autoload :NameInfo, 'generated/azure_mgmt_recovery_services_backup/models/name_info.rb' autoload :Day, 'generated/azure_mgmt_recovery_services_backup/models/day.rb' - autoload :TokenInformation, 'generated/azure_mgmt_recovery_services_backup/models/token_information.rb' + autoload :MabErrorInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb' autoload :DailyRetentionFormat, 'generated/azure_mgmt_recovery_services_backup/models/daily_retention_format.rb' - autoload :RetentionPolicy, 'generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb' + autoload :Resource, 'generated/azure_mgmt_recovery_services_backup/models/resource.rb' autoload :RetentionDuration, 'generated/azure_mgmt_recovery_services_backup/models/retention_duration.rb' - autoload :ResourceList, 'generated/azure_mgmt_recovery_services_backup/models/resource_list.rb' + autoload :ProtectionPolicy, 'generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb' autoload :DailyRetentionSchedule, 'generated/azure_mgmt_recovery_services_backup/models/daily_retention_schedule.rb' - autoload :Resource, 'generated/azure_mgmt_recovery_services_backup/models/resource.rb' - autoload :OperationWorkerResponse, 'generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb' - autoload :BackupEngineExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/backup_engine_extended_info.rb' - autoload :OperationStatus, 'generated/azure_mgmt_recovery_services_backup/models/operation_status.rb' - autoload :ProtectionPolicyQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb' - autoload :DpmErrorInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb' - autoload :NameInfo, 'generated/azure_mgmt_recovery_services_backup/models/name_info.rb' - autoload :DpmJobTaskDetails, 'generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb' - autoload :BackupManagementUsageList, 'generated/azure_mgmt_recovery_services_backup/models/backup_management_usage_list.rb' - autoload :DpmJobExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb' - autoload :ProtectionContainer, 'generated/azure_mgmt_recovery_services_backup/models/protection_container.rb' + autoload :YearlyRetentionSchedule, 'generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb' autoload :OperationStatusExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/operation_status_extended_info.rb' - autoload :ProtectedItemQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb' - autoload :DPMProtectedItemExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item_extended_info.rb' - autoload :ProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/protected_item.rb' + autoload :SchedulePolicy, 'generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb' autoload :OperationStatusError, 'generated/azure_mgmt_recovery_services_backup/models/operation_status_error.rb' + autoload :AzureSqlProtectedItemExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb' + autoload :DPMProtectedItemExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item_extended_info.rb' + autoload :BackupEngineBase, 'generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb' + autoload :BackupManagementUsage, 'generated/azure_mgmt_recovery_services_backup/models/backup_management_usage.rb' autoload :EncryptionDetails, 'generated/azure_mgmt_recovery_services_backup/models/encryption_details.rb' - autoload :ClientDiscoveryForServiceSpecification, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_service_specification.rb' - autoload :OperationResultInfoBase, 'generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb' - autoload :AzureIaaSVMHealthDetails, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmhealth_details.rb' - autoload :MabJobExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb' + autoload :DPMContainerExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpmcontainer_extended_info.rb' + autoload :ClientDiscoveryResponse, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_response.rb' autoload :AzureIaaSVMProtectedItemExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item_extended_info.rb' - autoload :GetProtectedItemQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb' - autoload :RestoreRequest, 'generated/azure_mgmt_recovery_services_backup/models/restore_request.rb' - autoload :MabJobTaskDetails, 'generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb' - autoload :RecoveryPoint, 'generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb' - autoload :MabFileFolderProtectedItemExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb' - autoload :ProtectionPolicy, 'generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb' - autoload :MabErrorInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb' - autoload :BackupRequest, 'generated/azure_mgmt_recovery_services_backup/models/backup_request.rb' - autoload :MabContainerExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb' - autoload :BackupResourceVaultConfig, 'generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config.rb' - autoload :KEKDetails, 'generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb' autoload :ClientDiscoveryValueForSingleApi, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_value_for_single_api.rb' - autoload :DPMContainerExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/dpmcontainer_extended_info.rb' - autoload :AzureIaaSVMJobExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb' - autoload :YearlyRetentionSchedule, 'generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb' - autoload :AzureSqlProtectedItemExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb' - autoload :MonthlyRetentionSchedule, 'generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb' - autoload :BackupManagementUsage, 'generated/azure_mgmt_recovery_services_backup/models/backup_management_usage.rb' + autoload :RestoreRequest, 'generated/azure_mgmt_recovery_services_backup/models/restore_request.rb' + autoload :GetProtectedItemQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb' + autoload :MabJobExtendedInfo, 'generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb' + autoload :ClientDiscoveryForProperties, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_properties.rb' autoload :WeeklyRetentionFormat, 'generated/azure_mgmt_recovery_services_backup/models/weekly_retention_format.rb' - autoload :BEKDetails, 'generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb' - autoload :ILRRequest, 'generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb' - autoload :SchedulePolicy, 'generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb' - autoload :WeeklyRetentionSchedule, 'generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb' - autoload :BackupResourceConfig, 'generated/azure_mgmt_recovery_services_backup/models/backup_resource_config.rb' - autoload :InstantItemRecoveryTarget, 'generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb' - autoload :BackupEngineBase, 'generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb' - autoload :Job, 'generated/azure_mgmt_recovery_services_backup/models/job.rb' + autoload :ClientDiscoveryForServiceSpecification, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_service_specification.rb' + autoload :ProtectionPolicyQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb' + autoload :ClientDiscoveryForLogSpecification, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_log_specification.rb' + autoload :TokenInformation, 'generated/azure_mgmt_recovery_services_backup/models/token_information.rb' autoload :ClientDiscoveryDisplay, 'generated/azure_mgmt_recovery_services_backup/models/client_discovery_display.rb' - autoload :JobQueryObject, 'generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb' + autoload :AzureIaaSVMJob, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb' + autoload :DpmJob, 'generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb' + autoload :JobResource, 'generated/azure_mgmt_recovery_services_backup/models/job_resource.rb' + autoload :JobResourceList, 'generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb' + autoload :MabJob, 'generated/azure_mgmt_recovery_services_backup/models/mab_job.rb' autoload :AzureBackupServerContainer, 'generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_container.rb' autoload :AzureBackupServerEngine, 'generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_engine.rb' autoload :AzureIaaSClassicComputeVMContainer, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmcontainer.rb' autoload :AzureIaaSClassicComputeVMProtectableItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotectable_item.rb' - autoload :AzureIaaSClassicComputeVMProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb' autoload :AzureIaaSComputeVMContainer, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmcontainer.rb' autoload :AzureIaaSComputeVMProtectableItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotectable_item.rb' - autoload :AzureIaaSComputeVMProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb' - autoload :AzureIaaSVMJob, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb' autoload :AzureIaaSVMProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item.rb' + autoload :AzureIaaSClassicComputeVMProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb' + autoload :AzureIaaSComputeVMProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb' autoload :AzureIaaSVMProtectionPolicy, 'generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotection_policy.rb' autoload :AzureSqlContainer, 'generated/azure_mgmt_recovery_services_backup/models/azure_sql_container.rb' autoload :AzureSqlProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item.rb' @@ -152,7 +156,6 @@ module Models autoload :BackupResourceVaultConfigResource, 'generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config_resource.rb' autoload :DpmBackupEngine, 'generated/azure_mgmt_recovery_services_backup/models/dpm_backup_engine.rb' autoload :DpmContainer, 'generated/azure_mgmt_recovery_services_backup/models/dpm_container.rb' - autoload :DpmJob, 'generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb' autoload :DPMProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item.rb' autoload :ExportJobsOperationResultInfo, 'generated/azure_mgmt_recovery_services_backup/models/export_jobs_operation_result_info.rb' autoload :GenericRecoveryPoint, 'generated/azure_mgmt_recovery_services_backup/models/generic_recovery_point.rb' @@ -163,13 +166,10 @@ module Models autoload :IaasVMRecoveryPoint, 'generated/azure_mgmt_recovery_services_backup/models/iaas_vmrecovery_point.rb' autoload :IaasVMRestoreRequest, 'generated/azure_mgmt_recovery_services_backup/models/iaas_vmrestore_request.rb' autoload :ILRRequestResource, 'generated/azure_mgmt_recovery_services_backup/models/ilrrequest_resource.rb' - autoload :JobResource, 'generated/azure_mgmt_recovery_services_backup/models/job_resource.rb' - autoload :JobResourceList, 'generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb' autoload :LongTermRetentionPolicy, 'generated/azure_mgmt_recovery_services_backup/models/long_term_retention_policy.rb' autoload :LongTermSchedulePolicy, 'generated/azure_mgmt_recovery_services_backup/models/long_term_schedule_policy.rb' autoload :MabContainer, 'generated/azure_mgmt_recovery_services_backup/models/mab_container.rb' autoload :MabFileFolderProtectedItem, 'generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item.rb' - autoload :MabJob, 'generated/azure_mgmt_recovery_services_backup/models/mab_job.rb' autoload :MabProtectionPolicy, 'generated/azure_mgmt_recovery_services_backup/models/mab_protection_policy.rb' autoload :OperationResultInfo, 'generated/azure_mgmt_recovery_services_backup/models/operation_result_info.rb' autoload :OperationResultInfoBaseResource, 'generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base_resource.rb' @@ -190,10 +190,14 @@ module Models autoload :WorkloadProtectableItemResource, 'generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource.rb' autoload :WorkloadProtectableItemResourceList, 'generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource_list.rb' autoload :JobSupportedAction, 'generated/azure_mgmt_recovery_services_backup/models/job_supported_action.rb' + autoload :BackupManagementType, 'generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb' + autoload :JobStatus, 'generated/azure_mgmt_recovery_services_backup/models/job_status.rb' + autoload :JobOperationType, 'generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb' + autoload :MabServerType, 'generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb' + autoload :WorkloadType, 'generated/azure_mgmt_recovery_services_backup/models/workload_type.rb' autoload :ProtectionState, 'generated/azure_mgmt_recovery_services_backup/models/protection_state.rb' autoload :HealthStatus, 'generated/azure_mgmt_recovery_services_backup/models/health_status.rb' autoload :ProtectedItemState, 'generated/azure_mgmt_recovery_services_backup/models/protected_item_state.rb' - autoload :BackupManagementType, 'generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb' autoload :UsagesUnit, 'generated/azure_mgmt_recovery_services_backup/models/usages_unit.rb' autoload :StorageType, 'generated/azure_mgmt_recovery_services_backup/models/storage_type.rb' autoload :StorageTypeState, 'generated/azure_mgmt_recovery_services_backup/models/storage_type_state.rb' @@ -204,15 +208,11 @@ module Models autoload :RecoveryPointTierType, 'generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_type.rb' autoload :RecoveryPointTierStatus, 'generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_status.rb' autoload :RecoveryType, 'generated/azure_mgmt_recovery_services_backup/models/recovery_type.rb' - autoload :JobStatus, 'generated/azure_mgmt_recovery_services_backup/models/job_status.rb' - autoload :JobOperationType, 'generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb' autoload :DayOfWeek, 'generated/azure_mgmt_recovery_services_backup/models/day_of_week.rb' autoload :RetentionScheduleFormat, 'generated/azure_mgmt_recovery_services_backup/models/retention_schedule_format.rb' autoload :WeekOfMonth, 'generated/azure_mgmt_recovery_services_backup/models/week_of_month.rb' autoload :MonthOfYear, 'generated/azure_mgmt_recovery_services_backup/models/month_of_year.rb' autoload :BackupItemType, 'generated/azure_mgmt_recovery_services_backup/models/backup_item_type.rb' - autoload :MabServerType, 'generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb' - autoload :WorkloadType, 'generated/azure_mgmt_recovery_services_backup/models/workload_type.rb' autoload :OperationStatusValues, 'generated/azure_mgmt_recovery_services_backup/models/operation_status_values.rb' autoload :HttpStatusCode, 'generated/azure_mgmt_recovery_services_backup/models/http_status_code.rb' autoload :DataSourceType, 'generated/azure_mgmt_recovery_services_backup/models/data_source_type.rb' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_engines.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_engines.rb index 350fb26049..f829cd12ee 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_engines.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_engines.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_jobs.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_jobs.rb index 2e88ad1cc9..1c06e33cbe 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_jobs.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_jobs.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -74,7 +74,7 @@ def list_with_http_info(vault_name, resource_group_name, filter = nil, skip_toke # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil) - api_version = '2016-12-01' + api_version = '2017-07-01' fail ArgumentError, 'vault_name is nil' if vault_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_results.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_results.rb index e8f5249c6c..381eb56598 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_results.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_results.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_statuses.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_statuses.rb index e092e4d608..63a226739d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_statuses.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_statuses.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_policies.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_policies.rb index db78f8e035..11f45853ae 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_policies.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_policies.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protectable_items.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protectable_items.rb index 5c6ba3694f..866fb71478 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protectable_items.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protectable_items.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protected_items.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protected_items.rb index 269b9ea7a2..4901d6d448 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protected_items.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protected_items.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -26,8 +26,7 @@ def initialize(client) attr_reader :client # - # Provides a pageable list of all items that can be backed up within a - # subscription. + # Provides a pageable list of all items that are backed up within a vault. # # @param vault_name [String] The name of the recovery services vault. # @param resource_group_name [String] The name of the resource group where the @@ -45,8 +44,7 @@ def list(vault_name, resource_group_name, filter = nil, skip_token = nil, custom end # - # Provides a pageable list of all items that can be backed up within a - # subscription. + # Provides a pageable list of all items that are backed up within a vault. # # @param vault_name [String] The name of the recovery services vault. # @param resource_group_name [String] The name of the resource group where the @@ -63,8 +61,7 @@ def list_with_http_info(vault_name, resource_group_name, filter = nil, skip_toke end # - # Provides a pageable list of all items that can be backed up within a - # subscription. + # Provides a pageable list of all items that are backed up within a vault. # # @param vault_name [String] The name of the recovery services vault. # @param resource_group_name [String] The name of the resource group where the @@ -129,8 +126,7 @@ def list_async(vault_name, resource_group_name, filter = nil, skip_token = nil, end # - # Provides a pageable list of all items that can be backed up within a - # subscription. + # Provides a pageable list of all items that are backed up within a vault. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -145,8 +141,7 @@ def list_next(next_page_link, custom_headers = nil) end # - # Provides a pageable list of all items that can be backed up within a - # subscription. + # Provides a pageable list of all items that are backed up within a vault. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -160,8 +155,7 @@ def list_next_with_http_info(next_page_link, custom_headers = nil) end # - # Provides a pageable list of all items that can be backed up within a - # subscription. + # Provides a pageable list of all items that are backed up within a vault. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -219,8 +213,7 @@ def list_next_async(next_page_link, custom_headers = nil) end # - # Provides a pageable list of all items that can be backed up within a - # subscription. + # Provides a pageable list of all items that are backed up within a vault. # # @param vault_name [String] The name of the recovery services vault. # @param resource_group_name [String] The name of the resource group where the diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protection_containers.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protection_containers.rb index 5bddf15f17..d6894a3bb7 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protection_containers.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_protection_containers.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_storage_configs.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_storage_configs.rb index d27bde6b9d..eaccaf15e4 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_storage_configs.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_storage_configs.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_vault_configs.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_vault_configs.rb index 89da9300b3..603ac6fc5d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_vault_configs.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_vault_configs.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -203,7 +203,7 @@ def update_async(vault_name, resource_group_name, parameters, custom_headers = n http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_usage_summaries.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_usage_summaries.rb index e7b862f693..970484ab19 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_usage_summaries.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backup_usage_summaries.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backups.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backups.rb index 6a783de340..1a71fb564b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backups.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/backups.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/export_jobs_operation_results.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/export_jobs_operation_results.rb index 8171ba3da9..de4e87bc08 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/export_jobs_operation_results.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/export_jobs_operation_results.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb index eb66daa560..5995c78eae 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb index f097acd3c2..523579bd49 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_details.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_details.rb index bf926d7dc8..42bcc6fc10 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_details.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_details.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -71,7 +71,7 @@ def get_with_http_info(vault_name, resource_group_name, job_name, custom_headers # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def get_async(vault_name, resource_group_name, job_name, custom_headers = nil) - api_version = '2016-12-01' + api_version = '2017-07-01' fail ArgumentError, 'vault_name is nil' if vault_name.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_operation_results.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_operation_results.rb index f1ab19f884..fbcd69461f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_operation_results.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/job_operation_results.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/jobs.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/jobs.rb index 263533bcce..f1b71edf17 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/jobs.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/jobs.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_container.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_container.rb index 00a913d5a8..90c82c59c6 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_container.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_container.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureBackupServerContainer < ProtectionContainer include MsRestAzure - include MsRest::JSONable def initialize @protectableObjectType = "AzureBackupServerContainer" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_engine.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_engine.rb index cfdbb9e01d..accee38c8c 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_engine.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_engine.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class AzureBackupServerEngine < BackupEngineBase include MsRestAzure - include MsRest::JSONable def initialize @backupEngineType = "AzureBackupServerEngine" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmcontainer.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmcontainer.rb index 9eabadaa44..2799478b88 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmcontainer.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmcontainer.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class AzureIaaSClassicComputeVMContainer < IaaSVMContainer include MsRestAzure - include MsRest::JSONable def initialize @protectableObjectType = "Microsoft.ClassicCompute/virtualMachines" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotectable_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotectable_item.rb index d1c55ce497..5b00d41b25 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotectable_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotectable_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class AzureIaaSClassicComputeVMProtectableItem < IaaSVMProtectableItem include MsRestAzure - include MsRest::JSONable def initialize @protectableItemType = "Microsoft.ClassicCompute/virtualMachines" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb index 0de21708bc..5d567d11d4 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class AzureIaaSClassicComputeVMProtectedItem < AzureIaaSVMProtectedItem include MsRestAzure - include MsRest::JSONable def initialize @protectedItemType = "Microsoft.ClassicCompute/virtualMachines" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmcontainer.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmcontainer.rb index 8c8522c7cd..fe35b14d77 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmcontainer.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmcontainer.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class AzureIaaSComputeVMContainer < IaaSVMContainer include MsRestAzure - include MsRest::JSONable def initialize @protectableObjectType = "Microsoft.Compute/virtualMachines" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotectable_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotectable_item.rb index 6239e816a3..08045c5177 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotectable_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotectable_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class AzureIaaSComputeVMProtectableItem < IaaSVMProtectableItem include MsRestAzure - include MsRest::JSONable def initialize @protectableItemType = "Microsoft.Compute/virtualMachines" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb index a23a237f0c..e4b041967a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class AzureIaaSComputeVMProtectedItem < AzureIaaSVMProtectedItem include MsRestAzure - include MsRest::JSONable def initialize @protectedItemType = "Microsoft.Compute/virtualMachines" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb index 903a95275e..4e89ef5822 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMErrorInfo include MsRestAzure - include MsRest::JSONable # @return [Integer] Error code. attr_accessor :error_code diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmhealth_details.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmhealth_details.rb index 2ba6a4be0e..db7aaae99b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmhealth_details.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmhealth_details.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMHealthDetails include MsRestAzure - include MsRest::JSONable # @return [Integer] Health Code attr_accessor :code diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb index 4095c0e5aa..9931e397aa 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMJob < Job include MsRestAzure - include MsRest::JSONable def initialize @jobType = "AzureIaaSVMJob" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb index 59583e83ea..4d5d79c31f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMJobExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [Array] List of tasks associated # with this job. attr_accessor :tasks_list diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb index 6d04becd68..ead2479f8a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMJobTaskDetails include MsRestAzure - include MsRest::JSONable # @return [String] The task display name. attr_accessor :task_id diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item.rb index 371d25b0a8..66003641ca 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMProtectedItem < ProtectedItem include MsRestAzure - include MsRest::JSONable def initialize @protectedItemType = "AzureIaaSVMProtectedItem" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item_extended_info.rb index c38ee8ac18..7903bbe694 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMProtectedItemExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [DateTime] The oldest backup copy available for this backup # item. attr_accessor :oldest_recovery_point diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotection_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotection_policy.rb index ab47cb94c5..497117f9f1 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotection_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotection_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureIaaSVMProtectionPolicy < ProtectionPolicy include MsRestAzure - include MsRest::JSONable def initialize @backupManagementType = "AzureIaasVM" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_container.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_container.rb index 8ae422ff82..8c8efbc364 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_container.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_container.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureSqlContainer < ProtectionContainer include MsRestAzure - include MsRest::JSONable def initialize @protectableObjectType = "AzureSqlContainer" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item.rb index 84892fe009..b702db1d56 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureSqlProtectedItem < ProtectedItem include MsRestAzure - include MsRest::JSONable def initialize @protectedItemType = "Microsoft.Sql/servers/databases" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb index 6e15d3983e..b95650e425 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureSqlProtectedItemExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [DateTime] The oldest backup copy available for this item in # the service. attr_accessor :oldest_recovery_point diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protection_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protection_policy.rb index 302b65af85..2bd8ed380f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protection_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protection_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class AzureSqlProtectionPolicy < ProtectionPolicy include MsRestAzure - include MsRest::JSONable def initialize @backupManagementType = "AzureSql" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb index ecae1750de..16e4c860f6 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class BackupEngineBase include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["AzureBackupServerEngine"] = "AzureBackupServerEngine" @@discriminatorMap["DpmBackupEngine"] = "DpmBackupEngine" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource.rb index 54275130ab..1d5103b8c8 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ module Models # The base backup engine class. All workload specific backup engines derive # from this class. # - class BackupEngineBaseResource < MsRestAzure::Resource + class BackupEngineBaseResource < Resource include MsRestAzure - include MsRest::JSONable # @return [BackupEngineBase] BackupEngineBaseResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource_list.rb index 3cd08a574e..de7a1c1fc6 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_extended_info.rb index 14ba6a23ac..0bdb1097a9 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BackupEngineExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [String] Database name of backup engine. attr_accessor :database_name diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_item_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_item_type.rb index efdbf0c6f8..df45cbcae9 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_item_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_item_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb index b11fd6d5ce..da284676b4 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage.rb index 295fb94cce..f65520d9cd 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BackupManagementUsage include MsRestAzure - include MsRest::JSONable # @return [UsagesUnit] Unit of the usage. Possible values include: # 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', # 'BytesPerSecond' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage_list.rb index fa225d66f7..cbecb5edbe 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BackupManagementUsageList include MsRestAzure - include MsRest::JSONable # @return [Array] The list of backup management # usages for the given vault. attr_accessor :value diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request.rb index 771cb254b6..43fabb438d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class BackupRequest include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["IaasVMBackupRequest"] = "IaasVMBackupRequest" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request_resource.rb index f8aa1437ff..587d28aaf7 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ module Models # Base class for backup request. Workload-specific backup requests are # derived from this class. # - class BackupRequestResource < MsRestAzure::Resource + class BackupRequestResource < Resource include MsRestAzure - include MsRest::JSONable # @return [BackupRequest] BackupRequestResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config.rb index 58f468bb7d..0907881cfa 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BackupResourceConfig include MsRestAzure - include MsRest::JSONable # @return [StorageType] Storage type. Possible values include: 'Invalid', # 'GeoRedundant', 'LocallyRedundant' attr_accessor :storage_type diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config_resource.rb index d36a0d6cb5..8870409646 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,10 @@ module Models # # The resource storage details. # - class BackupResourceConfigResource < MsRestAzure::Resource + class BackupResourceConfigResource < Resource include MsRestAzure - include MsRest::JSONable # @return [BackupResourceConfig] BackupResourceConfigResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config.rb index 0431502595..87b15cc0be 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BackupResourceVaultConfig include MsRestAzure - include MsRest::JSONable # @return [StorageType] Storage type. Possible values include: 'Invalid', # 'GeoRedundant', 'LocallyRedundant' attr_accessor :storage_type diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config_resource.rb index 45ae2818cd..b677aa8b66 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,10 @@ module Models # # Backup resource vault config details. # - class BackupResourceVaultConfigResource < MsRestAzure::Resource + class BackupResourceVaultConfigResource < Resource include MsRestAzure - include MsRest::JSONable # @return [BackupResourceVaultConfig] BackupResourceVaultConfigResource # properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb index 0097ac8563..0d5c0ccf7a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BEKDetails include MsRestAzure - include MsRest::JSONable # @return [String] Secret is BEK. attr_accessor :secret_url diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engine_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engine_query_object.rb index 65e627db72..d5c4f3017a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engine_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engine_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BMSBackupEngineQueryObject include MsRestAzure - include MsRest::JSONable # @return [String] attribute to add extended info attr_accessor :expand diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engines_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engines_query_object.rb index ad15c8416a..b211c50c21 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engines_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engines_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BMSBackupEnginesQueryObject include MsRestAzure - include MsRest::JSONable # @return [BackupManagementType] Backup management type for the backup # engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', # 'DPM', 'AzureBackupServer', 'AzureSql' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_summaries_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_summaries_query_object.rb index be4e3cdef3..30feee7377 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_summaries_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_summaries_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BMSBackupSummariesQueryObject include MsRestAzure - include MsRest::JSONable # @return [Type] Backup management type for this container. Possible # values include: 'Invalid', 'BackupProtectedItemCountSummary', # 'BackupProtectionContainerCountSummary' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmscontainer_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmscontainer_query_object.rb index a39a7b120b..708c51835a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmscontainer_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmscontainer_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BMSContainerQueryObject include MsRestAzure - include MsRest::JSONable # @return [BackupManagementType] Backup management type for this # container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', # 'DPM', 'AzureBackupServer', 'AzureSql' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmspoquery_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmspoquery_object.rb index eb29205d4d..7434e57aab 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmspoquery_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmspoquery_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BMSPOQueryObject include MsRestAzure - include MsRest::JSONable # @return [BackupManagementType] Backup management type. Possible values # include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', # 'AzureSql' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsrpquery_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsrpquery_object.rb index 9b289bf5af..3f3491574e 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsrpquery_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/bmsrpquery_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class BMSRPQueryObject include MsRestAzure - include MsRest::JSONable # @return [DateTime] Backup copies created after this time. attr_accessor :start_date diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_display.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_display.rb index 559f272770..3a1d422310 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_display.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_display.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ClientDiscoveryDisplay include MsRestAzure - include MsRest::JSONable # @return [String] Name of the provider for display purposes attr_accessor :provider diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_log_specification.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_log_specification.rb index fa33088a56..6e7cd12f18 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_log_specification.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_log_specification.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ClientDiscoveryForLogSpecification include MsRestAzure - include MsRest::JSONable # @return [String] Name attr_accessor :name diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_properties.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_properties.rb index 863f1578cd..d0706c764d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_properties.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_properties.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ClientDiscoveryForProperties include MsRestAzure - include MsRest::JSONable # @return [ClientDiscoveryForServiceSpecification] Operation properties. attr_accessor :service_specification diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_service_specification.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_service_specification.rb index b32a50b415..6f54c3d6bb 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_service_specification.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_service_specification.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class ClientDiscoveryForServiceSpecification include MsRestAzure - include MsRest::JSONable # @return [Array] List of log # specifications of this operation. attr_accessor :log_specifications diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_response.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_response.rb index 81473860db..26fc2438aa 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_response.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_response.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_value_for_single_api.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_value_for_single_api.rb index 5d12d500d8..675b52e974 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_value_for_single_api.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_value_for_single_api.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ClientDiscoveryValueForSingleApi include MsRestAzure - include MsRest::JSONable # @return [String] Name attr_accessor :name diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_script_for_connect.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_script_for_connect.rb index 526c5c821d..77d0402d59 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_script_for_connect.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/client_script_for_connect.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ClientScriptForConnect include MsRestAzure - include MsRest::JSONable # @return [String] File content of the client script for file / folder # restore. attr_accessor :script_content diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/container_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/container_type.rb index fd62415565..c7b677bee6 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/container_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/container_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_format.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_format.rb index 75adad37b7..5adfea3bad 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_format.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_format.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DailyRetentionFormat include MsRestAzure - include MsRest::JSONable # @return [Array] List of days of the month. attr_accessor :days_of_the_month diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_schedule.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_schedule.rb index f16d12aadc..97aa48c875 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_schedule.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_schedule.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DailyRetentionSchedule include MsRestAzure - include MsRest::JSONable # @return [Array] Retention times of retention policy. attr_accessor :retention_times diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/data_source_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/data_source_type.rb index 7ee232f64b..99069325c4 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/data_source_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/data_source_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day.rb index 161155c910..69594934cc 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class Day include MsRestAzure - include MsRest::JSONable # @return [Integer] Date of the month attr_accessor :date diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day_of_week.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day_of_week.rb index c99309a94d..786ada4571 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day_of_week.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/day_of_week.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_backup_engine.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_backup_engine.rb index 8dc09ec226..5925277168 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_backup_engine.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_backup_engine.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DpmBackupEngine < BackupEngineBase include MsRestAzure - include MsRest::JSONable def initialize @backupEngineType = "DpmBackupEngine" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_container.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_container.rb index 6c9f0d7cba..e213a83757 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_container.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_container.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DpmContainer < ProtectionContainer include MsRestAzure - include MsRest::JSONable def initialize @protectableObjectType = "DPMContainer" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb index 70bb52cadc..a953013788 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DpmErrorInfo include MsRestAzure - include MsRest::JSONable # @return [String] Localized error string. attr_accessor :error_string diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb index 8c47014bce..6816ab6f88 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DpmJob < Job include MsRestAzure - include MsRest::JSONable def initialize @jobType = "DpmJob" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb index 7b04bff44f..fc5dcdb37f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DpmJobExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [Array] List of tasks associated with this # job. attr_accessor :tasks_list diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb index 002d10c8a6..a4cd962ec4 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DpmJobTaskDetails include MsRestAzure - include MsRest::JSONable # @return [String] The task display name. attr_accessor :task_id diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmcontainer_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmcontainer_extended_info.rb index 56aceeca0c..ee92dc1d9e 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmcontainer_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmcontainer_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DPMContainerExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [DateTime] Last refresh time of the DPMContainer. attr_accessor :last_refreshed_at diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item.rb index 18140dae89..0446415dbb 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DPMProtectedItem < ProtectedItem include MsRestAzure - include MsRest::JSONable def initialize @protectedItemType = "DPMProtectedItem" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item_extended_info.rb index 6cbe20622a..7174d8cb8c 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class DPMProtectedItemExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Attribute to provide information on # various DBs. attr_accessor :protectable_object_load_path diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/encryption_details.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/encryption_details.rb index 31d64800de..a3cec28b00 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/encryption_details.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/encryption_details.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class EncryptionDetails include MsRestAzure - include MsRest::JSONable # @return [Boolean] Identifies whether this backup copy represents an # encrypted VM at the time of backup. attr_accessor :encryption_enabled diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/enhanced_security_state.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/enhanced_security_state.rb index 78109a9453..77d4b5bb59 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/enhanced_security_state.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/enhanced_security_state.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/export_jobs_operation_result_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/export_jobs_operation_result_info.rb index ea90d61606..9c0f4a322a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/export_jobs_operation_result_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/export_jobs_operation_result_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ExportJobsOperationResultInfo < OperationResultInfoBase include MsRestAzure - include MsRest::JSONable def initialize @objectType = "ExportJobsOperationResultInfo" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/generic_recovery_point.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/generic_recovery_point.rb index 532af87af9..e31f888046 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/generic_recovery_point.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/generic_recovery_point.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class GenericRecoveryPoint < RecoveryPoint include MsRestAzure - include MsRest::JSONable def initialize @objectType = "GenericRecoveryPoint" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb index c8a195dd13..ff2f45d705 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class GetProtectedItemQueryObject include MsRestAzure - include MsRest::JSONable # @return [String] Specifies if the additional information should be # provided for this item. attr_accessor :expand diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_state.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_state.rb index 1c00a43795..7d95b2ff28 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_state.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_state.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_status.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_status.rb index 28431dd024..1c021fcf24 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_status.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/health_status.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/http_status_code.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/http_status_code.rb index 6b1296e41e..8e6e78f01a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/http_status_code.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/http_status_code.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmcontainer.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmcontainer.rb index a3185035ae..5ae8d0170b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmcontainer.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmcontainer.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class IaaSVMContainer < ProtectionContainer include MsRestAzure - include MsRest::JSONable def initialize @protectableObjectType = "IaaSVMContainer" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmprotectable_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmprotectable_item.rb index 7ce1e97aa3..0d5abf7622 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmprotectable_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmprotectable_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class IaaSVMProtectableItem < WorkloadProtectableItem include MsRestAzure - include MsRest::JSONable def initialize @protectableItemType = "IaaSVMProtectableItem" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmbackup_request.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmbackup_request.rb index b629a79fbf..1b49c31360 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmbackup_request.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmbackup_request.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class IaasVMBackupRequest < BackupRequest include MsRestAzure - include MsRest::JSONable def initialize @objectType = "IaasVMBackupRequest" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmilrregistration_request.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmilrregistration_request.rb index 6770d8a293..a1ab467eec 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmilrregistration_request.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmilrregistration_request.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class IaasVMILRRegistrationRequest < ILRRequest include MsRestAzure - include MsRest::JSONable def initialize @objectType = "IaasVMILRRegistrationRequest" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrecovery_point.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrecovery_point.rb index 61a5466f58..d337af6bb0 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrecovery_point.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrecovery_point.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class IaasVMRecoveryPoint < RecoveryPoint include MsRestAzure - include MsRest::JSONable def initialize @objectType = "IaasVMRecoveryPoint" @@ -59,6 +58,9 @@ def initialize # @return [String] Virtual Machine Size attr_accessor :virtual_machine_size + # @return [Boolean] Original SA Option + attr_accessor :original_storage_account_option + # # Mapper for IaasVMRecoveryPoint class as Ruby Hash. @@ -157,6 +159,13 @@ def self.mapper() type: { name: 'String' } + }, + original_storage_account_option: { + required: false, + serialized_name: 'originalStorageAccountOption', + type: { + name: 'Boolean' + } } } } diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrestore_request.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrestore_request.rb index e6b632918b..22c704027f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrestore_request.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrestore_request.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class IaasVMRestoreRequest < RestoreRequest include MsRestAzure - include MsRest::JSONable def initialize @objectType = "IaasVMRestoreRequest" @@ -79,6 +78,9 @@ def initialize # as it was at the time of backup. attr_accessor :create_new_cloud_service + # @return [Boolean] + attr_accessor :original_storage_account_option + # @return [EncryptionDetails] Details needed if the VM was encrypted at # the time of backup. attr_accessor :encryption_details @@ -187,6 +189,13 @@ def self.mapper() name: 'Boolean' } }, + original_storage_account_option: { + required: false, + serialized_name: 'originalStorageAccountOption', + type: { + name: 'Boolean' + } + }, encryption_details: { required: false, serialized_name: 'encryptionDetails', diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb index 35ea4940d1..1e17420d8d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ILRRequest include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["IaasVMILRRegistrationRequest"] = "IaasVMILRRegistrationRequest" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest_resource.rb index 98c3373544..6530b1d5bf 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,10 @@ module Models # # Parameters to restore file/folders API. # - class ILRRequestResource < MsRestAzure::Resource + class ILRRequestResource < Resource include MsRestAzure - include MsRest::JSONable # @return [ILRRequest] ILRRequestResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb index 47c2aeab07..85daef0c71 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class InstantItemRecoveryTarget include MsRestAzure - include MsRest::JSONable # @return [Array] List of client scripts. attr_accessor :client_scripts diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job.rb index ad3c9f1dc6..d3f8d2bfad 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class Job include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["AzureIaaSVMJob"] = "AzureIaaSVMJob" @@discriminatorMap["DpmJob"] = "DpmJob" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb index ce7c43b450..ef8a82b1cd 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb index 684a45f6f7..52cb68c4ec 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class JobQueryObject include MsRestAzure - include MsRest::JSONable # @return [JobStatus] Status of the job. Possible values include: # 'Invalid', 'InProgress', 'Completed', 'Failed', # 'CompletedWithWarnings', 'Cancelled', 'Cancelling' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource.rb index 8160bde524..5b58144ae3 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,10 @@ module Models # # Defines workload agnostic properties for a job. # - class JobResource < MsRestAzure::Resource + class JobResource < Resource include MsRestAzure - include MsRest::JSONable # @return [Job] JobResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb index b86453a6a1..576fa86451 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_status.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_status.rb index b7a47ac55f..982c3036ff 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_status.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_status.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_supported_action.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_supported_action.rb index d44911b7ea..b4a0497abe 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_supported_action.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/job_supported_action.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb index 9eeba4e6eb..97b8d3704d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class KEKDetails include MsRestAzure - include MsRest::JSONable # @return [String] Key is KEK. attr_accessor :key_url diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb index 9148c2b99a..c9883235b3 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,7 +21,6 @@ class KeyAndSecretDetails include MsRestAzure - include MsRest::JSONable # @return [KEKDetails] KEK is encryption key for BEK. attr_accessor :kek_details diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_retention_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_retention_policy.rb index d59ae081d4..5458dc688d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_retention_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_retention_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class LongTermRetentionPolicy < RetentionPolicy include MsRestAzure - include MsRest::JSONable def initialize @retentionPolicyType = "LongTermRetentionPolicy" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_schedule_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_schedule_policy.rb index 9d1ddd6323..41fc45ecb2 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_schedule_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_schedule_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class LongTermSchedulePolicy < SchedulePolicy include MsRestAzure - include MsRest::JSONable def initialize @schedulePolicyType = "LongTermSchedulePolicy" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container.rb index 217bdb646d..5ed8756b7b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabContainer < ProtectionContainer include MsRestAzure - include MsRest::JSONable def initialize @protectableObjectType = "MABWindowsContainer" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb index 00e97b62b5..f2f44f691b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabContainerExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [DateTime] Time stamp when this container was refreshed. attr_accessor :last_refreshed_at diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb index 330898afdb..031e70c99b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabErrorInfo include MsRestAzure - include MsRest::JSONable # @return [String] Localized error string. attr_accessor :error_string diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item.rb index 841055ad9a..c94efa76bd 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabFileFolderProtectedItem < ProtectedItem include MsRestAzure - include MsRest::JSONable def initialize @protectedItemType = "MabFileFolderProtectedItem" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb index 620cd17f46..423880055b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabFileFolderProtectedItemExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [DateTime] Last time when the agent data synced to service. attr_accessor :last_refreshed_at diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job.rb index d158cea8e3..d2e6ad2d1b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabJob < Job include MsRestAzure - include MsRest::JSONable def initialize @jobType = "MabJob" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb index 440b5b8a64..bf822a7598 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabJobExtendedInfo include MsRestAzure - include MsRest::JSONable # @return [Array] List of tasks for this job. attr_accessor :tasks_list diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb index 448eb3c15a..ba7c2e5df4 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabJobTaskDetails include MsRestAzure - include MsRest::JSONable # @return [String] The task display name. attr_accessor :task_id diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_protection_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_protection_policy.rb index 5e09372dc1..8761906a2e 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_protection_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_protection_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MabProtectionPolicy < ProtectionPolicy include MsRestAzure - include MsRest::JSONable def initialize @backupManagementType = "MAB" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb index 55993a8144..d4ef977cdf 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/month_of_year.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/month_of_year.rb index 3dca17978a..5ee0344ec3 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/month_of_year.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/month_of_year.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb index e6022f9338..85402f240b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class MonthlyRetentionSchedule include MsRestAzure - include MsRest::JSONable # @return [RetentionScheduleFormat] Retention schedule format type for # monthly retention policy. Possible values include: 'Invalid', 'Daily', # 'Weekly' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/name_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/name_info.rb index ac39b23905..b7690f66ae 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/name_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/name_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class NameInfo include MsRestAzure - include MsRest::JSONable # @return [String] Value of usage. attr_accessor :value diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info.rb index a7e970fcaa..2712067bc6 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationResultInfo < OperationResultInfoBase include MsRestAzure - include MsRest::JSONable def initialize @objectType = "OperationResultInfo" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb index 0744692890..6b8ad6d01e 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationResultInfoBase include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["ExportJobsOperationResultInfo"] = "ExportJobsOperationResultInfo" @@discriminatorMap["OperationResultInfo"] = "OperationResultInfo" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base_resource.rb index 99680b469b..2d340efc4e 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationResultInfoBaseResource < OperationWorkerResponse include MsRestAzure - include MsRest::JSONable # @return [OperationResultInfoBase] OperationResultInfoBaseResource # operation attr_accessor :operation diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status.rb index d57f42ac00..7c55fd2bf3 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationStatus include MsRestAzure - include MsRest::JSONable # @return [String] ID of the operation. attr_accessor :id diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_error.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_error.rb index ec72b91bc8..8b8206dcd6 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_error.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_error.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationStatusError include MsRestAzure - include MsRest::JSONable # @return [String] Error code of the operation failure. attr_accessor :code diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_extended_info.rb index ee799a62d8..f15a975f60 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationStatusExtendedInfo include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["OperationStatusJobExtendedInfo"] = "OperationStatusJobExtendedInfo" @@discriminatorMap["OperationStatusJobsExtendedInfo"] = "OperationStatusJobsExtendedInfo" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_job_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_job_extended_info.rb index a5a5822b4d..ab50f07434 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_job_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_job_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationStatusJobExtendedInfo < OperationStatusExtendedInfo include MsRestAzure - include MsRest::JSONable def initialize @objectType = "OperationStatusJobExtendedInfo" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_jobs_extended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_jobs_extended_info.rb index 11b29b9c81..736a81eb67 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_jobs_extended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_jobs_extended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationStatusJobsExtendedInfo < OperationStatusExtendedInfo include MsRestAzure - include MsRest::JSONable def initialize @objectType = "OperationStatusJobsExtendedInfo" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_provision_ilrextended_info.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_provision_ilrextended_info.rb index 83964cec47..2a03fba788 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_provision_ilrextended_info.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_provision_ilrextended_info.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationStatusProvisionILRExtendedInfo < OperationStatusExtendedInfo include MsRestAzure - include MsRest::JSONable def initialize @objectType = "OperationStatusProvisionILRExtendedInfo" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_values.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_values.rb index 615985d001..122dcf0e9a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_values.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_values.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb index 89782a2cf3..f03c073be0 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class OperationWorkerResponse include MsRestAzure - include MsRest::JSONable # @return [HttpStatusCode] HTTP Status Code of the operation. Possible # values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', # 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item.rb index 8ef67192fe..339140d29e 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ProtectedItem include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.ClassicCompute/virtualMachines"] = "AzureIaaSClassicComputeVMProtectedItem" @@discriminatorMap["Microsoft.Compute/virtualMachines"] = "AzureIaaSComputeVMProtectedItem" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb index 9e42c989be..e027eef018 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ProtectedItemQueryObject include MsRestAzure - include MsRest::JSONable # @return [HealthState] Health State for the backed up item. Possible # values include: 'Passed', 'ActionRequired', 'ActionSuggested', # 'Invalid' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource.rb index 22621141b4..5f565bc434 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,10 @@ module Models # # Base class for backup items. # - class ProtectedItemResource < MsRestAzure::Resource + class ProtectedItemResource < Resource include MsRestAzure - include MsRest::JSONable # @return [ProtectedItem] ProtectedItemResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource_list.rb index 5e74093c73..272432bdfb 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_state.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_state.rb index ed7760701e..0ae93c4da3 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_state.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_state.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container.rb index e359030526..2f10b2764c 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class ProtectionContainer include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["AzureBackupServerContainer"] = "AzureBackupServerContainer" @@discriminatorMap["Microsoft.ClassicCompute/virtualMachines"] = "AzureIaaSClassicComputeVMContainer" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource.rb index 5b95fe0ed4..f52c220fba 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ module Models # Base class for container with backup items. Containers with specific # workloads are derived from this class. # - class ProtectionContainerResource < MsRestAzure::Resource + class ProtectionContainerResource < Resource include MsRestAzure - include MsRest::JSONable # @return [ProtectionContainer] ProtectionContainerResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource_list.rb index 613de6ae47..037ed75a52 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb index 6b739794d4..c140d8f140 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class ProtectionPolicy include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["AzureIaasVM"] = "AzureIaaSVMProtectionPolicy" @@discriminatorMap["AzureSql"] = "AzureSqlProtectionPolicy" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb index 4435d10615..c9d685817a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ProtectionPolicyQueryObject include MsRestAzure - include MsRest::JSONable # @return [BackupManagementType] Backup management type for the backup # policy. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', # 'DPM', 'AzureBackupServer', 'AzureSql' diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource.rb index c7d6ba9906..f1fac9b648 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ module Models # Base class for backup policy. Workload-specific backup policies are # derived from this class. # - class ProtectionPolicyResource < MsRestAzure::Resource + class ProtectionPolicyResource < Resource include MsRestAzure - include MsRest::JSONable # @return [ProtectionPolicy] ProtectionPolicyResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource_list.rb index c9138aa07b..d793a9ceaf 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_state.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_state.rb index 6a9b01a100..a48350a0f9 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_state.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_state.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_status.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_status.rb index 9ed7089f97..cf5ebb440d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_status.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/protection_status.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb index 158a01d18d..9e8c87d4f4 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class RecoveryPoint include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["GenericRecoveryPoint"] = "GenericRecoveryPoint" @@discriminatorMap["IaasVMRecoveryPoint"] = "IaasVMRecoveryPoint" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource.rb index 8f8902e14a..46b2ce8382 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ module Models # Base class for backup copies. Workload-specific backup copies are derived # from this class. # - class RecoveryPointResource < MsRestAzure::Resource + class RecoveryPointResource < Resource include MsRestAzure - include MsRest::JSONable # @return [RecoveryPoint] RecoveryPointResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource_list.rb index b5a1874fa1..48c3d11083 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_information.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_information.rb index b6370059ce..171ea5f892 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_information.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_information.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class RecoveryPointTierInformation include MsRestAzure - include MsRest::JSONable # @return [RecoveryPointTierType] Recovery point tier type. Possible # values include: 'Invalid', 'InstantRP', 'HardenedRP' attr_accessor :type diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_status.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_status.rb index c61eddf9db..a3049b738d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_status.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_status.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_type.rb index dcb28a15b6..1878f76284 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_type.rb index 9fc88fd25f..db1e12a738 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource.rb index fd99cd0593..c0345e997f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,11 +12,27 @@ module Models # # ARM Resource. # - class Resource < MsRestAzure::Resource + class Resource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id represents the complete path to the + # resource. + attr_accessor :id + + # @return [String] Resource name associated with the resource. + attr_accessor :name + + # @return [String] Resource type represents the complete path of the form + # Namespace/ResourceType/ResourceType/... + attr_accessor :type + + # @return [String] Resource location. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + # @return [String] Optional ETag. attr_accessor :e_tag diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource_list.rb index fb05939643..76d57f7ed1 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class ResourceList include MsRestAzure - include MsRest::JSONable # @return [String] The uri to fetch the next page of resources. Call # ListNext() fetches next page of resources. attr_accessor :next_link diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request.rb index c2ddf0c756..1a7fec1f9a 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class RestoreRequest include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["IaasVMRestoreRequest"] = "IaasVMRestoreRequest" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request_resource.rb index 3d0f27de1c..a6ca193763 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ module Models # Base class for restore request. Workload-specific restore requests are # derived from this class. # - class RestoreRequestResource < MsRestAzure::Resource + class RestoreRequestResource < Resource include MsRestAzure - include MsRest::JSONable # @return [RestoreRequest] RestoreRequestResource properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration.rb index f8921b5480..8cc64ee7b8 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class RetentionDuration include MsRestAzure - include MsRest::JSONable # @return [Integer] Count of duration types. Retention duration is # obtained by the counting the duration type Count times. # For example, when Count = 3 and DurationType = Weeks, retention diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration_type.rb index ddaa60af05..20eda762f8 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb index b4d084683d..5df6c0e162 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class RetentionPolicy include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["LongTermRetentionPolicy"] = "LongTermRetentionPolicy" @@discriminatorMap["SimpleRetentionPolicy"] = "SimpleRetentionPolicy" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_schedule_format.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_schedule_format.rb index fcaecb43f9..ba876a682c 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_schedule_format.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/retention_schedule_format.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb index 43a0c087fb..5fdc7c914f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class SchedulePolicy include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["LongTermSchedulePolicy"] = "LongTermSchedulePolicy" @@discriminatorMap["SimpleSchedulePolicy"] = "SimpleSchedulePolicy" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_run_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_run_type.rb index ecc7dcc1b1..2dd1ea40fd 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_run_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_run_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_retention_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_retention_policy.rb index 6ab4d22908..ac8c42c7d6 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_retention_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_retention_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class SimpleRetentionPolicy < RetentionPolicy include MsRestAzure - include MsRest::JSONable def initialize @retentionPolicyType = "SimpleRetentionPolicy" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_schedule_policy.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_schedule_policy.rb index c78e6ab5ab..0a9c20ae14 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_schedule_policy.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/simple_schedule_policy.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class SimpleSchedulePolicy < SchedulePolicy include MsRestAzure - include MsRest::JSONable def initialize @schedulePolicyType = "SimpleSchedulePolicy" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type.rb index 6220cb6f75..f6eee83d98 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type_state.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type_state.rb index 3a215e721c..8a51aa2b5d 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type_state.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type_state.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/token_information.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/token_information.rb index 1ea33025c2..d503b72cd2 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/token_information.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/token_information.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class TokenInformation include MsRestAzure - include MsRest::JSONable # @return [String] Token value. attr_accessor :token diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/type.rb index e3149e94d4..b05ce94d64 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/usages_unit.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/usages_unit.rb index cb9cd62643..1e38b004b5 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/usages_unit.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/usages_unit.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/week_of_month.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/week_of_month.rb index ec87cc5d99..9ecb31d57c 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/week_of_month.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/week_of_month.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_format.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_format.rb index 78459bd1c1..8770dc2954 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_format.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_format.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class WeeklyRetentionFormat include MsRestAzure - include MsRest::JSONable # @return [Array] List of days of the week. attr_accessor :days_of_the_week diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb index db1a81b43c..f2615230dd 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class WeeklyRetentionSchedule include MsRestAzure - include MsRest::JSONable # @return [Array] List of days of week for weekly retention # policy. attr_accessor :days_of_the_week diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb index b93d93ee4b..5c8488b65c 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -17,7 +17,6 @@ class WorkloadProtectableItem include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.ClassicCompute/virtualMachines"] = "AzureIaaSClassicComputeVMProtectableItem" @@discriminatorMap["Microsoft.Compute/virtualMachines"] = "AzureIaaSComputeVMProtectableItem" diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource.rb index 9a86b32b0b..cb24ec18df 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,11 +13,10 @@ module Models # Base class for backup item. Workload-specific backup items are derived # from this class. # - class WorkloadProtectableItemResource < MsRestAzure::Resource + class WorkloadProtectableItemResource < Resource include MsRestAzure - include MsRest::JSONable # @return [WorkloadProtectableItem] WorkloadProtectableItemResource # properties attr_accessor :properties diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource_list.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource_list.rb index 7e4c0908c9..21bd38d4fa 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource_list.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource_list.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_type.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_type.rb index cb61a1807d..d031f43855 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_type.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/workload_type.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb index f8a031eb90..e95e46e1eb 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -16,7 +16,6 @@ class YearlyRetentionSchedule include MsRestAzure - include MsRest::JSONable # @return [RetentionScheduleFormat] Retention schedule format for yearly # retention policy. Possible values include: 'Invalid', 'Daily', 'Weekly' attr_accessor :retention_schedule_format_type diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/module_definition.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/module_definition.rb index 196a222743..49fec5fe30 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/module_definition.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/module_definition.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/operations.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/operations.rb index 286f94585f..bece22f04f 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/operations.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/operations.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_results.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_results.rb index 558b281297..d6a99e908b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_results.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_results.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_statuses.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_statuses.rb index cd03168ea0..84771b0c7e 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_statuses.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_statuses.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_items.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_items.rb index 503f944275..05fcf59afd 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_items.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protected_items.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_operation_results.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_operation_results.rb index b8258922c2..47fcefd3fc 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_operation_results.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_operation_results.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_refresh_operation_results.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_refresh_operation_results.rb index b03ecb4bc1..fd1b5afd42 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_refresh_operation_results.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_container_refresh_operation_results.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_containers.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_containers.rb index f1c8dadb0b..29fa9d2576 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_containers.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_containers.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policies.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policies.rb index 93779b04ac..371da16462 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policies.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policies.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_results.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_results.rb index 1bdea78283..424f0dd117 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_results.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_results.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_statuses.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_statuses.rb index a6322a210a..face686af2 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_statuses.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_statuses.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_points.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_points.rb index 6b7d7364be..7cffd073cd 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_points.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_points.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb index 535de0e33d..3601ec817b 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -35,6 +35,12 @@ class RecoveryServicesBackupClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id + # @return [BackupJobs] backup_jobs + attr_reader :backup_jobs + + # @return [JobDetails] job_details + attr_reader :job_details + # @return [BackupResourceVaultConfigs] backup_resource_vault_configs attr_reader :backup_resource_vault_configs @@ -74,12 +80,6 @@ class RecoveryServicesBackupClient < MsRestAzure::AzureServiceClient # @return [Restores] restores attr_reader :restores - # @return [BackupJobs] backup_jobs - attr_reader :backup_jobs - - # @return [JobDetails] job_details - attr_reader :job_details - # @return [JobCancellations] job_cancellations attr_reader :job_cancellations @@ -146,6 +146,8 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials + @backup_jobs = BackupJobs.new(self) + @job_details = JobDetails.new(self) @backup_resource_vault_configs = BackupResourceVaultConfigs.new(self) @backup_engines = BackupEngines.new(self) @protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResults.new(self) @@ -158,8 +160,6 @@ def initialize(credentials = nil, base_url = nil, options = nil) @recovery_points = RecoveryPoints.new(self) @item_level_recovery_connections = ItemLevelRecoveryConnections.new(self) @restores = Restores.new(self) - @backup_jobs = BackupJobs.new(self) - @job_details = JobDetails.new(self) @job_cancellations = JobCancellations.new(self) @job_operation_results = JobOperationResults.new(self) @export_jobs_operation_results = ExportJobsOperationResults.new(self) diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/restores.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/restores.rb index 3470fa0c41..8baabca342 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/restores.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/restores.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/security_pins.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/security_pins.rb index c196b032dd..4c48facc53 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/security_pins.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/security_pins.rb @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/version.rb b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/version.rb index 24c41c8a8f..3eac43ccbf 100644 --- a/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/version.rb +++ b/management/azure_mgmt_recovery_services_backup/lib/generated/azure_mgmt_recovery_services_backup/version.rb @@ -3,10 +3,10 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator 2.2.22.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::RecoveryServicesBackup - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_recovery_services_site_recovery/.rspec b/management/azure_mgmt_recovery_services_site_recovery/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_recovery_services_site_recovery/LICENSE.txt b/management/azure_mgmt_recovery_services_site_recovery/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_recovery_services_site_recovery/Rakefile b/management/azure_mgmt_recovery_services_site_recovery/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_recovery_services_site_recovery/azure_mgmt_recovery_services_site_recovery.gemspec b/management/azure_mgmt_recovery_services_site_recovery/azure_mgmt_recovery_services_site_recovery.gemspec new file mode 100644 index 0000000000..73bc039b9d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/azure_mgmt_recovery_services_site_recovery.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_recovery_services_site_recovery/module_definition' +require 'generated/azure_mgmt_recovery_services_site_recovery/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_recovery_services_site_recovery' + spec.version = Azure::ARM::RecoveryServicesSiteRecovery::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Recovery Services Site Recovery Services Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Recovery Services Site Recovery.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/azure_mgmt_recovery_services_site_recovery.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/azure_mgmt_recovery_services_site_recovery.rb new file mode 100644 index 0000000000..5c2ad164a5 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/azure_mgmt_recovery_services_site_recovery.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_recovery_services_site_recovery' + + diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery.rb new file mode 100644 index 0000000000..53df651c84 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery.rb @@ -0,0 +1,372 @@ +# encoding: 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 'generated/azure_mgmt_recovery_services_site_recovery/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::RecoveryServicesSiteRecovery + autoload :ReplicationVaultHealth, 'generated/azure_mgmt_recovery_services_site_recovery/replication_vault_health.rb' + autoload :ReplicationProtectedItems, 'generated/azure_mgmt_recovery_services_site_recovery/replication_protected_items.rb' + autoload :ReplicationNetworkMappings, 'generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb' + autoload :ReplicationFabrics, 'generated/azure_mgmt_recovery_services_site_recovery/replication_fabrics.rb' + autoload :ReplicationvCenters, 'generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb' + autoload :ReplicationStorageClassificationMappings, 'generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb' + autoload :ReplicationStorageClassifications, 'generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classifications.rb' + autoload :ReplicationRecoveryServicesProviders, 'generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_services_providers.rb' + autoload :RecoveryPoints, 'generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb' + autoload :ReplicationRecoveryPlans, 'generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb' + autoload :ReplicationProtectionContainers, 'generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb' + autoload :ReplicationProtectionContainerMappings, 'generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb' + autoload :ReplicationProtectableItems, 'generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb' + autoload :ReplicationPolicies, 'generated/azure_mgmt_recovery_services_site_recovery/replication_policies.rb' + autoload :Operations, 'generated/azure_mgmt_recovery_services_site_recovery/operations.rb' + autoload :ReplicationNetworks, 'generated/azure_mgmt_recovery_services_site_recovery/replication_networks.rb' + autoload :ReplicationLogicalNetworks, 'generated/azure_mgmt_recovery_services_site_recovery/replication_logical_networks.rb' + autoload :ReplicationJobs, 'generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb' + autoload :ReplicationEvents, 'generated/azure_mgmt_recovery_services_site_recovery/replication_events.rb' + autoload :ReplicationAlertSettings, 'generated/azure_mgmt_recovery_services_site_recovery/replication_alert_settings.rb' + autoload :SiteRecoveryManagementClient, 'generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb' + + module Models + autoload :StorageClassificationProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_properties.rb' + autoload :CreateRecoveryPlanInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input.rb' + autoload :RecoveryPlanActionDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_details.rb' + autoload :AlertCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/alert_collection.rb' + autoload :RecoveryPlanAction, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action.rb' + autoload :ConfigureAlertRequest, 'generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request.rb' + autoload :RecoveryPlanGroup, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group.rb' + autoload :EventSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/event_specific_details.rb' + autoload :RecoveryPlanProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_properties.rb' + autoload :EventProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/event_properties.rb' + autoload :RunAsAccount, 'generated/azure_mgmt_recovery_services_site_recovery/models/run_as_account.rb' + autoload :EventCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/event_collection.rb' + autoload :RecoveryPlanCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_collection.rb' + autoload :EncryptionDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/encryption_details.rb' + autoload :CreateRecoveryPlanInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input_properties.rb' + autoload :FabricProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_properties.rb' + autoload :MasterTargetServer, 'generated/azure_mgmt_recovery_services_site_recovery/models/master_target_server.rb' + autoload :FabricCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_collection.rb' + autoload :UpdateRecoveryPlanInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input_properties.rb' + autoload :FabricCreationInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input_properties.rb' + autoload :UpdateRecoveryPlanInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input.rb' + autoload :FailoverProcessServerRequestProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request_properties.rb' + autoload :RecoveryPlanProviderSpecificFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_provider_specific_failover_input.rb' + autoload :TaskTypeDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/task_type_details.rb' + autoload :RecoveryPlanPlannedFailoverInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input_properties.rb' + autoload :ServiceError, 'generated/azure_mgmt_recovery_services_site_recovery/models/service_error.rb' + autoload :RecoveryPlanPlannedFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input.rb' + autoload :JobErrorDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_error_details.rb' + autoload :RecoveryPlanUnplannedFailoverInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input_properties.rb' + autoload :JobDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_details.rb' + autoload :RecoveryPlanUnplannedFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input.rb' + autoload :ARMExceptionDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/armexception_details.rb' + autoload :RecoveryPlanTestFailoverInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input_properties.rb' + autoload :ARMInnerError, 'generated/azure_mgmt_recovery_services_site_recovery/models/arminner_error.rb' + autoload :RecoveryPlanTestFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input.rb' + autoload :InMageAzureV2ProtectedDiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2protected_disk_details.rb' + autoload :RecoveryPlanTestFailoverCleanupInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input_properties.rb' + autoload :JobQueryParameter, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_query_parameter.rb' + autoload :RecoveryPlanTestFailoverCleanupInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input.rb' + autoload :ResumeJobParams, 'generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params.rb' + autoload :ProviderSpecificRecoveryPointDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_recovery_point_details.rb' + autoload :OSDiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/osdisk_details.rb' + autoload :RecoveryPointProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_properties.rb' + autoload :NetworkMappingFabricSpecificSettings, 'generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_fabric_specific_settings.rb' + autoload :DataStore, 'generated/azure_mgmt_recovery_services_site_recovery/models/data_store.rb' + autoload :InMageProtectedDiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_protected_disk_details.rb' + autoload :RecoveryPointCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_collection.rb' + autoload :CreateNetworkMappingInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input_properties.rb' + autoload :IdentityInformation, 'generated/azure_mgmt_recovery_services_site_recovery/models/identity_information.rb' + autoload :FabricSpecificUpdateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_update_network_mapping_input.rb' + autoload :RecoveryServicesProviderProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_properties.rb' + autoload :UpdateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input.rb' + autoload :RetentionVolume, 'generated/azure_mgmt_recovery_services_site_recovery/models/retention_volume.rb' + autoload :NetworkProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/network_properties.rb' + autoload :RecoveryServicesProviderCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_collection.rb' + autoload :NetworkCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/network_collection.rb' + autoload :ReplicationProviderSpecificSettings, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_settings.rb' + autoload :OperationsDiscovery, 'generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery.rb' + autoload :ReplicationProtectedItemProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_properties.rb' + autoload :PolicyProviderSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_details.rb' + autoload :ProcessServer, 'generated/azure_mgmt_recovery_services_site_recovery/models/process_server.rb' + autoload :InitialReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/initial_replication_details.rb' + autoload :EnableProtectionProviderSpecificInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_provider_specific_input.rb' + autoload :PolicyProviderSpecificInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_input.rb' + autoload :EnableProtectionInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input_properties.rb' + autoload :CreatePolicyInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input.rb' + autoload :EnableProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input.rb' + autoload :UpdatePolicyInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input.rb' + autoload :VMNicInputDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_input_details.rb' + autoload :ProtectableItemProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_properties.rb' + autoload :UpdateReplicationProtectedItemProviderInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_provider_input.rb' + autoload :ProtectableItemCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_collection.rb' + autoload :UpdateReplicationProtectedItemInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input_properties.rb' + autoload :ProtectionContainerMappingProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_properties.rb' + autoload :UpdateReplicationProtectedItemInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input.rb' + autoload :ProtectionContainerMappingCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_collection.rb' + autoload :DisableProtectionProviderSpecificInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_provider_specific_input.rb' + autoload :CreateProtectionContainerMappingInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input_properties.rb' + autoload :DisableProtectionInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input_properties.rb' + autoload :ReplicationProviderContainerUnmappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_container_unmapping_input.rb' + autoload :DisableProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input.rb' + autoload :RemoveProtectionContainerMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input.rb' + autoload :ProviderSpecificFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_failover_input.rb' + autoload :ProtectionContainerProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_properties.rb' + autoload :PlannedFailoverInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input_properties.rb' + autoload :ProtectionContainerCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_collection.rb' + autoload :PlannedFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input.rb' + autoload :CreateProtectionContainerInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input_properties.rb' + autoload :UnplannedFailoverInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input_properties.rb' + autoload :DiscoverProtectableItemRequestProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request_properties.rb' + autoload :UnplannedFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input.rb' + autoload :SwitchProtectionProviderSpecificInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_provider_specific_input.rb' + autoload :TestFailoverInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input_properties.rb' + autoload :SwitchProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input.rb' + autoload :TestFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input.rb' + autoload :RecoveryPlanProtectedItem, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_protected_item.rb' + autoload :TestFailoverCleanupInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input_properties.rb' + autoload :EventProviderSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/event_provider_specific_details.rb' + autoload :TestFailoverCleanupInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input.rb' + autoload :OSDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/osdetails.rb' + autoload :ReverseReplicationProviderSpecificInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_provider_specific_input.rb' + autoload :FabricSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_details.rb' + autoload :ReverseReplicationInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input_properties.rb' + autoload :FabricSpecificCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_creation_input.rb' + autoload :ReverseReplicationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input.rb' + autoload :FailoverProcessServerRequest, 'generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request.rb' + autoload :UpdateMobilityServiceRequestProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request_properties.rb' + autoload :ProviderError, 'generated/azure_mgmt_recovery_services_site_recovery/models/provider_error.rb' + autoload :UpdateMobilityServiceRequest, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request.rb' + autoload :JobProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_properties.rb' + autoload :ApplyRecoveryPointProviderSpecificInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_provider_specific_input.rb' + autoload :ARMException, 'generated/azure_mgmt_recovery_services_site_recovery/models/armexception.rb' + autoload :ApplyRecoveryPointInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input_properties.rb' + autoload :ResumeJobParamsProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params_properties.rb' + autoload :ApplyRecoveryPointInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input.rb' + autoload :LogicalNetworkCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_collection.rb' + autoload :AlertProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/alert_properties.rb' + autoload :FabricSpecificCreateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_create_network_mapping_input.rb' + autoload :UpdateNetworkMappingInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input_properties.rb' + autoload :StorageClassificationCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_collection.rb' + autoload :DiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/disk_details.rb' + autoload :StorageClassificationMappingProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_properties.rb' + autoload :OperationsDiscoveryCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery_collection.rb' + autoload :FailoverReplicationProtectedItemDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/failover_replication_protected_item_details.rb' + autoload :PolicyCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/policy_collection.rb' + autoload :StorageClassificationMappingCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_collection.rb' + autoload :UpdatePolicyInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input_properties.rb' + autoload :StorageMappingInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_mapping_input_properties.rb' + autoload :VMNicDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_details.rb' + autoload :StorageClassificationMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_input.rb' + autoload :InMageAgentDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_details.rb' + autoload :VCenterProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_properties.rb' + autoload :CreateProtectionContainerMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input.rb' + autoload :InconsistentVmDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/inconsistent_vm_details.rb' + autoload :ProtectionContainerFabricSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_fabric_specific_details.rb' + autoload :VCenterCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_collection.rb' + autoload :ReplicationProviderSpecificContainerCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_creation_input.rb' + autoload :AddVCenterRequestProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request_properties.rb' + autoload :DiscoverProtectableItemRequest, 'generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request.rb' + autoload :AddVCenterRequest, 'generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request.rb' + autoload :CurrentScenarioDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/current_scenario_details.rb' + autoload :UpdateVCenterRequestProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request_properties.rb' + autoload :HealthError, 'generated/azure_mgmt_recovery_services_site_recovery/models/health_error.rb' + autoload :UpdateVCenterRequest, 'generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request.rb' + autoload :AzureVmDiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/azure_vm_disk_details.rb' + autoload :RenewCertificateInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input_properties.rb' + autoload :GroupTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/group_task_details.rb' + autoload :RenewCertificateInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input.rb' + autoload :MethodCallStatus, 'generated/azure_mgmt_recovery_services_site_recovery/models/method_call_status.rb' + autoload :NetworkMappingCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_collection.rb' + autoload :LogicalNetworkProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_properties.rb' + autoload :ReplicationProtectedItemCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_collection.rb' + autoload :CreateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input.rb' + autoload :ProtectedItemsQueryParameter, 'generated/azure_mgmt_recovery_services_site_recovery/models/protected_items_query_parameter.rb' + autoload :Display, 'generated/azure_mgmt_recovery_services_site_recovery/models/display.rb' + autoload :HealthErrorSummary, 'generated/azure_mgmt_recovery_services_site_recovery/models/health_error_summary.rb' + autoload :CreatePolicyInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input_properties.rb' + autoload :ResourceHealthSummary, 'generated/azure_mgmt_recovery_services_site_recovery/models/resource_health_summary.rb' + autoload :ProtectionContainerMappingProviderSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_provider_specific_details.rb' + autoload :VaultHealthProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_properties.rb' + autoload :RemoveProtectionContainerMappingInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input_properties.rb' + autoload :JobEntity, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_entity.rb' + autoload :CreateProtectionContainerInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input.rb' + autoload :InMageDiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_details.rb' + autoload :ConfigureAlertRequestProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request_properties.rb' + autoload :DiskVolumeDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/disk_volume_details.rb' + autoload :FabricCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input.rb' + autoload :Resource, 'generated/azure_mgmt_recovery_services_site_recovery/models/resource.rb' + autoload :JobCollection, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_collection.rb' + autoload :A2AVmManagedDiskInputDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_input_details.rb' + autoload :Subnet, 'generated/azure_mgmt_recovery_services_site_recovery/models/subnet.rb' + autoload :A2AVmDiskInputDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_disk_input_details.rb' + autoload :ConfigurationSettings, 'generated/azure_mgmt_recovery_services_site_recovery/models/configuration_settings.rb' + autoload :InMageDiskExclusionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_exclusion_input.rb' + autoload :A2AProtectedDiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_disk_details.rb' + autoload :InMageDiskSignatureExclusionOptions, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_signature_exclusion_options.rb' + autoload :EventQueryParameter, 'generated/azure_mgmt_recovery_services_site_recovery/models/event_query_parameter.rb' + autoload :InMageVolumeExclusionOptions, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_volume_exclusion_options.rb' + autoload :NetworkMappingProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_properties.rb' + autoload :AzureToAzureVmSyncedConfigDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_vm_synced_config_details.rb' + autoload :ReplicationProviderSpecificContainerMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_mapping_input.rb' + autoload :InputEndpoint, 'generated/azure_mgmt_recovery_services_site_recovery/models/input_endpoint.rb' + autoload :ASRTask, 'generated/azure_mgmt_recovery_services_site_recovery/models/asrtask.rb' + autoload :RoleAssignment, 'generated/azure_mgmt_recovery_services_site_recovery/models/role_assignment.rb' + autoload :SwitchProtectionInputProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input_properties.rb' + autoload :A2AProtectedManagedDiskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_managed_disk_details.rb' + autoload :PolicyProperties, 'generated/azure_mgmt_recovery_services_site_recovery/models/policy_properties.rb' + autoload :MobilityServiceUpdate, 'generated/azure_mgmt_recovery_services_site_recovery/models/mobility_service_update.rb' + autoload :Alert, 'generated/azure_mgmt_recovery_services_site_recovery/models/alert.rb' + autoload :Event, 'generated/azure_mgmt_recovery_services_site_recovery/models/event.rb' + autoload :Fabric, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric.rb' + autoload :Job, 'generated/azure_mgmt_recovery_services_site_recovery/models/job.rb' + autoload :LogicalNetwork, 'generated/azure_mgmt_recovery_services_site_recovery/models/logical_network.rb' + autoload :NetworkMapping, 'generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping.rb' + autoload :Network, 'generated/azure_mgmt_recovery_services_site_recovery/models/network.rb' + autoload :Policy, 'generated/azure_mgmt_recovery_services_site_recovery/models/policy.rb' + autoload :ProtectableItem, 'generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item.rb' + autoload :ProtectionContainerMapping, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping.rb' + autoload :ProtectionContainer, 'generated/azure_mgmt_recovery_services_site_recovery/models/protection_container.rb' + autoload :RecoveryPlan, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan.rb' + autoload :RecoveryPoint, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point.rb' + autoload :RecoveryServicesProvider, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider.rb' + autoload :ReplicationProtectedItem, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item.rb' + autoload :StorageClassification, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification.rb' + autoload :StorageClassificationMapping, 'generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping.rb' + autoload :VCenter, 'generated/azure_mgmt_recovery_services_site_recovery/models/vcenter.rb' + autoload :VaultHealthDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_details.rb' + autoload :AzureToAzureNetworkMappingSettings, 'generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_network_mapping_settings.rb' + autoload :VmmToAzureNetworkMappingSettings, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_network_mapping_settings.rb' + autoload :VmmToVmmNetworkMappingSettings, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_network_mapping_settings.rb' + autoload :AzureToAzureCreateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_create_network_mapping_input.rb' + autoload :VmmToAzureCreateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_create_network_mapping_input.rb' + autoload :VmmToVmmCreateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_create_network_mapping_input.rb' + autoload :AzureToAzureUpdateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_update_network_mapping_input.rb' + autoload :VmmToAzureUpdateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_update_network_mapping_input.rb' + autoload :VmmToVmmUpdateNetworkMappingInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_update_network_mapping_input.rb' + autoload :AzureFabricSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_specific_details.rb' + autoload :VmmDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmm_details.rb' + autoload :HyperVSiteDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vsite_details.rb' + autoload :VMwareDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmware_details.rb' + autoload :VMwareV2FabricSpecificDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_specific_details.rb' + autoload :HyperVReplicaBaseReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_replication_details.rb' + autoload :HyperVReplicaReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_replication_details.rb' + autoload :HyperVReplicaBlueReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_replication_details.rb' + autoload :HyperVReplicaAzureReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_replication_details.rb' + autoload :InMageAzureV2ReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2replication_details.rb' + autoload :InMageReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_replication_details.rb' + autoload :A2AReplicationDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2areplication_details.rb' + autoload :HyperVReplicaAzureEnableProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_enable_protection_input.rb' + autoload :SanEnableProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/san_enable_protection_input.rb' + autoload :InMageAzureV2EnableProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2enable_protection_input.rb' + autoload :InMageEnableProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_enable_protection_input.rb' + autoload :A2AEnableProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2aenable_protection_input.rb' + autoload :HyperVReplicaAzureUpdateReplicationProtectedItemInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_update_replication_protected_item_input.rb' + autoload :InMageAzureV2UpdateReplicationProtectedItemInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2update_replication_protected_item_input.rb' + autoload :A2AUpdateReplicationProtectedItemInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_replication_protected_item_input.rb' + autoload :HyperVReplicaBaseEventDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_event_details.rb' + autoload :HyperVReplica2012EventDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012event_details.rb' + autoload :HyperVReplica2012R2EventDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012r2event_details.rb' + autoload :HyperVReplicaAzureEventDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_event_details.rb' + autoload :A2AEventDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2aevent_details.rb' + autoload :InMageAzureV2EventDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2event_details.rb' + autoload :JobStatusEventDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_status_event_details.rb' + autoload :HyperVVirtualMachineDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vvirtual_machine_details.rb' + autoload :VMwareVirtualMachineDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmware_virtual_machine_details.rb' + autoload :ReplicationGroupDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_group_details.rb' + autoload :InMageAzureV2RecoveryPointDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2recovery_point_details.rb' + autoload :InMageDisableProtectionProviderSpecificInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disable_protection_provider_specific_input.rb' + autoload :HyperVReplicaAzureFailoverProviderInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failover_provider_input.rb' + autoload :HyperVReplicaAzureFailbackProviderInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failback_provider_input.rb' + autoload :InMageAzureV2FailoverProviderInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2failover_provider_input.rb' + autoload :InMageFailoverProviderInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_failover_provider_input.rb' + autoload :A2AFailoverProviderInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2afailover_provider_input.rb' + autoload :HyperVReplicaAzureReprotectInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_reprotect_input.rb' + autoload :InMageAzureV2ReprotectInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2reprotect_input.rb' + autoload :InMageReprotectInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_reprotect_input.rb' + autoload :A2AReprotectInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2areprotect_input.rb' + autoload :HyperVReplicaAzureApplyRecoveryPointInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_apply_recovery_point_input.rb' + autoload :InMageAzureV2ApplyRecoveryPointInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2apply_recovery_point_input.rb' + autoload :A2AApplyRecoveryPointInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2aapply_recovery_point_input.rb' + autoload :JobTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/job_task_details.rb' + autoload :VirtualMachineTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/virtual_machine_task_details.rb' + autoload :FabricReplicationGroupTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/fabric_replication_group_task_details.rb' + autoload :ManualActionTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/manual_action_task_details.rb' + autoload :ScriptActionTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/script_action_task_details.rb' + autoload :VmNicUpdatesTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vm_nic_updates_task_details.rb' + autoload :ConsistencyCheckTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/consistency_check_task_details.rb' + autoload :AutomationRunbookTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/automation_runbook_task_details.rb' + autoload :InlineWorkflowTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/inline_workflow_task_details.rb' + autoload :RecoveryPlanGroupTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_task_details.rb' + autoload :RecoveryPlanShutdownGroupTaskDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_shutdown_group_task_details.rb' + autoload :AsrJobDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/asr_job_details.rb' + autoload :TestFailoverJobDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_job_details.rb' + autoload :FailoverJobDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/failover_job_details.rb' + autoload :ExportJobDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/export_job_details.rb' + autoload :SwitchProtectionJobDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_job_details.rb' + autoload :A2AContainerCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_creation_input.rb' + autoload :A2ASwitchProtectionInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2aswitch_protection_input.rb' + autoload :HyperVReplicaAzurePolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_details.rb' + autoload :HyperVReplicaBasePolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_policy_details.rb' + autoload :HyperVReplicaPolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_details.rb' + autoload :HyperVReplicaBluePolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_details.rb' + autoload :InMageBasePolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_base_policy_details.rb' + autoload :InMageAzureV2PolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_details.rb' + autoload :InMagePolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_details.rb' + autoload :A2APolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_details.rb' + autoload :RcmAzureMigrationPolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/rcm_azure_migration_policy_details.rb' + autoload :VmwareCbtPolicyDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_details.rb' + autoload :HyperVReplicaAzurePolicyInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_input.rb' + autoload :HyperVReplicaPolicyInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_input.rb' + autoload :HyperVReplicaBluePolicyInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_input.rb' + autoload :InMageAzureV2PolicyInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_input.rb' + autoload :InMagePolicyInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_input.rb' + autoload :A2APolicyCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_creation_input.rb' + autoload :VMwareCbtPolicyCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_creation_input.rb' + autoload :RecoveryPlanScriptActionDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_script_action_details.rb' + autoload :RecoveryPlanAutomationRunbookActionDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_automation_runbook_action_details.rb' + autoload :RecoveryPlanManualActionDetails, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_manual_action_details.rb' + autoload :RecoveryPlanHyperVReplicaAzureFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failover_input.rb' + autoload :RecoveryPlanHyperVReplicaAzureFailbackInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failback_input.rb' + autoload :RecoveryPlanInMageAzureV2FailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_azure_v2failover_input.rb' + autoload :RecoveryPlanInMageFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_failover_input.rb' + autoload :RecoveryPlanA2AFailoverInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_a2afailover_input.rb' + autoload :AzureFabricCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_creation_input.rb' + autoload :VMwareV2FabricCreationInput, 'generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_creation_input.rb' + autoload :RecoveryPlanGroupType, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_type.rb' + autoload :ReplicationProtectedItemOperation, 'generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_operation.rb' + autoload :PossibleOperationsDirections, 'generated/azure_mgmt_recovery_services_site_recovery/models/possible_operations_directions.rb' + autoload :FailoverDeploymentModel, 'generated/azure_mgmt_recovery_services_site_recovery/models/failover_deployment_model.rb' + autoload :SourceSiteOperations, 'generated/azure_mgmt_recovery_services_site_recovery/models/source_site_operations.rb' + autoload :IdentityProviderType, 'generated/azure_mgmt_recovery_services_site_recovery/models/identity_provider_type.rb' + autoload :LicenseType, 'generated/azure_mgmt_recovery_services_site_recovery/models/license_type.rb' + autoload :DisableProtectionReason, 'generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_reason.rb' + autoload :HealthErrorCategory, 'generated/azure_mgmt_recovery_services_site_recovery/models/health_error_category.rb' + autoload :Severity, 'generated/azure_mgmt_recovery_services_site_recovery/models/severity.rb' + autoload :RecoveryPointType, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_type.rb' + autoload :MultiVmSyncStatus, 'generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_status.rb' + autoload :SetMultiVmSyncStatus, 'generated/azure_mgmt_recovery_services_site_recovery/models/set_multi_vm_sync_status.rb' + autoload :RecoveryPlanActionLocation, 'generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_location.rb' + autoload :HyperVReplicaAzureRpRecoveryPointType, 'generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_rp_recovery_point_type.rb' + autoload :DataSyncStatus, 'generated/azure_mgmt_recovery_services_site_recovery/models/data_sync_status.rb' + autoload :AlternateLocationRecoveryOption, 'generated/azure_mgmt_recovery_services_site_recovery/models/alternate_location_recovery_option.rb' + autoload :InMageV2RpRecoveryPointType, 'generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_v2rp_recovery_point_type.rb' + autoload :RpInMageRecoveryPointType, 'generated/azure_mgmt_recovery_services_site_recovery/models/rp_in_mage_recovery_point_type.rb' + autoload :A2ARpRecoveryPointType, 'generated/azure_mgmt_recovery_services_site_recovery/models/a2arp_recovery_point_type.rb' + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aapply_recovery_point_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aapply_recovery_point_input.rb new file mode 100644 index 0000000000..7a4a33ec27 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aapply_recovery_point_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # ApplyRecoveryPoint input specific to A2A provider. + # + class A2AApplyRecoveryPointInput < ApplyRecoveryPointProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + + # + # Mapper for A2AApplyRecoveryPointInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AApplyRecoveryPointInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_creation_input.rb new file mode 100644 index 0000000000..47343fd65f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A cloud creation input. + # + class A2AContainerCreationInput < ReplicationProviderSpecificContainerCreationInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + + # + # Mapper for A2AContainerCreationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AContainerCreationInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aenable_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aenable_protection_input.rb new file mode 100644 index 0000000000..be5fa4d101 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aenable_protection_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A enable protection input. + # + class A2AEnableProtectionInput < EnableProtectionProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The fabric specific object Id of the virtual machine. + attr_accessor :fabric_object_id + + # @return [String] The recovery container Id. + attr_accessor :recovery_container_id + + # @return [String] The recovery resource group Id. Valid for V2 + # scenarios. + attr_accessor :recovery_resource_group_id + + # @return [String] The recovery cloud service Id. Valid for V1 scenarios. + attr_accessor :recovery_cloud_service_id + + # @return [String] The recovery availability set Id. + attr_accessor :recovery_availability_set_id + + # @return [Array] The list of vm disk details. + attr_accessor :vm_disks + + # @return [Array] The list of vm managed + # disk details. + attr_accessor :vm_managed_disks + + + # + # Mapper for A2AEnableProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AEnableProtectionInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + fabric_object_id: { + required: false, + serialized_name: 'fabricObjectId', + type: { + name: 'String' + } + }, + recovery_container_id: { + required: false, + serialized_name: 'recoveryContainerId', + type: { + name: 'String' + } + }, + recovery_resource_group_id: { + required: false, + serialized_name: 'recoveryResourceGroupId', + type: { + name: 'String' + } + }, + recovery_cloud_service_id: { + required: false, + serialized_name: 'recoveryCloudServiceId', + type: { + name: 'String' + } + }, + recovery_availability_set_id: { + required: false, + serialized_name: 'recoveryAvailabilitySetId', + type: { + name: 'String' + } + }, + vm_disks: { + required: false, + serialized_name: 'vmDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'A2AVmDiskInputDetailsElementType', + type: { + name: 'Composite', + class_name: 'A2AVmDiskInputDetails' + } + } + } + }, + vm_managed_disks: { + required: false, + serialized_name: 'vmManagedDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'A2AVmManagedDiskInputDetailsElementType', + type: { + name: 'Composite', + class_name: 'A2AVmManagedDiskInputDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aevent_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aevent_details.rb new file mode 100644 index 0000000000..b85f5248c7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aevent_details.rb @@ -0,0 +1,108 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for event details of a A2A event. + # + class A2AEventDetails < EventProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The protected item arm name. + attr_accessor :protected_item_name + + # @return [String] The azure vm arm id. + attr_accessor :fabric_object_id + + # @return [String] Fabric arm name. + attr_accessor :fabric_name + + # @return [String] The fabric location. + attr_accessor :fabric_location + + # @return [String] Remote fabric arm name. + attr_accessor :remote_fabric_name + + # @return [String] Remote fabric location. + attr_accessor :remote_fabric_location + + + # + # Mapper for A2AEventDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AEventDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + protected_item_name: { + required: false, + serialized_name: 'protectedItemName', + type: { + name: 'String' + } + }, + fabric_object_id: { + required: false, + serialized_name: 'fabricObjectId', + type: { + name: 'String' + } + }, + fabric_name: { + required: false, + serialized_name: 'fabricName', + type: { + name: 'String' + } + }, + fabric_location: { + required: false, + serialized_name: 'fabricLocation', + type: { + name: 'String' + } + }, + remote_fabric_name: { + required: false, + serialized_name: 'remoteFabricName', + type: { + name: 'String' + } + }, + remote_fabric_location: { + required: false, + serialized_name: 'remoteFabricLocation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2afailover_provider_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2afailover_provider_input.rb new file mode 100644 index 0000000000..5ecc741b2e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2afailover_provider_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A provider specific input for failover. + # + class A2AFailoverProviderInput < ProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The recovery point id to be passed to failover to a + # particular recovery point. In case of latest recovery point, null + # should be passed. + attr_accessor :recovery_point_id + + # @return [String] A value indicating whether to use recovery cloud + # service for TFO or not. + attr_accessor :cloud_service_creation_option + + + # + # Mapper for A2AFailoverProviderInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AFailoverProviderInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_id: { + required: false, + serialized_name: 'recoveryPointId', + type: { + name: 'String' + } + }, + cloud_service_creation_option: { + required: false, + serialized_name: 'cloudServiceCreationOption', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_creation_input.rb new file mode 100644 index 0000000000..d45abef4ad --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A Policy creation input. + # + class A2APolicyCreationInput < PolicyProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The crash consistent snapshot frequency (in minutes). + attr_accessor :crash_consistent_frequency_in_minutes + + # @return [Integer] The app consistent snapshot frequency (in minutes). + attr_accessor :app_consistent_frequency_in_minutes + + # @return [SetMultiVmSyncStatus] A value indicating whether multi-VM sync + # has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible + # values include: 'Enable', 'Disable' + attr_accessor :multi_vm_sync_status + + + # + # Mapper for A2APolicyCreationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2APolicyCreationInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + crash_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'crashConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: true, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'Enum', + module: 'SetMultiVmSyncStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_details.rb new file mode 100644 index 0000000000..0984a2a927 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A specific policy details. + # + class A2APolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The app consistent snapshot frequency in minutes. + attr_accessor :app_consistent_frequency_in_minutes + + # @return [String] A value indicating whether multi-VM sync has to be + # enabled. + attr_accessor :multi_vm_sync_status + + # @return [Integer] The crash consistent snapshot frequency in minutes. + attr_accessor :crash_consistent_frequency_in_minutes + + + # + # Mapper for A2APolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2APolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: false, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'String' + } + }, + crash_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'crashConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_disk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_disk_details.rb new file mode 100644 index 0000000000..b7594fdbd7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_disk_details.rb @@ -0,0 +1,168 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A protected disk details. + # + class A2AProtectedDiskDetails + + include MsRestAzure + + # @return [String] The disk uri. + attr_accessor :disk_uri + + # @return [String] The recovery disk storage account. + attr_accessor :recovery_azure_storage_account_id + + # @return [String] The primary disk storage account. + attr_accessor :primary_disk_azure_storage_account_id + + # @return [String] Recovery disk uri. + attr_accessor :recovery_disk_uri + + # @return [String] The disk name. + attr_accessor :disk_name + + # @return [Integer] The disk capacity in bytes. + attr_accessor :disk_capacity_in_bytes + + # @return [String] The primary staging storage account. + attr_accessor :primary_staging_azure_storage_account_id + + # @return [String] The type of disk. + attr_accessor :disk_type + + # @return [Boolean] A value indicating whether resync is required for + # this disk. + attr_accessor :resync_required + + # @return [Integer] The percentage of the monitoring job. The type of the + # monitoring job is defined by MonitoringJobType property. + attr_accessor :monitoring_percentage_completion + + # @return [String] The type of the monitoring job. The progress is + # contained in MonitoringPercentageCompletion property. + attr_accessor :monitoring_job_type + + # @return [Float] The data pending for replication in MB at staging + # account. + attr_accessor :data_pending_in_staging_storage_account_in_mb + + # @return [Float] The data pending at source virtual machine in MB. + attr_accessor :data_pending_at_source_agent_in_mb + + + # + # Mapper for A2AProtectedDiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2AProtectedDiskDetails', + type: { + name: 'Composite', + class_name: 'A2AProtectedDiskDetails', + model_properties: { + disk_uri: { + required: false, + serialized_name: 'diskUri', + type: { + name: 'String' + } + }, + recovery_azure_storage_account_id: { + required: false, + serialized_name: 'recoveryAzureStorageAccountId', + type: { + name: 'String' + } + }, + primary_disk_azure_storage_account_id: { + required: false, + serialized_name: 'primaryDiskAzureStorageAccountId', + type: { + name: 'String' + } + }, + recovery_disk_uri: { + required: false, + serialized_name: 'recoveryDiskUri', + type: { + name: 'String' + } + }, + disk_name: { + required: false, + serialized_name: 'diskName', + type: { + name: 'String' + } + }, + disk_capacity_in_bytes: { + required: false, + serialized_name: 'diskCapacityInBytes', + type: { + name: 'Number' + } + }, + primary_staging_azure_storage_account_id: { + required: false, + serialized_name: 'primaryStagingAzureStorageAccountId', + type: { + name: 'String' + } + }, + disk_type: { + required: false, + serialized_name: 'diskType', + type: { + name: 'String' + } + }, + resync_required: { + required: false, + serialized_name: 'resyncRequired', + type: { + name: 'Boolean' + } + }, + monitoring_percentage_completion: { + required: false, + serialized_name: 'monitoringPercentageCompletion', + type: { + name: 'Number' + } + }, + monitoring_job_type: { + required: false, + serialized_name: 'monitoringJobType', + type: { + name: 'String' + } + }, + data_pending_in_staging_storage_account_in_mb: { + required: false, + serialized_name: 'dataPendingInStagingStorageAccountInMB', + type: { + name: 'Double' + } + }, + data_pending_at_source_agent_in_mb: { + required: false, + serialized_name: 'dataPendingAtSourceAgentInMB', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_managed_disk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_managed_disk_details.rb new file mode 100644 index 0000000000..c1e5d77907 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_managed_disk_details.rb @@ -0,0 +1,158 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A protected managed disk details. + # + class A2AProtectedManagedDiskDetails + + include MsRestAzure + + # @return [String] The managed disk Arm id. + attr_accessor :disk_id + + # @return [String] The recovery disk resource group Arm Id. + attr_accessor :recovery_azure_resource_group_id + + # @return [String] Recovery disk Arm Id. + attr_accessor :recovery_disk_id + + # @return [String] The disk name. + attr_accessor :disk_name + + # @return [Integer] The disk capacity in bytes. + attr_accessor :disk_capacity_in_bytes + + # @return [String] The primary staging storage account. + attr_accessor :primary_staging_azure_storage_account_id + + # @return [String] The type of disk. + attr_accessor :disk_type + + # @return [Boolean] A value indicating whether resync is required for + # this disk. + attr_accessor :resync_required + + # @return [Integer] The percentage of the monitoring job. The type of the + # monitoring job is defined by MonitoringJobType property. + attr_accessor :monitoring_percentage_completion + + # @return [String] The type of the monitoring job. The progress is + # contained in MonitoringPercentageCompletion property. + attr_accessor :monitoring_job_type + + # @return [Float] The data pending for replication in MB at staging + # account. + attr_accessor :data_pending_in_staging_storage_account_in_mb + + # @return [Float] The data pending at source virtual machine in MB. + attr_accessor :data_pending_at_source_agent_in_mb + + + # + # Mapper for A2AProtectedManagedDiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2AProtectedManagedDiskDetails', + type: { + name: 'Composite', + class_name: 'A2AProtectedManagedDiskDetails', + model_properties: { + disk_id: { + required: false, + serialized_name: 'diskId', + type: { + name: 'String' + } + }, + recovery_azure_resource_group_id: { + required: false, + serialized_name: 'recoveryAzureResourceGroupId', + type: { + name: 'String' + } + }, + recovery_disk_id: { + required: false, + serialized_name: 'recoveryDiskId', + type: { + name: 'String' + } + }, + disk_name: { + required: false, + serialized_name: 'diskName', + type: { + name: 'String' + } + }, + disk_capacity_in_bytes: { + required: false, + serialized_name: 'diskCapacityInBytes', + type: { + name: 'Number' + } + }, + primary_staging_azure_storage_account_id: { + required: false, + serialized_name: 'primaryStagingAzureStorageAccountId', + type: { + name: 'String' + } + }, + disk_type: { + required: false, + serialized_name: 'diskType', + type: { + name: 'String' + } + }, + resync_required: { + required: false, + serialized_name: 'resyncRequired', + type: { + name: 'Boolean' + } + }, + monitoring_percentage_completion: { + required: false, + serialized_name: 'monitoringPercentageCompletion', + type: { + name: 'Number' + } + }, + monitoring_job_type: { + required: false, + serialized_name: 'monitoringJobType', + type: { + name: 'String' + } + }, + data_pending_in_staging_storage_account_in_mb: { + required: false, + serialized_name: 'dataPendingInStagingStorageAccountInMB', + type: { + name: 'Double' + } + }, + data_pending_at_source_agent_in_mb: { + required: false, + serialized_name: 'dataPendingAtSourceAgentInMB', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areplication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areplication_details.rb new file mode 100644 index 0000000000..e4b34a0a27 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areplication_details.rb @@ -0,0 +1,373 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A provider specific settings. + # + class A2AReplicationDetails < ReplicationProviderSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The fabric specific object Id of the virtual machine. + attr_accessor :fabric_object_id + + # @return [String] The multi vm group Id. + attr_accessor :multi_vm_group_id + + # @return [String] The multi vm group name. + attr_accessor :multi_vm_group_name + + # @return [String] The management Id. + attr_accessor :management_id + + # @return [Array] The list of protected disks. + attr_accessor :protected_disks + + # @return [Array] The list of protected + # managed disks. + attr_accessor :protected_managed_disks + + # @return [String] Primary fabric location. + attr_accessor :primary_fabric_location + + # @return [String] The recovery fabric location. + attr_accessor :recovery_fabric_location + + # @return [String] The type of operating system. + attr_accessor :os_type + + # @return [String] The size of recovery virtual machine. + attr_accessor :recovery_azure_vmsize + + # @return [String] The name of recovery virtual machine. + attr_accessor :recovery_azure_vmname + + # @return [String] The recovery resource group. + attr_accessor :recovery_azure_resource_group_id + + # @return [String] The recovery cloud service. + attr_accessor :recovery_cloud_service + + # @return [String] The recovery availability set. + attr_accessor :recovery_availability_set + + # @return [String] The recovery virtual network. + attr_accessor :selected_recovery_azure_network_id + + # @return [Array] The virtual machine nic details. + attr_accessor :vm_nics + + # @return [AzureToAzureVmSyncedConfigDetails] The synced configuration + # details. + attr_accessor :vm_synced_config_details + + # @return [Integer] The percentage of the monitoring job. The type of the + # monitoring job is defined by MonitoringJobType property. + attr_accessor :monitoring_percentage_completion + + # @return [String] The type of the monitoring job. The progress is + # contained in MonitoringPercentageCompletion property. + attr_accessor :monitoring_job_type + + # @return [DateTime] The last heartbeat received from the source server. + attr_accessor :last_heartbeat + + # @return [String] The agent version. + attr_accessor :agent_version + + # @return [Boolean] A value indicating whether replication agent update + # is required. + attr_accessor :is_replication_agent_update_required + + # @return [String] The recovery fabric object Id. + attr_accessor :recovery_fabric_object_id + + # @return [String] The protection state for the vm. + attr_accessor :vm_protection_state + + # @return [String] The protection state description for the vm. + attr_accessor :vm_protection_state_description + + # @return [String] An id associated with the PE that survives actions + # like switch protection which change the backing PE/CPE objects + # internally.The lifecycle id gets carried forward to have a + # link/continuity in being able to have an Id that denotes the "same" + # protected item even though other internal Ids/ARM Id might be changing. + attr_accessor :lifecycle_id + + # @return [String] The test failover fabric object Id. + attr_accessor :test_failover_recovery_fabric_object_id + + # @return [Integer] The last RPO value in seconds. + attr_accessor :rpo_in_seconds + + # @return [DateTime] The time (in UTC) when the last RPO value was + # calculated by Protection Service. + attr_accessor :last_rpo_calculated_time + + + # + # Mapper for A2AReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AReplicationDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + fabric_object_id: { + required: false, + serialized_name: 'fabricObjectId', + type: { + name: 'String' + } + }, + multi_vm_group_id: { + required: false, + serialized_name: 'multiVmGroupId', + type: { + name: 'String' + } + }, + multi_vm_group_name: { + required: false, + serialized_name: 'multiVmGroupName', + type: { + name: 'String' + } + }, + management_id: { + required: false, + serialized_name: 'managementId', + type: { + name: 'String' + } + }, + protected_disks: { + required: false, + serialized_name: 'protectedDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'A2AProtectedDiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'A2AProtectedDiskDetails' + } + } + } + }, + protected_managed_disks: { + required: false, + serialized_name: 'protectedManagedDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'A2AProtectedManagedDiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'A2AProtectedManagedDiskDetails' + } + } + } + }, + primary_fabric_location: { + required: false, + serialized_name: 'primaryFabricLocation', + type: { + name: 'String' + } + }, + recovery_fabric_location: { + required: false, + serialized_name: 'recoveryFabricLocation', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + recovery_azure_vmsize: { + required: false, + serialized_name: 'recoveryAzureVMSize', + type: { + name: 'String' + } + }, + recovery_azure_vmname: { + required: false, + serialized_name: 'recoveryAzureVMName', + type: { + name: 'String' + } + }, + recovery_azure_resource_group_id: { + required: false, + serialized_name: 'recoveryAzureResourceGroupId', + type: { + name: 'String' + } + }, + recovery_cloud_service: { + required: false, + serialized_name: 'recoveryCloudService', + type: { + name: 'String' + } + }, + recovery_availability_set: { + required: false, + serialized_name: 'recoveryAvailabilitySet', + type: { + name: 'String' + } + }, + selected_recovery_azure_network_id: { + required: false, + serialized_name: 'selectedRecoveryAzureNetworkId', + type: { + name: 'String' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicDetails' + } + } + } + }, + vm_synced_config_details: { + required: false, + serialized_name: 'vmSyncedConfigDetails', + type: { + name: 'Composite', + class_name: 'AzureToAzureVmSyncedConfigDetails' + } + }, + monitoring_percentage_completion: { + required: false, + serialized_name: 'monitoringPercentageCompletion', + type: { + name: 'Number' + } + }, + monitoring_job_type: { + required: false, + serialized_name: 'monitoringJobType', + type: { + name: 'String' + } + }, + last_heartbeat: { + required: false, + serialized_name: 'lastHeartbeat', + type: { + name: 'DateTime' + } + }, + agent_version: { + required: false, + serialized_name: 'agentVersion', + type: { + name: 'String' + } + }, + is_replication_agent_update_required: { + required: false, + serialized_name: 'isReplicationAgentUpdateRequired', + type: { + name: 'Boolean' + } + }, + recovery_fabric_object_id: { + required: false, + serialized_name: 'recoveryFabricObjectId', + type: { + name: 'String' + } + }, + vm_protection_state: { + required: false, + serialized_name: 'vmProtectionState', + type: { + name: 'String' + } + }, + vm_protection_state_description: { + required: false, + serialized_name: 'vmProtectionStateDescription', + type: { + name: 'String' + } + }, + lifecycle_id: { + required: false, + serialized_name: 'lifecycleId', + type: { + name: 'String' + } + }, + test_failover_recovery_fabric_object_id: { + required: false, + serialized_name: 'testFailoverRecoveryFabricObjectId', + type: { + name: 'String' + } + }, + rpo_in_seconds: { + required: false, + serialized_name: 'rpoInSeconds', + type: { + name: 'Number' + } + }, + last_rpo_calculated_time: { + required: false, + serialized_name: 'lastRpoCalculatedTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areprotect_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areprotect_input.rb new file mode 100644 index 0000000000..2cd93f9e42 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areprotect_input.rb @@ -0,0 +1,117 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure specific reprotect input. + # + class A2AReprotectInput < ReverseReplicationProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The recovery container Id. + attr_accessor :recovery_container_id + + # @return [Array] The list of vm disk details. + attr_accessor :vm_disks + + # @return [String] The recovery resource group Id. Valid for V2 + # scenarios. + attr_accessor :recovery_resource_group_id + + # @return [String] The recovery cloud service Id. Valid for V1 scenarios. + attr_accessor :recovery_cloud_service_id + + # @return [String] The recovery availability set. + attr_accessor :recovery_availability_set_id + + # @return [String] The Policy Id. + attr_accessor :policy_id + + + # + # Mapper for A2AReprotectInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AReprotectInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_container_id: { + required: false, + serialized_name: 'recoveryContainerId', + type: { + name: 'String' + } + }, + vm_disks: { + required: false, + serialized_name: 'vmDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'A2AVmDiskInputDetailsElementType', + type: { + name: 'Composite', + class_name: 'A2AVmDiskInputDetails' + } + } + } + }, + recovery_resource_group_id: { + required: false, + serialized_name: 'recoveryResourceGroupId', + type: { + name: 'String' + } + }, + recovery_cloud_service_id: { + required: false, + serialized_name: 'recoveryCloudServiceId', + type: { + name: 'String' + } + }, + recovery_availability_set_id: { + required: false, + serialized_name: 'recoveryAvailabilitySetId', + type: { + name: 'String' + } + }, + policy_id: { + required: false, + serialized_name: 'policyId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2arp_recovery_point_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2arp_recovery_point_type.rb new file mode 100644 index 0000000000..f4ef36e428 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2arp_recovery_point_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for A2ARpRecoveryPointType + # + module A2ARpRecoveryPointType + Latest = "Latest" + LatestApplicationConsistent = "LatestApplicationConsistent" + LatestCrashConsistent = "LatestCrashConsistent" + LatestProcessed = "LatestProcessed" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aswitch_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aswitch_protection_input.rb new file mode 100644 index 0000000000..ccd349924e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aswitch_protection_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A specific switch protection input. + # + class A2ASwitchProtectionInput < SwitchProtectionProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The recovery container Id. + attr_accessor :recovery_container_id + + # @return [Array] The list of vm disk details. + attr_accessor :vm_disks + + # @return [Array] The list of vm managed + # disk details. + attr_accessor :vm_managed_disks + + # @return [String] The recovery resource group Id. Valid for V2 + # scenarios. + attr_accessor :recovery_resource_group_id + + # @return [String] The recovery cloud service Id. Valid for V1 scenarios. + attr_accessor :recovery_cloud_service_id + + # @return [String] The recovery availability set. + attr_accessor :recovery_availability_set_id + + # @return [String] The Policy Id. + attr_accessor :policy_id + + + # + # Mapper for A2ASwitchProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2ASwitchProtectionInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_container_id: { + required: false, + serialized_name: 'recoveryContainerId', + type: { + name: 'String' + } + }, + vm_disks: { + required: false, + serialized_name: 'vmDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'A2AVmDiskInputDetailsElementType', + type: { + name: 'Composite', + class_name: 'A2AVmDiskInputDetails' + } + } + } + }, + vm_managed_disks: { + required: false, + serialized_name: 'vmManagedDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'A2AVmManagedDiskInputDetailsElementType', + type: { + name: 'Composite', + class_name: 'A2AVmManagedDiskInputDetails' + } + } + } + }, + recovery_resource_group_id: { + required: false, + serialized_name: 'recoveryResourceGroupId', + type: { + name: 'String' + } + }, + recovery_cloud_service_id: { + required: false, + serialized_name: 'recoveryCloudServiceId', + type: { + name: 'String' + } + }, + recovery_availability_set_id: { + required: false, + serialized_name: 'recoveryAvailabilitySetId', + type: { + name: 'String' + } + }, + policy_id: { + required: false, + serialized_name: 'policyId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_replication_protected_item_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_replication_protected_item_input.rb new file mode 100644 index 0000000000..67b8314e8b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_replication_protected_item_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage Azure V2 input to update replication protected item. + # + class A2AUpdateReplicationProtectedItemInput < UpdateReplicationProtectedItemProviderInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The target cloud service ARM Id (for V1). + attr_accessor :recovery_cloud_service_id + + # @return [String] The target resource group ARM Id (for V2). + attr_accessor :recovery_resource_group_id + + + # + # Mapper for A2AUpdateReplicationProtectedItemInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'A2AUpdateReplicationProtectedItemInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_cloud_service_id: { + required: false, + serialized_name: 'recoveryCloudServiceId', + type: { + name: 'String' + } + }, + recovery_resource_group_id: { + required: false, + serialized_name: 'recoveryResourceGroupId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_disk_input_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_disk_input_details.rb new file mode 100644 index 0000000000..f5de3f43a1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_disk_input_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure VM disk input details. + # + class A2AVmDiskInputDetails + + include MsRestAzure + + # @return [String] The disk Uri. + attr_accessor :disk_uri + + # @return [String] The recovery VHD storage account Id. + attr_accessor :recovery_azure_storage_account_id + + # @return [String] The primary staging storage account Id. + attr_accessor :primary_staging_azure_storage_account_id + + + # + # Mapper for A2AVmDiskInputDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2AVmDiskInputDetails', + type: { + name: 'Composite', + class_name: 'A2AVmDiskInputDetails', + model_properties: { + disk_uri: { + required: false, + serialized_name: 'diskUri', + type: { + name: 'String' + } + }, + recovery_azure_storage_account_id: { + required: false, + serialized_name: 'recoveryAzureStorageAccountId', + type: { + name: 'String' + } + }, + primary_staging_azure_storage_account_id: { + required: false, + serialized_name: 'primaryStagingAzureStorageAccountId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_input_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_input_details.rb new file mode 100644 index 0000000000..3ec3115fc9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_input_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure VM managed disk input details. + # + class A2AVmManagedDiskInputDetails + + include MsRestAzure + + # @return [String] The disk Id. + attr_accessor :disk_id + + # @return [String] The primary staging storage account Arm Id. + attr_accessor :primary_staging_azure_storage_account_id + + # @return [String] The target resource group Arm Id. + attr_accessor :recovery_resource_group_id + + + # + # Mapper for A2AVmManagedDiskInputDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2AVmManagedDiskInputDetails', + type: { + name: 'Composite', + class_name: 'A2AVmManagedDiskInputDetails', + model_properties: { + disk_id: { + required: false, + serialized_name: 'diskId', + type: { + name: 'String' + } + }, + primary_staging_azure_storage_account_id: { + required: false, + serialized_name: 'primaryStagingAzureStorageAccountId', + type: { + name: 'String' + } + }, + recovery_resource_group_id: { + required: false, + serialized_name: 'recoveryResourceGroupId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request.rb new file mode 100644 index 0000000000..4d6cb78218 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input required to add vCenter. + # + class AddVCenterRequest + + include MsRestAzure + + # @return [AddVCenterRequestProperties] The properties of an add vCenter + # request. + attr_accessor :properties + + + # + # Mapper for AddVCenterRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AddVCenterRequest', + type: { + name: 'Composite', + class_name: 'AddVCenterRequest', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'AddVCenterRequestProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request_properties.rb new file mode 100644 index 0000000000..b465fde9c0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request_properties.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # The properties of an add vCenter request. + # + class AddVCenterRequestProperties + + include MsRestAzure + + # @return [String] The friendly name of the vCenter. + attr_accessor :friendly_name + + # @return [String] The IP address of the vCenter to be discovered. + attr_accessor :ip_address + + # @return [String] The process server Id from where the discovery is + # orchestrated. + attr_accessor :process_server_id + + # @return [String] The port number for discovery. + attr_accessor :port + + # @return [String] The account Id which has privileges to discover the + # vCenter. + attr_accessor :run_as_account_id + + + # + # Mapper for AddVCenterRequestProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AddVCenterRequestProperties', + type: { + name: 'Composite', + class_name: 'AddVCenterRequestProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + process_server_id: { + required: false, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + port: { + required: false, + serialized_name: 'port', + type: { + name: 'String' + } + }, + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert.rb new file mode 100644 index 0000000000..c6fb25886f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Implements the Alert class. + # + class Alert < Resource + + include MsRestAzure + + # @return [AlertProperties] Alert related data. + attr_accessor :properties + + + # + # Mapper for Alert class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Alert', + type: { + name: 'Composite', + class_name: 'Alert', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'AlertProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_collection.rb new file mode 100644 index 0000000000..4085117537 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of alerts. + # + class AlertCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of alerts. + attr_accessor :value + + # @return [String] The value of next link. + 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 [AlertCollection] 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 AlertCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AlertCollection', + type: { + name: 'Composite', + class_name: 'AlertCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AlertElementType', + type: { + name: 'Composite', + class_name: 'Alert' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_properties.rb new file mode 100644 index 0000000000..766ef9cb15 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # The proprties of an alert. + # + class AlertProperties + + include MsRestAzure + + # @return [String] A value indicating whether to send email to + # subscription administrator. + attr_accessor :send_to_owners + + # @return [Array] The custom email address for sending emails. + attr_accessor :custom_email_addresses + + # @return [String] The locale for the email notification. + attr_accessor :locale + + + # + # Mapper for AlertProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AlertProperties', + type: { + name: 'Composite', + class_name: 'AlertProperties', + model_properties: { + send_to_owners: { + required: false, + serialized_name: 'sendToOwners', + type: { + name: 'String' + } + }, + custom_email_addresses: { + required: false, + serialized_name: 'customEmailAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + locale: { + required: false, + serialized_name: 'locale', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alternate_location_recovery_option.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alternate_location_recovery_option.rb new file mode 100644 index 0000000000..302f534e40 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alternate_location_recovery_option.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for AlternateLocationRecoveryOption + # + module AlternateLocationRecoveryOption + CreateVmIfNotFound = "CreateVmIfNotFound" + NoAction = "NoAction" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input.rb new file mode 100644 index 0000000000..fac420012d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input to apply recovery point. + # + class ApplyRecoveryPointInput + + include MsRestAzure + + # @return [ApplyRecoveryPointInputProperties] The input properties to + # apply recovery point. + attr_accessor :properties + + + # + # Mapper for ApplyRecoveryPointInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplyRecoveryPointInput', + type: { + name: 'Composite', + class_name: 'ApplyRecoveryPointInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ApplyRecoveryPointInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input_properties.rb new file mode 100644 index 0000000000..87ceb40559 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input properties to apply recovery point. + # + class ApplyRecoveryPointInputProperties + + include MsRestAzure + + # @return [String] The recovery point Id. + attr_accessor :recovery_point_id + + # @return [ApplyRecoveryPointProviderSpecificInput] Provider specific + # input for applying recovery point. + attr_accessor :provider_specific_details + + + # + # Mapper for ApplyRecoveryPointInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplyRecoveryPointInputProperties', + type: { + name: 'Composite', + class_name: 'ApplyRecoveryPointInputProperties', + model_properties: { + recovery_point_id: { + required: false, + serialized_name: 'recoveryPointId', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ApplyRecoveryPointProviderSpecificInput', + class_name: 'ApplyRecoveryPointProviderSpecificInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_provider_specific_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_provider_specific_input.rb new file mode 100644 index 0000000000..232961791b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_provider_specific_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific input for apply recovery point. + # + class ApplyRecoveryPointProviderSpecificInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzureApplyRecoveryPointInput" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2ApplyRecoveryPointInput" + @@discriminatorMap["A2A"] = "A2AApplyRecoveryPointInput" + + def initialize + @instanceType = "ApplyRecoveryPointProviderSpecificInput" + end + + attr_accessor :instanceType + + + # + # Mapper for ApplyRecoveryPointProviderSpecificInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplyRecoveryPointProviderSpecificInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ApplyRecoveryPointProviderSpecificInput', + class_name: 'ApplyRecoveryPointProviderSpecificInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception.rb new file mode 100644 index 0000000000..e1b3998095 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # ARM inner exception class. + # + class ARMException + + include MsRestAzure + + # @return [String] Gets HTTP status code for the error. + attr_accessor :code + + # @return [String] Gets exception message. + attr_accessor :message + + # @return [String] Gets exception target. + attr_accessor :target + + # @return [Array] Gets service based error details. + attr_accessor :details + + # @return [ARMInnerError] Gets private data for service debugging. + attr_accessor :innererror + + + # + # Mapper for ARMException class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ARMException', + type: { + name: 'Composite', + class_name: 'ARMException', + 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' + } + }, + details: { + required: false, + serialized_name: 'details', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ARMExceptionDetailsElementType', + type: { + name: 'Composite', + class_name: 'ARMExceptionDetails' + } + } + } + }, + innererror: { + required: false, + serialized_name: 'innererror', + type: { + name: 'Composite', + class_name: 'ARMInnerError' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception_details.rb new file mode 100644 index 0000000000..16fb692680 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Service based exception details. + # + class ARMExceptionDetails + + include MsRestAzure + + # @return [String] Gets service error code. + attr_accessor :code + + # @return [String] Gets error message. + attr_accessor :message + + # @return [String] Gets possible cause for error. + attr_accessor :possible_causes + + # @return [String] Gets recommended action for the error. + attr_accessor :recommended_action + + # @return [String] Gets the client request Id for the session. + attr_accessor :client_request_id + + # @return [String] Gets the activity Id for the session. + attr_accessor :activity_id + + # @return [String] Gets exception target. + attr_accessor :target + + + # + # Mapper for ARMExceptionDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ARMExceptionDetails', + type: { + name: 'Composite', + class_name: 'ARMExceptionDetails', + model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, + possible_causes: { + required: false, + serialized_name: 'possibleCauses', + type: { + name: 'String' + } + }, + recommended_action: { + required: false, + serialized_name: 'recommendedAction', + type: { + name: 'String' + } + }, + client_request_id: { + required: false, + serialized_name: 'clientRequestId', + type: { + name: 'String' + } + }, + activity_id: { + required: false, + serialized_name: 'activityId', + type: { + name: 'String' + } + }, + target: { + required: false, + serialized_name: 'target', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/arminner_error.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/arminner_error.rb new file mode 100644 index 0000000000..08227313a4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/arminner_error.rb @@ -0,0 +1,186 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # ARM internal error class for providing additional debug data. + # + class ARMInnerError + + include MsRestAzure + + # @return [String] Gets complete stack trace of the exception. + attr_accessor :trace + + # @return [String] Gets exception source. + attr_accessor :source + + # @return [MethodCallStatus] Gets data related to method which threw the + # exception. + attr_accessor :method_status + + # @return [String] Gets cloud Id in exception. + attr_accessor :cloud_id + + # @return [String] Gets hyperV host ID. + attr_accessor :h_vhost_id + + # @return [String] Gets hyperV cluster Id. + attr_accessor :h_vcluster_id + + # @return [String] Gets network Id. + attr_accessor :network_id + + # @return [String] Gets Vm Id. + attr_accessor :vm_id + + # @return [String] Gets Fabric Id. + attr_accessor :fabric_id + + # @return [String] Gets Live Id of the caller. + attr_accessor :live_id + + # @return [String] Gets container Id of the caller. + attr_accessor :container_id + + # @return [String] Gets resource id used in the call. + attr_accessor :resource_id + + # @return [String] Gets caller resource name. + attr_accessor :resource_name + + # @return [String] Gets subscription Id. + attr_accessor :subscription_id + + # @return [String] Gets serialized SRS log context. + attr_accessor :serialized_srslog_context + + + # + # Mapper for ARMInnerError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ARMInnerError', + type: { + name: 'Composite', + class_name: 'ARMInnerError', + model_properties: { + trace: { + required: false, + serialized_name: 'trace', + type: { + name: 'String' + } + }, + source: { + required: false, + serialized_name: 'source', + type: { + name: 'String' + } + }, + method_status: { + required: false, + serialized_name: 'methodStatus', + type: { + name: 'Composite', + class_name: 'MethodCallStatus' + } + }, + cloud_id: { + required: false, + serialized_name: 'cloudId', + type: { + name: 'String' + } + }, + h_vhost_id: { + required: false, + serialized_name: 'hVHostId', + type: { + name: 'String' + } + }, + h_vcluster_id: { + required: false, + serialized_name: 'hVClusterId', + type: { + name: 'String' + } + }, + network_id: { + required: false, + serialized_name: 'networkId', + type: { + name: 'String' + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + fabric_id: { + required: false, + serialized_name: 'fabricId', + type: { + name: 'String' + } + }, + live_id: { + required: false, + serialized_name: 'liveId', + type: { + name: 'String' + } + }, + container_id: { + required: false, + serialized_name: 'containerId', + type: { + name: 'String' + } + }, + resource_id: { + required: false, + serialized_name: 'resourceId', + type: { + name: 'String' + } + }, + resource_name: { + required: false, + serialized_name: 'resourceName', + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'subscriptionId', + type: { + name: 'String' + } + }, + serialized_srslog_context: { + required: false, + serialized_name: 'serializedSRSLogContext', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asr_job_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asr_job_details.rb new file mode 100644 index 0000000000..45c92bbde3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asr_job_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents job details based on specific job type. + # + class AsrJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @instanceType = "AsrJobDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for AsrJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AsrJobDetails', + type: { + name: 'Composite', + class_name: 'AsrJobDetails', + model_properties: { + affected_object_details: { + required: false, + serialized_name: 'affectedObjectDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asrtask.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asrtask.rb new file mode 100644 index 0000000000..7c0dcda141 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asrtask.rb @@ -0,0 +1,182 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Task of the Job. + # + class ASRTask + + include MsRestAzure + + # @return [String] The Id. + attr_accessor :task_id + + # @return [String] The unique Task name. + attr_accessor :name + + # @return [DateTime] The start time. + attr_accessor :start_time + + # @return [DateTime] The end time. + attr_accessor :end_time + + # @return [Array] The state/actions applicable on this task. + attr_accessor :allowed_actions + + # @return [String] The name. + attr_accessor :friendly_name + + # @return [String] The State. It is one of these values - NotStarted, + # InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + attr_accessor :state + + # @return [String] The description of the task state. For example - For + # Succeeded state, description can be Completed, PartiallySucceeded, + # CompletedWithInformation or Skipped. + attr_accessor :state_description + + # @return [String] The type of task. Details in CustomDetails property + # depend on this type. + attr_accessor :task_type + + # @return [TaskTypeDetails] The custom task details based on the task + # type. + attr_accessor :custom_details + + # @return [GroupTaskDetails] The custom task details based on the task + # type, if the task type is GroupTaskDetails or one of the types derived + # from it. + attr_accessor :group_task_custom_details + + # @return [Array] The task error details. + attr_accessor :errors + + + # + # Mapper for ASRTask class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ASRTask', + type: { + name: 'Composite', + class_name: 'ASRTask', + model_properties: { + task_id: { + required: false, + serialized_name: 'taskId', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + allowed_actions: { + required: false, + serialized_name: 'allowedActions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + state_description: { + required: false, + serialized_name: 'stateDescription', + type: { + name: 'String' + } + }, + task_type: { + required: false, + serialized_name: 'taskType', + type: { + name: 'String' + } + }, + custom_details: { + required: false, + serialized_name: 'customDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'TaskTypeDetails', + class_name: 'TaskTypeDetails' + } + }, + group_task_custom_details: { + required: false, + serialized_name: 'groupTaskCustomDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'GroupTaskDetails', + class_name: 'GroupTaskDetails' + } + }, + errors: { + required: false, + serialized_name: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/automation_runbook_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/automation_runbook_task_details.rb new file mode 100644 index 0000000000..345e6a12bb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/automation_runbook_task_details.rb @@ -0,0 +1,139 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the task details for an automation runbook. + # + class AutomationRunbookTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "AutomationRunbookTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] The recovery plan task name. + attr_accessor :name + + # @return [String] The cloud service of the automation runbook account. + attr_accessor :cloud_service_name + + # @return [String] The subscription Id of the automation runbook account. + attr_accessor :subscription_id + + # @return [String] The automation account name of the runbook. + attr_accessor :account_name + + # @return [String] The runbook Id. + attr_accessor :runbook_id + + # @return [String] The runbook name. + attr_accessor :runbook_name + + # @return [String] The job Id of the runbook execution. + attr_accessor :job_id + + # @return [String] The execution output of the runbook. + attr_accessor :job_output + + # @return [Boolean] A value indicating whether it is a primary side + # script or not. + attr_accessor :is_primary_side_script + + + # + # Mapper for AutomationRunbookTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AutomationRunbookTaskDetails', + type: { + name: 'Composite', + class_name: 'AutomationRunbookTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + cloud_service_name: { + required: false, + serialized_name: 'cloudServiceName', + type: { + name: 'String' + } + }, + subscription_id: { + required: false, + serialized_name: 'subscriptionId', + type: { + name: 'String' + } + }, + account_name: { + required: false, + serialized_name: 'accountName', + type: { + name: 'String' + } + }, + runbook_id: { + required: false, + serialized_name: 'runbookId', + type: { + name: 'String' + } + }, + runbook_name: { + required: false, + serialized_name: 'runbookName', + type: { + name: 'String' + } + }, + job_id: { + required: false, + serialized_name: 'jobId', + type: { + name: 'String' + } + }, + job_output: { + required: false, + serialized_name: 'jobOutput', + type: { + name: 'String' + } + }, + is_primary_side_script: { + required: false, + serialized_name: 'isPrimarySideScript', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_creation_input.rb new file mode 100644 index 0000000000..f64909e832 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Fabric provider specific settings. + # + class AzureFabricCreationInput < FabricSpecificCreationInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [String] The Location. + attr_accessor :location + + + # + # Mapper for AzureFabricCreationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'AzureFabricCreationInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_specific_details.rb new file mode 100644 index 0000000000..9c332bdb32 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_specific_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure Fabric Specific Details. + # + class AzureFabricSpecificDetails < FabricSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "Azure" + end + + attr_accessor :instanceType + + # @return [String] The Location for the Azure fabric. + attr_accessor :location + + # @return [Array] The container Ids for the Azure fabric. + attr_accessor :container_ids + + + # + # Mapper for AzureFabricSpecificDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Azure', + type: { + name: 'Composite', + class_name: 'AzureFabricSpecificDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + container_ids: { + required: false, + serialized_name: 'containerIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_create_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_create_network_mapping_input.rb new file mode 100644 index 0000000000..c7de05e54a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_create_network_mapping_input.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Create network mappings input properties/behaviour specific to Azure to + # Azure Network mapping. + # + class AzureToAzureCreateNetworkMappingInput < FabricSpecificCreateNetworkMappingInput + + include MsRestAzure + + + def initialize + @instanceType = "AzureToAzure" + end + + attr_accessor :instanceType + + # @return [String] The primary azure vnet Id. + attr_accessor :primary_network_id + + + # + # Mapper for AzureToAzureCreateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureToAzure', + type: { + name: 'Composite', + class_name: 'AzureToAzureCreateNetworkMappingInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + primary_network_id: { + required: false, + serialized_name: 'primaryNetworkId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_network_mapping_settings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_network_mapping_settings.rb new file mode 100644 index 0000000000..be2a8a064e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_network_mapping_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # A2A Network Mapping fabric specific settings. + # + class AzureToAzureNetworkMappingSettings < NetworkMappingFabricSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "AzureToAzure" + end + + attr_accessor :instanceType + + # @return [String] The primary fabric location. + attr_accessor :primary_fabric_location + + # @return [String] The recovery fabric location. + attr_accessor :recovery_fabric_location + + + # + # Mapper for AzureToAzureNetworkMappingSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureToAzure', + type: { + name: 'Composite', + class_name: 'AzureToAzureNetworkMappingSettings', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + primary_fabric_location: { + required: false, + serialized_name: 'primaryFabricLocation', + type: { + name: 'String' + } + }, + recovery_fabric_location: { + required: false, + serialized_name: 'recoveryFabricLocation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_update_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_update_network_mapping_input.rb new file mode 100644 index 0000000000..8e2f7044a8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_update_network_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Updates network mappings input. + # + class AzureToAzureUpdateNetworkMappingInput < FabricSpecificUpdateNetworkMappingInput + + include MsRestAzure + + + def initialize + @instanceType = "AzureToAzure" + end + + attr_accessor :instanceType + + # @return [String] The primary azure vnet Id. + attr_accessor :primary_network_id + + + # + # Mapper for AzureToAzureUpdateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureToAzure', + type: { + name: 'Composite', + class_name: 'AzureToAzureUpdateNetworkMappingInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + primary_network_id: { + required: false, + serialized_name: 'primaryNetworkId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_vm_synced_config_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_vm_synced_config_details.rb new file mode 100644 index 0000000000..9747c07acd --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_vm_synced_config_details.rb @@ -0,0 +1,87 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure to Azure VM synced configuration details. + # + class AzureToAzureVmSyncedConfigDetails + + include MsRestAzure + + # @return [Hash{String => String}] The Azure VM tags. + attr_accessor :tags + + # @return [Array] The Azure role assignments. + attr_accessor :role_assignments + + # @return [Array] The Azure VM input endpoints. + attr_accessor :input_endpoints + + + # + # Mapper for AzureToAzureVmSyncedConfigDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureToAzureVmSyncedConfigDetails', + type: { + name: 'Composite', + class_name: 'AzureToAzureVmSyncedConfigDetails', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + role_assignments: { + required: false, + serialized_name: 'roleAssignments', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RoleAssignmentElementType', + type: { + name: 'Composite', + class_name: 'RoleAssignment' + } + } + } + }, + input_endpoints: { + required: false, + serialized_name: 'inputEndpoints', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InputEndpointElementType', + type: { + name: 'Composite', + class_name: 'InputEndpoint' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_vm_disk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_vm_disk_details.rb new file mode 100644 index 0000000000..98e8c6dfaf --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_vm_disk_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Disk details for E2A provider. + # + class AzureVmDiskDetails + + include MsRestAzure + + # @return [String] VHD type. + attr_accessor :vhd_type + + # @return [String] The VHD id. + attr_accessor :vhd_id + + # @return [String] VHD name. + attr_accessor :vhd_name + + # @return [String] Max side in MB. + attr_accessor :max_size_mb + + # @return [String] Blob uri of the Azure disk. + attr_accessor :target_disk_location + + # @return [String] The target Azure disk name. + attr_accessor :target_disk_name + + # @return [String] Ordinal\LunId of the disk for the Azure VM. + attr_accessor :lun_id + + + # + # Mapper for AzureVmDiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureVmDiskDetails', + type: { + name: 'Composite', + class_name: 'AzureVmDiskDetails', + model_properties: { + vhd_type: { + required: false, + serialized_name: 'vhdType', + type: { + name: 'String' + } + }, + vhd_id: { + required: false, + serialized_name: 'vhdId', + type: { + name: 'String' + } + }, + vhd_name: { + required: false, + serialized_name: 'vhdName', + type: { + name: 'String' + } + }, + max_size_mb: { + required: false, + serialized_name: 'maxSizeMB', + type: { + name: 'String' + } + }, + target_disk_location: { + required: false, + serialized_name: 'targetDiskLocation', + type: { + name: 'String' + } + }, + target_disk_name: { + required: false, + serialized_name: 'targetDiskName', + type: { + name: 'String' + } + }, + lun_id: { + required: false, + serialized_name: 'lunId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configuration_settings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configuration_settings.rb new file mode 100644 index 0000000000..bfa1067c70 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configuration_settings.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication provider specific settings. + # + class ConfigurationSettings + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVVirtualMachine"] = "HyperVVirtualMachineDetails" + @@discriminatorMap["VMwareVirtualMachine"] = "VMwareVirtualMachineDetails" + @@discriminatorMap["ReplicationGroupDetails"] = "ReplicationGroupDetails" + + def initialize + @instanceType = "ConfigurationSettings" + end + + attr_accessor :instanceType + + + # + # Mapper for ConfigurationSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConfigurationSettings', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ConfigurationSettings', + class_name: 'ConfigurationSettings', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request.rb new file mode 100644 index 0000000000..b528c166df --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Request to configure alerts for the system. + # + class ConfigureAlertRequest + + include MsRestAzure + + # @return [ConfigureAlertRequestProperties] The properties of a configure + # alert request. + attr_accessor :properties + + + # + # Mapper for ConfigureAlertRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConfigureAlertRequest', + type: { + name: 'Composite', + class_name: 'ConfigureAlertRequest', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ConfigureAlertRequestProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request_properties.rb new file mode 100644 index 0000000000..9026528314 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Properties of a configure alert request. + # + class ConfigureAlertRequestProperties + + include MsRestAzure + + # @return [String] A value indicating whether to send email to + # subscription administrator. + attr_accessor :send_to_owners + + # @return [Array] The custom email address for sending emails. + attr_accessor :custom_email_addresses + + # @return [String] The locale for the email notification. + attr_accessor :locale + + + # + # Mapper for ConfigureAlertRequestProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConfigureAlertRequestProperties', + type: { + name: 'Composite', + class_name: 'ConfigureAlertRequestProperties', + model_properties: { + send_to_owners: { + required: false, + serialized_name: 'sendToOwners', + type: { + name: 'String' + } + }, + custom_email_addresses: { + required: false, + serialized_name: 'customEmailAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + locale: { + required: false, + serialized_name: 'locale', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/consistency_check_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/consistency_check_task_details.rb new file mode 100644 index 0000000000..49fda30cce --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/consistency_check_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class contains monitoring details of all the inconsistent Protected + # Entites in Vmm. + # + class ConsistencyCheckTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "ConsistencyCheckTaskDetails" + end + + attr_accessor :instanceType + + # @return [Array] The list of inconsistent Vm + # details. + attr_accessor :vm_details + + + # + # Mapper for ConsistencyCheckTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConsistencyCheckTaskDetails', + type: { + name: 'Composite', + class_name: 'ConsistencyCheckTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vm_details: { + required: false, + serialized_name: 'vmDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InconsistentVmDetailsElementType', + type: { + name: 'Composite', + class_name: 'InconsistentVmDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input.rb new file mode 100644 index 0000000000..36d63800a9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Create network mappings input. + # + class CreateNetworkMappingInput + + include MsRestAzure + + # @return [CreateNetworkMappingInputProperties] Input properties for + # creating network mapping. + attr_accessor :properties + + + # + # Mapper for CreateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateNetworkMappingInput', + type: { + name: 'Composite', + class_name: 'CreateNetworkMappingInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CreateNetworkMappingInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input_properties.rb new file mode 100644 index 0000000000..d91f747c1f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Common input details for network mapping operation. + # + class CreateNetworkMappingInputProperties + + include MsRestAzure + + # @return [String] Recovery fabric Name. + attr_accessor :recovery_fabric_name + + # @return [String] Recovery network Id. + attr_accessor :recovery_network_id + + # @return [FabricSpecificCreateNetworkMappingInput] Fabric specific input + # properties. + attr_accessor :fabric_specific_details + + + # + # Mapper for CreateNetworkMappingInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateNetworkMappingInputProperties', + type: { + name: 'Composite', + class_name: 'CreateNetworkMappingInputProperties', + model_properties: { + recovery_fabric_name: { + required: false, + serialized_name: 'recoveryFabricName', + type: { + name: 'String' + } + }, + recovery_network_id: { + required: false, + serialized_name: 'recoveryNetworkId', + type: { + name: 'String' + } + }, + fabric_specific_details: { + required: false, + serialized_name: 'fabricSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificCreateNetworkMappingInput', + class_name: 'FabricSpecificCreateNetworkMappingInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input.rb new file mode 100644 index 0000000000..a4202b1e6b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection profile input. + # + class CreatePolicyInput + + include MsRestAzure + + # @return [CreatePolicyInputProperties] Policy creation properties. + attr_accessor :properties + + + # + # Mapper for CreatePolicyInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreatePolicyInput', + type: { + name: 'Composite', + class_name: 'CreatePolicyInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CreatePolicyInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input_properties.rb new file mode 100644 index 0000000000..d012c68ad3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Policy creation properties. + # + class CreatePolicyInputProperties + + include MsRestAzure + + # @return [PolicyProviderSpecificInput] The ReplicationProviderSettings. + attr_accessor :provider_specific_input + + + # + # Mapper for CreatePolicyInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreatePolicyInputProperties', + type: { + name: 'Composite', + class_name: 'CreatePolicyInputProperties', + model_properties: { + provider_specific_input: { + required: false, + serialized_name: 'providerSpecificInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'PolicyProviderSpecificInput', + class_name: 'PolicyProviderSpecificInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input.rb new file mode 100644 index 0000000000..96773c0ac2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Create protection container input. + # + class CreateProtectionContainerInput + + include MsRestAzure + + # @return [CreateProtectionContainerInputProperties] Create protection + # container input properties. + attr_accessor :properties + + + # + # Mapper for CreateProtectionContainerInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateProtectionContainerInput', + type: { + name: 'Composite', + class_name: 'CreateProtectionContainerInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CreateProtectionContainerInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input_properties.rb new file mode 100644 index 0000000000..4293c3672c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Create protection container input properties. + # + class CreateProtectionContainerInputProperties + + include MsRestAzure + + # @return [Array] + # Provider specific inputs for container creation. + attr_accessor :provider_specific_input + + + # + # Mapper for CreateProtectionContainerInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateProtectionContainerInputProperties', + type: { + name: 'Composite', + class_name: 'CreateProtectionContainerInputProperties', + model_properties: { + provider_specific_input: { + required: false, + serialized_name: 'providerSpecificInput', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ReplicationProviderSpecificContainerCreationInputElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ReplicationProviderSpecificContainerCreationInput', + class_name: 'ReplicationProviderSpecificContainerCreationInput' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input.rb new file mode 100644 index 0000000000..a161f49fbb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Configure pairing input. + # + class CreateProtectionContainerMappingInput + + include MsRestAzure + + # @return [CreateProtectionContainerMappingInputProperties] Configure + # protection input properties. + attr_accessor :properties + + + # + # Mapper for CreateProtectionContainerMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateProtectionContainerMappingInput', + type: { + name: 'Composite', + class_name: 'CreateProtectionContainerMappingInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CreateProtectionContainerMappingInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input_properties.rb new file mode 100644 index 0000000000..c4cb8d673b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Configure pairing input properties. + # + class CreateProtectionContainerMappingInputProperties + + include MsRestAzure + + # @return [String] The target unique protection container name. + attr_accessor :target_protection_container_id + + # @return [String] Applicable policy. + attr_accessor :policy_id + + # @return [ReplicationProviderSpecificContainerMappingInput] Provider + # specific input for pairing. + attr_accessor :provider_specific_input + + + # + # Mapper for CreateProtectionContainerMappingInputProperties class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateProtectionContainerMappingInputProperties', + type: { + name: 'Composite', + class_name: 'CreateProtectionContainerMappingInputProperties', + model_properties: { + target_protection_container_id: { + required: false, + serialized_name: 'targetProtectionContainerId', + type: { + name: 'String' + } + }, + policy_id: { + required: false, + serialized_name: 'PolicyId', + type: { + name: 'String' + } + }, + provider_specific_input: { + required: false, + serialized_name: 'providerSpecificInput', + type: { + name: 'Composite', + class_name: 'ReplicationProviderSpecificContainerMappingInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input.rb new file mode 100644 index 0000000000..d428e96a6b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Create recovery plan input class. + # + class CreateRecoveryPlanInput + + include MsRestAzure + + # @return [CreateRecoveryPlanInputProperties] Recovery plan creation + # properties. + attr_accessor :properties + + + # + # Mapper for CreateRecoveryPlanInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateRecoveryPlanInput', + type: { + name: 'Composite', + class_name: 'CreateRecoveryPlanInput', + model_properties: { + properties: { + required: true, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CreateRecoveryPlanInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input_properties.rb new file mode 100644 index 0000000000..e2c9a246dc --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input_properties.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan creation properties. + # + class CreateRecoveryPlanInputProperties + + include MsRestAzure + + # @return [String] The primary fabric Id. + attr_accessor :primary_fabric_id + + # @return [String] The recovery fabric Id. + attr_accessor :recovery_fabric_id + + # @return [FailoverDeploymentModel] The failover deployment model. + # Possible values include: 'NotApplicable', 'Classic', 'ResourceManager' + attr_accessor :failover_deployment_model + + # @return [Array] The recovery plan groups. + attr_accessor :groups + + + # + # Mapper for CreateRecoveryPlanInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CreateRecoveryPlanInputProperties', + type: { + name: 'Composite', + class_name: 'CreateRecoveryPlanInputProperties', + model_properties: { + primary_fabric_id: { + required: true, + serialized_name: 'primaryFabricId', + type: { + name: 'String' + } + }, + recovery_fabric_id: { + required: true, + serialized_name: 'recoveryFabricId', + type: { + name: 'String' + } + }, + failover_deployment_model: { + required: false, + serialized_name: 'failoverDeploymentModel', + type: { + name: 'Enum', + module: 'FailoverDeploymentModel' + } + }, + groups: { + required: true, + serialized_name: 'groups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanGroupElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPlanGroup' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/current_scenario_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/current_scenario_details.rb new file mode 100644 index 0000000000..2efdf8523d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/current_scenario_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Current scenario details of the protected entity. + # + class CurrentScenarioDetails + + include MsRestAzure + + # @return [String] Scenario name. + attr_accessor :scenario_name + + # @return [String] ARM Id of the job being executed. + attr_accessor :job_id + + # @return [DateTime] Start time of the workflow. + attr_accessor :start_time + + + # + # Mapper for CurrentScenarioDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CurrentScenarioDetails', + type: { + name: 'Composite', + class_name: 'CurrentScenarioDetails', + model_properties: { + scenario_name: { + required: false, + serialized_name: 'scenarioName', + type: { + name: 'String' + } + }, + job_id: { + required: false, + serialized_name: 'jobId', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_store.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_store.rb new file mode 100644 index 0000000000..eb099ba1c7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_store.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # The datastore details of the MT. + # + class DataStore + + include MsRestAzure + + # @return [String] The symbolic name of data store. + attr_accessor :symbolic_name + + # @return [String] The uuid of data store. + attr_accessor :uuid + + # @return [String] The capacity of data store in GBs. + attr_accessor :capacity + + # @return [String] The free space of data store in GBs. + attr_accessor :free_space + + # @return [String] The type of data store. + attr_accessor :type + + + # + # Mapper for DataStore class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataStore', + type: { + name: 'Composite', + class_name: 'DataStore', + model_properties: { + symbolic_name: { + required: false, + serialized_name: 'symbolicName', + type: { + name: 'String' + } + }, + uuid: { + required: false, + serialized_name: 'uuid', + type: { + name: 'String' + } + }, + capacity: { + required: false, + serialized_name: 'capacity', + type: { + name: 'String' + } + }, + free_space: { + required: false, + serialized_name: 'freeSpace', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_sync_status.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_sync_status.rb new file mode 100644 index 0000000000..96358356c0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_sync_status.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for DataSyncStatus + # + module DataSyncStatus + ForDownTime = "ForDownTime" + ForSynchronization = "ForSynchronization" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input.rb new file mode 100644 index 0000000000..0ac9b8aa95 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Disable protection input. + # + class DisableProtectionInput + + include MsRestAzure + + # @return [DisableProtectionInputProperties] Disable protection input + # properties. + attr_accessor :properties + + + # + # Mapper for DisableProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DisableProtectionInput', + type: { + name: 'Composite', + class_name: 'DisableProtectionInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'DisableProtectionInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input_properties.rb new file mode 100644 index 0000000000..8a8b4568bd --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Disable protection input properties. + # + class DisableProtectionInputProperties + + include MsRestAzure + + # @return [DisableProtectionReason] Disable protection reason. It can + # have values NotSpecified/MigrationComplete. Possible values include: + # 'NotSpecified', 'MigrationComplete' + attr_accessor :disable_protection_reason + + # @return [DisableProtectionProviderSpecificInput] Replication provider + # specific input. + attr_accessor :replication_provider_input + + + # + # Mapper for DisableProtectionInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DisableProtectionInputProperties', + type: { + name: 'Composite', + class_name: 'DisableProtectionInputProperties', + model_properties: { + disable_protection_reason: { + required: false, + serialized_name: 'disableProtectionReason', + type: { + name: 'Enum', + module: 'DisableProtectionReason' + } + }, + replication_provider_input: { + required: false, + serialized_name: 'replicationProviderInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'DisableProtectionProviderSpecificInput', + class_name: 'DisableProtectionProviderSpecificInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_provider_specific_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_provider_specific_input.rb new file mode 100644 index 0000000000..640d4dbbab --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_provider_specific_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Disable protection provider specific input. + # + class DisableProtectionProviderSpecificInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["InMage"] = "InMageDisableProtectionProviderSpecificInput" + + def initialize + @instanceType = "DisableProtectionProviderSpecificInput" + end + + attr_accessor :instanceType + + + # + # Mapper for DisableProtectionProviderSpecificInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DisableProtectionProviderSpecificInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'DisableProtectionProviderSpecificInput', + class_name: 'DisableProtectionProviderSpecificInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_reason.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_reason.rb new file mode 100644 index 0000000000..df96d2e9a1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_reason.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for DisableProtectionReason + # + module DisableProtectionReason + NotSpecified = "NotSpecified" + MigrationComplete = "MigrationComplete" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request.rb new file mode 100644 index 0000000000..3be6fd2202 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Request to add a physical machine as a protectable item in a container. + # + class DiscoverProtectableItemRequest + + include MsRestAzure + + # @return [DiscoverProtectableItemRequestProperties] The properties of a + # discover protectable item request. + attr_accessor :properties + + + # + # Mapper for DiscoverProtectableItemRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiscoverProtectableItemRequest', + type: { + name: 'Composite', + class_name: 'DiscoverProtectableItemRequest', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'DiscoverProtectableItemRequestProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request_properties.rb new file mode 100644 index 0000000000..0874303347 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Discover protectable item properties. + # + class DiscoverProtectableItemRequestProperties + + include MsRestAzure + + # @return [String] The friendly name of the physical machine. + attr_accessor :friendly_name + + # @return [String] The IP address of the physical machine to be + # discovered. + attr_accessor :ip_address + + # @return [String] The OS type on the physical machine. + attr_accessor :os_type + + + # + # Mapper for DiscoverProtectableItemRequestProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiscoverProtectableItemRequestProperties', + type: { + name: 'Composite', + class_name: 'DiscoverProtectableItemRequestProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_details.rb new file mode 100644 index 0000000000..6924e135b6 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Onprem disk details data. + # + class DiskDetails + + include MsRestAzure + + # @return [Integer] The hard disk max size in MB. + attr_accessor :max_size_mb + + # @return [String] The type of the volume. + attr_accessor :vhd_type + + # @return [String] The VHD Id. + attr_accessor :vhd_id + + # @return [String] The VHD name. + attr_accessor :vhd_name + + + # + # Mapper for DiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiskDetails', + type: { + name: 'Composite', + class_name: 'DiskDetails', + model_properties: { + max_size_mb: { + required: false, + serialized_name: 'maxSizeMB', + type: { + name: 'Number' + } + }, + vhd_type: { + required: false, + serialized_name: 'vhdType', + type: { + name: 'String' + } + }, + vhd_id: { + required: false, + serialized_name: 'vhdId', + type: { + name: 'String' + } + }, + vhd_name: { + required: false, + serialized_name: 'vhdName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_volume_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_volume_details.rb new file mode 100644 index 0000000000..d4d5f9fe03 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_volume_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Volume details. + # + class DiskVolumeDetails + + include MsRestAzure + + # @return [String] The volume label. + attr_accessor :label + + # @return [String] The volume name. + attr_accessor :name + + + # + # Mapper for DiskVolumeDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiskVolumeDetails', + type: { + name: 'Composite', + class_name: 'DiskVolumeDetails', + model_properties: { + label: { + required: false, + serialized_name: 'label', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/display.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/display.rb new file mode 100644 index 0000000000..58f82f115b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/display.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Contains the localized display information for this particular operation + # / action. These value will be used by several clients for (1) custom role + # definitions for RBAC; (2) complex query filters for the event service; + # and (3) audit history / records for management operations. + # + class Display + + include MsRestAzure + + # @return [String] The provider. The localized friendly form of the + # resource provider name – it is expected to also include the + # publisher/company responsible. It should use Title Casing and begin + # with "Microsoft" for 1st party services. e.g. "Microsoft Monitoring + # Insights" or "Microsoft Compute." + attr_accessor :provider + + # @return [String] The resource. The localized friendly form of the + # resource related to this action/operation – it should match the public + # documentation for the resource provider. It should use Title Casing. + # This value should be unique for a particular URL type (e.g. nested + # types should *not* reuse their parent’s display.resource field). e.g. + # "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine + # VM Sizes" or "Scheduler Jobs" + attr_accessor :resource + + # @return [String] The operation. The localized friendly name for the + # operation, as it should be shown to the user. It should be concise (to + # fit in drop downs) but clear (i.e. self-documenting). It should use + # Title Casing. Prescriptive guidance: Read Create or Update Delete + # 'ActionName' + attr_accessor :operation + + # @return [String] The description. The localized friendly description + # for the operation, as it should be shown to the user. It should be + # thorough, yet concise – it will be used in tool tips and detailed + # views. Prescriptive guidance for namespaces: Read any + # 'display.provider' resource Create or Update any 'display.provider' + # resource Delete any 'display.provider' resource Perform any other + # action on any 'display.provider' resource Prescriptive guidance for + # namespaces: Read any 'display.resource' Create or Update any + # 'display.resource' Delete any 'display.resource' 'ActionName' any + # 'display.resources' + attr_accessor :description + + + # + # Mapper for Display class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Display', + type: { + name: 'Composite', + class_name: 'Display', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input.rb new file mode 100644 index 0000000000..1ab88039c0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Enable protection input. + # + class EnableProtectionInput + + include MsRestAzure + + # @return [EnableProtectionInputProperties] Enable protection input + # properties. + attr_accessor :properties + + + # + # Mapper for EnableProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EnableProtectionInput', + type: { + name: 'Composite', + class_name: 'EnableProtectionInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'EnableProtectionInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input_properties.rb new file mode 100644 index 0000000000..8e5bb14fc5 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Enable protection input properties. + # + class EnableProtectionInputProperties + + include MsRestAzure + + # @return [String] The Policy Id. + attr_accessor :policy_id + + # @return [String] The protectable item Id. + attr_accessor :protectable_item_id + + # @return [EnableProtectionProviderSpecificInput] The + # ReplicationProviderInput. For HyperVReplicaAzure provider, it will be + # AzureEnableProtectionInput object. For San provider, it will be + # SanEnableProtectionInput object. For HyperVReplicaAzure provider, it + # can be null. + attr_accessor :provider_specific_details + + + # + # Mapper for EnableProtectionInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EnableProtectionInputProperties', + type: { + name: 'Composite', + class_name: 'EnableProtectionInputProperties', + model_properties: { + policy_id: { + required: false, + serialized_name: 'policyId', + type: { + name: 'String' + } + }, + protectable_item_id: { + required: false, + serialized_name: 'protectableItemId', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'EnableProtectionProviderSpecificInput', + class_name: 'EnableProtectionProviderSpecificInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_provider_specific_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_provider_specific_input.rb new file mode 100644 index 0000000000..258f32db81 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_provider_specific_input.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Enable protection provider specific input. + # + class EnableProtectionProviderSpecificInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzureEnableProtectionInput" + @@discriminatorMap["San"] = "SanEnableProtectionInput" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2EnableProtectionInput" + @@discriminatorMap["InMage"] = "InMageEnableProtectionInput" + @@discriminatorMap["A2A"] = "A2AEnableProtectionInput" + + def initialize + @instanceType = "EnableProtectionProviderSpecificInput" + end + + attr_accessor :instanceType + + + # + # Mapper for EnableProtectionProviderSpecificInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EnableProtectionProviderSpecificInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'EnableProtectionProviderSpecificInput', + class_name: 'EnableProtectionProviderSpecificInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/encryption_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/encryption_details.rb new file mode 100644 index 0000000000..f6a9c16db1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/encryption_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Encryption details for the fabric. + # + class EncryptionDetails + + include MsRestAzure + + # @return [String] The key encryption key state for the Vmm. + attr_accessor :kek_state + + # @return [String] The key encryption key certificate thumbprint. + attr_accessor :kek_cert_thumbprint + + # @return [DateTime] The key encryption key certificate expiry date. + attr_accessor :kek_cert_expiry_date + + + # + # Mapper for EncryptionDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EncryptionDetails', + type: { + name: 'Composite', + class_name: 'EncryptionDetails', + model_properties: { + kek_state: { + required: false, + serialized_name: 'kekState', + type: { + name: 'String' + } + }, + kek_cert_thumbprint: { + required: false, + serialized_name: 'kekCertThumbprint', + type: { + name: 'String' + } + }, + kek_cert_expiry_date: { + required: false, + serialized_name: 'kekCertExpiryDate', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event.rb new file mode 100644 index 0000000000..d1c1049736 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Implements the Event class. + # + class Event < Resource + + include MsRestAzure + + # @return [EventProperties] Event related data. + attr_accessor :properties + + + # + # Mapper for Event class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Event', + type: { + name: 'Composite', + class_name: 'Event', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'EventProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_collection.rb new file mode 100644 index 0000000000..f6c68e501e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of fabric details. + # + class EventCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of events. + attr_accessor :value + + # @return [String] The value of next link. + 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 [EventCollection] 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 EventCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventCollection', + type: { + name: 'Composite', + class_name: 'EventCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EventElementType', + type: { + name: 'Composite', + class_name: 'Event' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_properties.rb new file mode 100644 index 0000000000..d8579b0c61 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_properties.rb @@ -0,0 +1,151 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # The properties of a monitoring event. + # + class EventProperties + + include MsRestAzure + + # @return [String] The Id of the monitoring event. + attr_accessor :event_code + + # @return [String] The event name. + attr_accessor :description + + # @return [String] The type of the event. for example: VM Health, Server + # Health, Job Failure etc. + attr_accessor :event_type + + # @return [String] The friendly name of the source of the event on which + # it is raised (for example, VM, VMM etc). + attr_accessor :affected_object_friendly_name + + # @return [String] The severity of the event. + attr_accessor :severity + + # @return [DateTime] The time of occurence of the event. + attr_accessor :time_of_occurrence + + # @return [String] The ARM ID of the fabric. + attr_accessor :fabric_id + + # @return [EventProviderSpecificDetails] The provider specific settings. + attr_accessor :provider_specific_details + + # @return [EventSpecificDetails] The event specific settings. + attr_accessor :event_specific_details + + # @return [Array] The list of errors / warnings capturing + # details associated with the issue(s). + attr_accessor :health_errors + + + # + # Mapper for EventProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventProperties', + type: { + name: 'Composite', + class_name: 'EventProperties', + model_properties: { + event_code: { + required: false, + serialized_name: 'eventCode', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + }, + event_type: { + required: false, + serialized_name: 'eventType', + type: { + name: 'String' + } + }, + affected_object_friendly_name: { + required: false, + serialized_name: 'affectedObjectFriendlyName', + type: { + name: 'String' + } + }, + severity: { + required: false, + serialized_name: 'severity', + type: { + name: 'String' + } + }, + time_of_occurrence: { + required: false, + serialized_name: 'timeOfOccurrence', + type: { + name: 'DateTime' + } + }, + fabric_id: { + required: false, + serialized_name: 'fabricId', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'EventProviderSpecificDetails', + class_name: 'EventProviderSpecificDetails' + } + }, + event_specific_details: { + required: false, + serialized_name: 'eventSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'EventSpecificDetails', + class_name: 'EventSpecificDetails' + } + }, + health_errors: { + required: false, + serialized_name: 'healthErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_provider_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_provider_specific_details.rb new file mode 100644 index 0000000000..f1f2a28bc0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_provider_specific_details.rb @@ -0,0 +1,50 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for provider specific details for an event. + # + class EventProviderSpecificDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaBaseEventDetails"] = "HyperVReplicaBaseEventDetails" + @@discriminatorMap["HyperVReplica2012"] = "HyperVReplica2012EventDetails" + @@discriminatorMap["HyperVReplica2012R2"] = "HyperVReplica2012R2EventDetails" + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzureEventDetails" + @@discriminatorMap["A2A"] = "A2AEventDetails" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2EventDetails" + + def initialize + @instanceType = "EventProviderSpecificDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for EventProviderSpecificDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventProviderSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'EventProviderSpecificDetails', + class_name: 'EventProviderSpecificDetails', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_query_parameter.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_query_parameter.rb new file mode 100644 index 0000000000..a28816f185 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_query_parameter.rb @@ -0,0 +1,107 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Implements the event query parameter. + # + class EventQueryParameter + + include MsRestAzure + + # @return [String] The source id of the events to be queried. + attr_accessor :event_code + + # @return [String] The severity of the events to be queried. + attr_accessor :severity + + # @return [String] The type of the events to be queried. + attr_accessor :event_type + + # @return [String] The affected object server id of the events to be + # queried. + attr_accessor :fabric_name + + # @return [String] The affected object name of the events to be queried. + attr_accessor :affected_object_friendly_name + + # @return [DateTime] The start time of the time range within which the + # events are to be queried. + attr_accessor :start_time + + # @return [DateTime] The end time of the time range within which the + # events are to be queried. + attr_accessor :end_time + + + # + # Mapper for EventQueryParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventQueryParameter', + type: { + name: 'Composite', + class_name: 'EventQueryParameter', + model_properties: { + event_code: { + required: false, + serialized_name: 'EventCode', + type: { + name: 'String' + } + }, + severity: { + required: false, + serialized_name: 'Severity', + type: { + name: 'String' + } + }, + event_type: { + required: false, + serialized_name: 'EventType', + type: { + name: 'String' + } + }, + fabric_name: { + required: false, + serialized_name: 'FabricName', + type: { + name: 'String' + } + }, + affected_object_friendly_name: { + required: false, + serialized_name: 'AffectedObjectFriendlyName', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'StartTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'EndTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_specific_details.rb new file mode 100644 index 0000000000..a3f2897e9d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_specific_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for event specific details for an event. + # + class EventSpecificDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["JobStatus"] = "JobStatusEventDetails" + + def initialize + @instanceType = "EventSpecificDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for EventSpecificDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'EventSpecificDetails', + class_name: 'EventSpecificDetails', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/export_job_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/export_job_details.rb new file mode 100644 index 0000000000..89413c27d6 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/export_job_details.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents details for export jobs workflow. + # + class ExportJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @instanceType = "ExportJobDetails" + end + + attr_accessor :instanceType + + # @return [String] BlobUri of the exported jobs. + attr_accessor :blob_uri + + # @return [String] The sas token to access blob. + attr_accessor :sas_token + + + # + # Mapper for ExportJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ExportJobDetails', + type: { + name: 'Composite', + class_name: 'ExportJobDetails', + model_properties: { + affected_object_details: { + required: false, + serialized_name: 'affectedObjectDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + blob_uri: { + required: false, + serialized_name: 'blobUri', + type: { + name: 'String' + } + }, + sas_token: { + required: false, + serialized_name: 'sasToken', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric.rb new file mode 100644 index 0000000000..6e9f8cc5f1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Fabric definition. + # + class Fabric < Resource + + include MsRestAzure + + # @return [FabricProperties] Fabric related data. + attr_accessor :properties + + + # + # Mapper for Fabric class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Fabric', + type: { + name: 'Composite', + class_name: 'Fabric', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'FabricProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_collection.rb new file mode 100644 index 0000000000..43cf14fef9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of fabric details. + # + class FabricCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The fabric details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [FabricCollection] 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 FabricCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricCollection', + type: { + name: 'Composite', + class_name: 'FabricCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FabricElementType', + type: { + name: 'Composite', + class_name: 'Fabric' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input.rb new file mode 100644 index 0000000000..0928b5aba4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Site details provided during the time of site creation + # + class FabricCreationInput + + include MsRestAzure + + # @return [FabricCreationInputProperties] Fabric creation input. + attr_accessor :properties + + + # + # Mapper for FabricCreationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricCreationInput', + type: { + name: 'Composite', + class_name: 'FabricCreationInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'FabricCreationInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input_properties.rb new file mode 100644 index 0000000000..4fc114af99 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Properties of site details provided during the time of site creation + # + class FabricCreationInputProperties + + include MsRestAzure + + # @return [FabricSpecificCreationInput] Fabric provider specific creation + # input. + attr_accessor :custom_details + + + # + # Mapper for FabricCreationInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricCreationInputProperties', + type: { + name: 'Composite', + class_name: 'FabricCreationInputProperties', + model_properties: { + custom_details: { + required: false, + serialized_name: 'customDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificCreationInput', + class_name: 'FabricSpecificCreationInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_properties.rb new file mode 100644 index 0000000000..d2ef2be6b0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_properties.rb @@ -0,0 +1,127 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Fabric properties. + # + class FabricProperties + + include MsRestAzure + + # @return [String] Friendly name of the fabric. + attr_accessor :friendly_name + + # @return [EncryptionDetails] Encryption details for the fabric. + attr_accessor :encryption_details + + # @return [EncryptionDetails] Rollover encryption details for the fabric. + attr_accessor :rollover_encryption_details + + # @return [String] Dra Registration Id. + attr_accessor :internal_identifier + + # @return [String] BCDR state of the fabric. + attr_accessor :bcdr_state + + # @return [FabricSpecificDetails] Fabric specific settings. + attr_accessor :custom_details + + # @return [Array] Fabric health error details. + attr_accessor :health_error_details + + # @return [String] Health of fabric. + attr_accessor :health + + + # + # Mapper for FabricProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricProperties', + type: { + name: 'Composite', + class_name: 'FabricProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + encryption_details: { + required: false, + serialized_name: 'encryptionDetails', + type: { + name: 'Composite', + class_name: 'EncryptionDetails' + } + }, + rollover_encryption_details: { + required: false, + serialized_name: 'rolloverEncryptionDetails', + type: { + name: 'Composite', + class_name: 'EncryptionDetails' + } + }, + internal_identifier: { + required: false, + serialized_name: 'internalIdentifier', + type: { + name: 'String' + } + }, + bcdr_state: { + required: false, + serialized_name: 'bcdrState', + type: { + name: 'String' + } + }, + custom_details: { + required: false, + serialized_name: 'customDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificDetails', + class_name: 'FabricSpecificDetails' + } + }, + health_error_details: { + required: false, + serialized_name: 'healthErrorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + health: { + required: false, + serialized_name: 'health', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_replication_group_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_replication_group_task_details.rb new file mode 100644 index 0000000000..8799b936d3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_replication_group_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the fabric replication group task details. + # + class FabricReplicationGroupTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "FabricReplicationGroupTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] The skipped reason. + attr_accessor :skipped_reason + + # @return [String] The skipped reason string. + attr_accessor :skipped_reason_string + + # @return [JobEntity] The job entity. + attr_accessor :job_task + + + # + # Mapper for FabricReplicationGroupTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricReplicationGroupTaskDetails', + type: { + name: 'Composite', + class_name: 'FabricReplicationGroupTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + skipped_reason: { + required: false, + serialized_name: 'skippedReason', + type: { + name: 'String' + } + }, + skipped_reason_string: { + required: false, + serialized_name: 'skippedReasonString', + type: { + name: 'String' + } + }, + job_task: { + required: false, + serialized_name: 'jobTask', + type: { + name: 'Composite', + class_name: 'JobEntity' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_create_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_create_network_mapping_input.rb new file mode 100644 index 0000000000..6fa73da5fd --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_create_network_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input details specific to fabrics during Network Mapping. + # + class FabricSpecificCreateNetworkMappingInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["AzureToAzure"] = "AzureToAzureCreateNetworkMappingInput" + @@discriminatorMap["VmmToAzure"] = "VmmToAzureCreateNetworkMappingInput" + @@discriminatorMap["VmmToVmm"] = "VmmToVmmCreateNetworkMappingInput" + + def initialize + @instanceType = "FabricSpecificCreateNetworkMappingInput" + end + + attr_accessor :instanceType + + + # + # Mapper for FabricSpecificCreateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricSpecificCreateNetworkMappingInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificCreateNetworkMappingInput', + class_name: 'FabricSpecificCreateNetworkMappingInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_creation_input.rb new file mode 100644 index 0000000000..00ca1c1d18 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Fabric provider specific settings. + # + class FabricSpecificCreationInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["A2A"] = "AzureFabricCreationInput" + @@discriminatorMap["VMwareV2"] = "VMwareV2FabricCreationInput" + + def initialize + @instanceType = "FabricSpecificCreationInput" + end + + attr_accessor :instanceType + + + # + # Mapper for FabricSpecificCreationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricSpecificCreationInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificCreationInput', + class_name: 'FabricSpecificCreationInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_details.rb new file mode 100644 index 0000000000..0768be93be --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_details.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Fabric specific details. + # + class FabricSpecificDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["Azure"] = "AzureFabricSpecificDetails" + @@discriminatorMap["VMM"] = "VmmDetails" + @@discriminatorMap["HyperVSite"] = "HyperVSiteDetails" + @@discriminatorMap["VMware"] = "VMwareDetails" + @@discriminatorMap["VMwareV2"] = "VMwareV2FabricSpecificDetails" + + def initialize + @instanceType = "FabricSpecificDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for FabricSpecificDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificDetails', + class_name: 'FabricSpecificDetails', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_update_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_update_network_mapping_input.rb new file mode 100644 index 0000000000..be47980e49 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_update_network_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input details specific to fabrics during Network Mapping. + # + class FabricSpecificUpdateNetworkMappingInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["AzureToAzure"] = "AzureToAzureUpdateNetworkMappingInput" + @@discriminatorMap["VmmToAzure"] = "VmmToAzureUpdateNetworkMappingInput" + @@discriminatorMap["VmmToVmm"] = "VmmToVmmUpdateNetworkMappingInput" + + def initialize + @instanceType = "FabricSpecificUpdateNetworkMappingInput" + end + + attr_accessor :instanceType + + + # + # Mapper for FabricSpecificUpdateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FabricSpecificUpdateNetworkMappingInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificUpdateNetworkMappingInput', + class_name: 'FabricSpecificUpdateNetworkMappingInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_deployment_model.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_deployment_model.rb new file mode 100644 index 0000000000..61237e4610 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_deployment_model.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for FailoverDeploymentModel + # + module FailoverDeploymentModel + NotApplicable = "NotApplicable" + Classic = "Classic" + ResourceManager = "ResourceManager" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_job_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_job_details.rb new file mode 100644 index 0000000000..3d8ccdd686 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_job_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the details for a failover job. + # + class FailoverJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @instanceType = "FailoverJobDetails" + end + + attr_accessor :instanceType + + # @return [Array] The test VM + # details. + attr_accessor :protected_item_details + + + # + # Mapper for FailoverJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverJobDetails', + type: { + name: 'Composite', + class_name: 'FailoverJobDetails', + model_properties: { + affected_object_details: { + required: false, + serialized_name: 'affectedObjectDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + protected_item_details: { + required: false, + serialized_name: 'protectedItemDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FailoverReplicationProtectedItemDetailsElementType', + type: { + name: 'Composite', + class_name: 'FailoverReplicationProtectedItemDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request.rb new file mode 100644 index 0000000000..8b2b432640 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Request to failover a process server. + # + class FailoverProcessServerRequest + + include MsRestAzure + + # @return [FailoverProcessServerRequestProperties] The properties of the + # PS Failover request. + attr_accessor :properties + + + # + # Mapper for FailoverProcessServerRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverProcessServerRequest', + type: { + name: 'Composite', + class_name: 'FailoverProcessServerRequest', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'FailoverProcessServerRequestProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request_properties.rb new file mode 100644 index 0000000000..faacb5fa90 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # The properties of the Failover Process Server request. + # + class FailoverProcessServerRequestProperties + + include MsRestAzure + + # @return [String] The container identifier. + attr_accessor :container_name + + # @return [String] The source process server. + attr_accessor :source_process_server_id + + # @return [String] The new process server. + attr_accessor :target_process_server_id + + # @return [Array] The VMS to migrate. + attr_accessor :vms_to_migrate + + # @return [String] A value for failover type. It can be + # systemlevel/serverlevel + attr_accessor :update_type + + + # + # Mapper for FailoverProcessServerRequestProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverProcessServerRequestProperties', + type: { + name: 'Composite', + class_name: 'FailoverProcessServerRequestProperties', + model_properties: { + container_name: { + required: false, + serialized_name: 'containerName', + type: { + name: 'String' + } + }, + source_process_server_id: { + required: false, + serialized_name: 'sourceProcessServerId', + type: { + name: 'String' + } + }, + target_process_server_id: { + required: false, + serialized_name: 'targetProcessServerId', + type: { + name: 'String' + } + }, + vms_to_migrate: { + required: false, + serialized_name: 'vmsToMigrate', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + update_type: { + required: false, + serialized_name: 'updateType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_replication_protected_item_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_replication_protected_item_details.rb new file mode 100644 index 0000000000..927675aa79 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_replication_protected_item_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Failover details for a replication protected item. + # + class FailoverReplicationProtectedItemDetails + + include MsRestAzure + + # @return [String] The name. + attr_accessor :name + + # @return [String] The friendly name. + attr_accessor :friendly_name + + # @return [String] The test Vm name. + attr_accessor :test_vm_name + + # @return [String] The test Vm friendly name. + attr_accessor :test_vm_friendly_name + + # @return [String] The network connection status. + attr_accessor :network_connection_status + + # @return [String] The network friendly name. + attr_accessor :network_friendly_name + + # @return [String] The network subnet. + attr_accessor :subnet + + # @return [String] The recovery point Id. + attr_accessor :recovery_point_id + + # @return [DateTime] The recovery point time. + attr_accessor :recovery_point_time + + + # + # Mapper for FailoverReplicationProtectedItemDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverReplicationProtectedItemDetails', + type: { + name: 'Composite', + class_name: 'FailoverReplicationProtectedItemDetails', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + test_vm_name: { + required: false, + serialized_name: 'testVmName', + type: { + name: 'String' + } + }, + test_vm_friendly_name: { + required: false, + serialized_name: 'testVmFriendlyName', + type: { + name: 'String' + } + }, + network_connection_status: { + required: false, + serialized_name: 'networkConnectionStatus', + type: { + name: 'String' + } + }, + network_friendly_name: { + required: false, + serialized_name: 'networkFriendlyName', + type: { + name: 'String' + } + }, + subnet: { + required: false, + serialized_name: 'subnet', + type: { + name: 'String' + } + }, + recovery_point_id: { + required: false, + serialized_name: 'recoveryPointId', + type: { + name: 'String' + } + }, + recovery_point_time: { + required: false, + serialized_name: 'recoveryPointTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/group_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/group_task_details.rb new file mode 100644 index 0000000000..9479bf90d0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/group_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the group task details when parent child + # relationship exists in the drill down. + # + class GroupTaskDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["InlineWorkflowTaskDetails"] = "InlineWorkflowTaskDetails" + @@discriminatorMap["RecoveryPlanGroupTaskDetails"] = "RecoveryPlanGroupTaskDetails" + @@discriminatorMap["RecoveryPlanShutdownGroupTaskDetails"] = "RecoveryPlanShutdownGroupTaskDetails" + + def initialize + @instanceType = "GroupTaskDetails" + end + + attr_accessor :instanceType + + # @return [Array] The child tasks. + attr_accessor :child_tasks + + + # + # Mapper for GroupTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GroupTaskDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'GroupTaskDetails', + class_name: 'GroupTaskDetails', + model_properties: { + child_tasks: { + required: false, + serialized_name: 'childTasks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ASRTaskElementType', + type: { + name: 'Composite', + class_name: 'ASRTask' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error.rb new file mode 100644 index 0000000000..6609836e32 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error.rb @@ -0,0 +1,152 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Health Error + # + class HealthError + + include MsRestAzure + + # @return [String] Source of error. + attr_accessor :error_source + + # @return [String] Type of error. + attr_accessor :error_type + + # @return [String] Level of error. + attr_accessor :error_level + + # @return [String] Error code. + attr_accessor :error_code + + # @return [String] Error message. + attr_accessor :error_message + + # @return [String] Possible causes of error. + attr_accessor :possible_causes + + # @return [String] Recommended action to resolve error. + attr_accessor :recommended_action + + # @return [DateTime] Error creation time (UTC) + attr_accessor :creation_time_utc + + # @return [String] DRA error message. + attr_accessor :recovery_provider_error_message + + # @return [String] ID of the entity. + attr_accessor :entity_id + + # @return [Array] The child health errors. + attr_accessor :child_errors + + + # + # Mapper for HealthError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HealthError', + type: { + name: 'Composite', + class_name: 'HealthError', + model_properties: { + error_source: { + required: false, + serialized_name: 'errorSource', + type: { + name: 'String' + } + }, + error_type: { + required: false, + serialized_name: 'errorType', + type: { + name: 'String' + } + }, + error_level: { + required: false, + serialized_name: 'errorLevel', + type: { + name: 'String' + } + }, + error_code: { + required: false, + serialized_name: 'errorCode', + type: { + name: 'String' + } + }, + error_message: { + required: false, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + }, + possible_causes: { + required: false, + serialized_name: 'possibleCauses', + type: { + name: 'String' + } + }, + recommended_action: { + required: false, + serialized_name: 'recommendedAction', + type: { + name: 'String' + } + }, + creation_time_utc: { + required: false, + serialized_name: 'creationTimeUtc', + type: { + name: 'DateTime' + } + }, + recovery_provider_error_message: { + required: false, + serialized_name: 'recoveryProviderErrorMessage', + type: { + name: 'String' + } + }, + entity_id: { + required: false, + serialized_name: 'entityId', + type: { + name: 'String' + } + }, + child_errors: { + required: false, + serialized_name: 'childErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_category.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_category.rb new file mode 100644 index 0000000000..df6e471117 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_category.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for HealthErrorCategory + # + module HealthErrorCategory + Replication = "Replication" + TestFailover = "TestFailover" + Configuration = "Configuration" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_summary.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_summary.rb new file mode 100644 index 0000000000..5758cc0c4a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_summary.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # class to define the summary of the health error details. + # + class HealthErrorSummary + + include MsRestAzure + + # @return [String] The code of the health error. + attr_accessor :summary_code + + # @return [HealthErrorCategory] The category of the health error. + # Possible values include: 'Replication', 'TestFailover', 'Configuration' + attr_accessor :category + + # @return [Severity] Severity of error. Possible values include: 'NONE', + # 'Warning', 'Error', 'Info' + attr_accessor :severity + + # @return [String] The summary message of the health error. + attr_accessor :summary_message + + # @return [String] The type of affected ARM resource. + attr_accessor :affected_resource_type + + # @return [String] The sub type of any subcomponent within the ARM + # resource that this might be applicable. Value remains null if not + # applicable. + attr_accessor :affected_resource_subtype + + # @return [Array] The list of affected resource correlation Ids. + # This can be used to uniquely identify the count of items affected by a + # specific category and severity as well as count of item affected by an + # specific issue. + attr_accessor :affected_resource_correlation_ids + + + # + # Mapper for HealthErrorSummary class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HealthErrorSummary', + type: { + name: 'Composite', + class_name: 'HealthErrorSummary', + model_properties: { + summary_code: { + required: false, + serialized_name: 'summaryCode', + type: { + name: 'String' + } + }, + category: { + required: false, + serialized_name: 'category', + type: { + name: 'Enum', + module: 'HealthErrorCategory' + } + }, + severity: { + required: false, + serialized_name: 'severity', + type: { + name: 'Enum', + module: 'Severity' + } + }, + summary_message: { + required: false, + serialized_name: 'summaryMessage', + type: { + name: 'String' + } + }, + affected_resource_type: { + required: false, + serialized_name: 'affectedResourceType', + type: { + name: 'String' + } + }, + affected_resource_subtype: { + required: false, + serialized_name: 'affectedResourceSubtype', + type: { + name: 'String' + } + }, + affected_resource_correlation_ids: { + required: false, + serialized_name: 'affectedResourceCorrelationIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012event_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012event_details.rb new file mode 100644 index 0000000000..ab82b67095 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012event_details.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for event details of a HyperVReplica E2E event. + # + class HyperVReplica2012EventDetails < EventProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012" + end + + attr_accessor :instanceType + + # @return [String] The container friendly name. + attr_accessor :container_name + + # @return [String] The fabric friendly name. + attr_accessor :fabric_name + + # @return [String] The remote container name. + attr_accessor :remote_container_name + + # @return [String] The remote fabric name. + attr_accessor :remote_fabric_name + + + # + # Mapper for HyperVReplica2012EventDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012', + type: { + name: 'Composite', + class_name: 'HyperVReplica2012EventDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + container_name: { + required: false, + serialized_name: 'containerName', + type: { + name: 'String' + } + }, + fabric_name: { + required: false, + serialized_name: 'fabricName', + type: { + name: 'String' + } + }, + remote_container_name: { + required: false, + serialized_name: 'remoteContainerName', + type: { + name: 'String' + } + }, + remote_fabric_name: { + required: false, + serialized_name: 'remoteFabricName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012r2event_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012r2event_details.rb new file mode 100644 index 0000000000..35e431e0bb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012r2event_details.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for event details of a HyperVReplica blue E2E event. + # + class HyperVReplica2012R2EventDetails < EventProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012R2" + end + + attr_accessor :instanceType + + # @return [String] The container friendly name. + attr_accessor :container_name + + # @return [String] The fabric friendly name. + attr_accessor :fabric_name + + # @return [String] The remote container name. + attr_accessor :remote_container_name + + # @return [String] The remote fabric name. + attr_accessor :remote_fabric_name + + + # + # Mapper for HyperVReplica2012R2EventDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012R2', + type: { + name: 'Composite', + class_name: 'HyperVReplica2012R2EventDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + container_name: { + required: false, + serialized_name: 'containerName', + type: { + name: 'String' + } + }, + fabric_name: { + required: false, + serialized_name: 'fabricName', + type: { + name: 'String' + } + }, + remote_container_name: { + required: false, + serialized_name: 'remoteContainerName', + type: { + name: 'String' + } + }, + remote_fabric_name: { + required: false, + serialized_name: 'remoteFabricName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_apply_recovery_point_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_apply_recovery_point_input.rb new file mode 100644 index 0000000000..02b0b16c97 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_apply_recovery_point_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # ApplyRecoveryPoint input specific to HyperVReplicaAzure provider. + # + class HyperVReplicaAzureApplyRecoveryPointInput < ApplyRecoveryPointProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [String] The vault location where the recovery Vm resides. + attr_accessor :vault_location + + # @return [String] The primary kek certificate pfx. + attr_accessor :primary_kek_certificate_pfx + + # @return [String] The secondary kek certificate pfx. + attr_accessor :secondary_kek_certificate_pfx + + + # + # Mapper for HyperVReplicaAzureApplyRecoveryPointInput class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureApplyRecoveryPointInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vault_location: { + required: false, + serialized_name: 'vaultLocation', + type: { + name: 'String' + } + }, + primary_kek_certificate_pfx: { + required: false, + serialized_name: 'primaryKekCertificatePfx', + type: { + name: 'String' + } + }, + secondary_kek_certificate_pfx: { + required: false, + serialized_name: 'secondaryKekCertificatePfx', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_enable_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_enable_protection_input.rb new file mode 100644 index 0000000000..58aa7ba938 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_enable_protection_input.rb @@ -0,0 +1,201 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure specific enable protection input. + # + class HyperVReplicaAzureEnableProtectionInput < EnableProtectionProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [String] The Hyper-V host Vm Id. + attr_accessor :hv_host_vm_id + + # @return [String] The Vm Name. + attr_accessor :vm_name + + # @return [String] The OS type associated with vm. + attr_accessor :os_type + + # @return [String] The OS disk VHD id associated with vm. + attr_accessor :vhd_id + + # @return [String] The storage account name. + attr_accessor :target_storage_account_id + + # @return [String] The selected target Azure network Id. + attr_accessor :target_azure_network_id + + # @return [String] The selected target Azure subnet Id. + attr_accessor :target_azure_subnet_id + + # @return [String] The selected option to enable RDP\SSH on target vm + # after failover. String value of + # {SrsDataContract.EnableRDPOnTargetOption} enum. + attr_accessor :enable_rdpon_target_option + + # @return [String] The target azure Vm Name. + attr_accessor :target_azure_vm_name + + # @return [String] The storage account to be used for logging during + # replication. + attr_accessor :log_storage_account_id + + # @return [Array] The list of VHD IDs of disks to be protected. + attr_accessor :disks_to_include + + # @return [String] The Id of the target resource group (for classic + # deployment) in which the failover VM is to be created. + attr_accessor :target_azure_v1resource_group_id + + # @return [String] The Id of the target resource group (for resource + # manager deployment) in which the failover VM is to be created. + attr_accessor :target_azure_v2resource_group_id + + # @return [String] A value indicating whether managed disks should be + # used during failover. + attr_accessor :use_managed_disks + + + # + # Mapper for HyperVReplicaAzureEnableProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureEnableProtectionInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + hv_host_vm_id: { + required: false, + serialized_name: 'hvHostVmId', + type: { + name: 'String' + } + }, + vm_name: { + required: false, + serialized_name: 'vmName', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + vhd_id: { + required: false, + serialized_name: 'vhdId', + type: { + name: 'String' + } + }, + target_storage_account_id: { + required: false, + serialized_name: 'targetStorageAccountId', + type: { + name: 'String' + } + }, + target_azure_network_id: { + required: false, + serialized_name: 'targetAzureNetworkId', + type: { + name: 'String' + } + }, + target_azure_subnet_id: { + required: false, + serialized_name: 'targetAzureSubnetId', + type: { + name: 'String' + } + }, + enable_rdpon_target_option: { + required: false, + serialized_name: 'enableRDPOnTargetOption', + type: { + name: 'String' + } + }, + target_azure_vm_name: { + required: false, + serialized_name: 'targetAzureVmName', + type: { + name: 'String' + } + }, + log_storage_account_id: { + required: false, + serialized_name: 'logStorageAccountId', + type: { + name: 'String' + } + }, + disks_to_include: { + required: false, + serialized_name: 'disksToInclude', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + target_azure_v1resource_group_id: { + required: false, + serialized_name: 'targetAzureV1ResourceGroupId', + type: { + name: 'String' + } + }, + target_azure_v2resource_group_id: { + required: false, + serialized_name: 'targetAzureV2ResourceGroupId', + type: { + name: 'String' + } + }, + use_managed_disks: { + required: false, + serialized_name: 'useManagedDisks', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_event_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_event_details.rb new file mode 100644 index 0000000000..a81d2343b7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_event_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for event details of a HyperVReplica E2A event. + # + class HyperVReplicaAzureEventDetails < EventProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [String] The container friendly name. + attr_accessor :container_name + + # @return [String] The fabric friendly name. + attr_accessor :fabric_name + + # @return [String] The remote container name. + attr_accessor :remote_container_name + + + # + # Mapper for HyperVReplicaAzureEventDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureEventDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + container_name: { + required: false, + serialized_name: 'containerName', + type: { + name: 'String' + } + }, + fabric_name: { + required: false, + serialized_name: 'fabricName', + type: { + name: 'String' + } + }, + remote_container_name: { + required: false, + serialized_name: 'remoteContainerName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failback_provider_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failback_provider_input.rb new file mode 100644 index 0000000000..59f13e8f39 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failback_provider_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # HvrA provider specific input for failback. + # + class HyperVReplicaAzureFailbackProviderInput < ProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzureFailback" + end + + attr_accessor :instanceType + + # @return [String] Data sync option. + attr_accessor :data_sync_option + + # @return [String] ALR options to create alternate recovery. + attr_accessor :recovery_vm_creation_option + + # @return [String] Provider ID for alternate location + attr_accessor :provider_id_for_alternate_recovery + + + # + # Mapper for HyperVReplicaAzureFailbackProviderInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzureFailback', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureFailbackProviderInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + data_sync_option: { + required: false, + serialized_name: 'dataSyncOption', + type: { + name: 'String' + } + }, + recovery_vm_creation_option: { + required: false, + serialized_name: 'recoveryVmCreationOption', + type: { + name: 'String' + } + }, + provider_id_for_alternate_recovery: { + required: false, + serialized_name: 'providerIdForAlternateRecovery', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failover_provider_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failover_provider_input.rb new file mode 100644 index 0000000000..ef8a7ebfea --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failover_provider_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # HvrA provider specific input for failover. + # + class HyperVReplicaAzureFailoverProviderInput < ProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [String] Location of the vault. + attr_accessor :vault_location + + # @return [String] Primary kek certificate pfx. + attr_accessor :primary_kek_certificate_pfx + + # @return [String] Secondary kek certificate pfx. + attr_accessor :secondary_kek_certificate_pfx + + # @return [String] The recovery point id to be passed to failover to a + # particular recovery point. In case of latest recovery point, null + # should be passed. + attr_accessor :recovery_point_id + + + # + # Mapper for HyperVReplicaAzureFailoverProviderInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureFailoverProviderInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vault_location: { + required: false, + serialized_name: 'vaultLocation', + type: { + name: 'String' + } + }, + primary_kek_certificate_pfx: { + required: false, + serialized_name: 'primaryKekCertificatePfx', + type: { + name: 'String' + } + }, + secondary_kek_certificate_pfx: { + required: false, + serialized_name: 'secondaryKekCertificatePfx', + type: { + name: 'String' + } + }, + recovery_point_id: { + required: false, + serialized_name: 'recoveryPointId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_details.rb new file mode 100644 index 0000000000..886cfcb663 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper-V Replica Azure specific protection profile details. + # + class HyperVReplicaAzurePolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [Integer] The duration (in hours) to which point the recovery + # history needs to be maintained. + attr_accessor :recovery_point_history_duration_in_hours + + # @return [Integer] The interval (in hours) at which Hyper-V Replica + # should create an application consistent snapshot within the VM. + attr_accessor :application_consistent_snapshot_frequency_in_hours + + # @return [Integer] The replication interval. + attr_accessor :replication_interval + + # @return [String] The scheduled start time for the initial replication. + # If this parameter is Null, the initial replication starts immediately. + attr_accessor :online_replication_start_time + + # @return [String] A value indicating whether encryption is enabled for + # virtual machines in this cloud. + attr_accessor :encryption + + # @return [String] The active storage account Id. + attr_accessor :active_storage_account_id + + + # + # Mapper for HyperVReplicaAzurePolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzurePolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_history_duration_in_hours: { + required: false, + serialized_name: 'recoveryPointHistoryDurationInHours', + type: { + name: 'Number' + } + }, + application_consistent_snapshot_frequency_in_hours: { + required: false, + serialized_name: 'applicationConsistentSnapshotFrequencyInHours', + type: { + name: 'Number' + } + }, + replication_interval: { + required: false, + serialized_name: 'replicationInterval', + type: { + name: 'Number' + } + }, + online_replication_start_time: { + required: false, + serialized_name: 'onlineReplicationStartTime', + type: { + name: 'String' + } + }, + encryption: { + required: false, + serialized_name: 'encryption', + type: { + name: 'String' + } + }, + active_storage_account_id: { + required: false, + serialized_name: 'activeStorageAccountId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_input.rb new file mode 100644 index 0000000000..a3f9ddd741 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper-V Replica Azure specific input for creating a protection profile. + # + class HyperVReplicaAzurePolicyInput < PolicyProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [Integer] The duration (in hours) to which point the recovery + # history needs to be maintained. + attr_accessor :recovery_point_history_duration + + # @return [Integer] The interval (in hours) at which Hyper-V Replica + # should create an application consistent snapshot within the VM. + attr_accessor :application_consistent_snapshot_frequency_in_hours + + # @return [Integer] The replication interval. + attr_accessor :replication_interval + + # @return [String] The scheduled start time for the initial replication. + # If this parameter is Null, the initial replication starts immediately. + attr_accessor :online_replication_start_time + + # @return [String] A value indicating whether encryption needs to be + # enabled for Vms in this cloud. + attr_accessor :encryption + + # @return [Array] The list of storage accounts to which the VMs + # in the primary cloud can replicate to. + attr_accessor :storage_accounts + + + # + # Mapper for HyperVReplicaAzurePolicyInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzurePolicyInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_history_duration: { + required: false, + serialized_name: 'recoveryPointHistoryDuration', + type: { + name: 'Number' + } + }, + application_consistent_snapshot_frequency_in_hours: { + required: false, + serialized_name: 'applicationConsistentSnapshotFrequencyInHours', + type: { + name: 'Number' + } + }, + replication_interval: { + required: false, + serialized_name: 'replicationInterval', + type: { + name: 'Number' + } + }, + online_replication_start_time: { + required: false, + serialized_name: 'onlineReplicationStartTime', + type: { + name: 'String' + } + }, + encryption: { + required: false, + serialized_name: 'encryption', + type: { + name: 'String' + } + }, + storage_accounts: { + required: false, + serialized_name: 'storageAccounts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_replication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_replication_details.rb new file mode 100644 index 0000000000..313adb5ca9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_replication_details.rb @@ -0,0 +1,281 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper V Replica Azure provider specific settings. + # + class HyperVReplicaAzureReplicationDetails < ReplicationProviderSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [Array] Azure VM Disk details. + attr_accessor :azure_vmdisk_details + + # @return [String] Recovery Azure given name. + attr_accessor :recovery_azure_vmname + + # @return [String] The Recovery Azure VM size. + attr_accessor :recovery_azure_vmsize + + # @return [String] The recovery Azure storage account. + attr_accessor :recovery_azure_storage_account + + # @return [String] The ARM id of the log storage account used for + # replication. This will be set to null if no log storage account was + # provided during enable protection. + attr_accessor :recovery_azure_log_storage_account_id + + # @return [DateTime] The Last replication time. + attr_accessor :last_replicated_time + + # @return [String] The virtual machine Id. + attr_accessor :vm_id + + # @return [String] The protection state for the vm. + attr_accessor :vm_protection_state + + # @return [String] The protection state description for the vm. + attr_accessor :vm_protection_state_description + + # @return [InitialReplicationDetails] Initial replication details. + attr_accessor :initial_replication_details + + # @return [Array] The PE Network details. + attr_accessor :vm_nics + + # @return [String] The selected recovery azure network Id. + attr_accessor :selected_recovery_azure_network_id + + # @return [String] The encryption info. + attr_accessor :encryption + + # @return [OSDetails] The operating system info. + attr_accessor :o_sdetails + + # @return [Integer] The RAM size of the VM on the primary side. + attr_accessor :source_vm_ramsize_in_mb + + # @return [Integer] The CPU count of the VM on the primary side. + attr_accessor :source_vm_cpucount + + # @return [String] The selected option to enable RDP\SSH on target vm + # after failover. String value of + # {SrsDataContract.EnableRDPOnTargetOption} enum. + attr_accessor :enable_rdpon_target_option + + # @return [String] The target resource group Id. + attr_accessor :recovery_azure_resource_group_id + + # @return [String] The recovery availability set Id. + attr_accessor :recovery_availability_set_id + + # @return [String] A value indicating whether managed disks should be + # used during failover. + attr_accessor :use_managed_disks + + # @return [String] License Type of the VM to be used. + attr_accessor :license_type + + + # + # Mapper for HyperVReplicaAzureReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureReplicationDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + azure_vmdisk_details: { + required: false, + serialized_name: 'azureVMDiskDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AzureVmDiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'AzureVmDiskDetails' + } + } + } + }, + recovery_azure_vmname: { + required: false, + serialized_name: 'recoveryAzureVMName', + type: { + name: 'String' + } + }, + recovery_azure_vmsize: { + required: false, + serialized_name: 'recoveryAzureVMSize', + type: { + name: 'String' + } + }, + recovery_azure_storage_account: { + required: false, + serialized_name: 'recoveryAzureStorageAccount', + type: { + name: 'String' + } + }, + recovery_azure_log_storage_account_id: { + required: false, + serialized_name: 'recoveryAzureLogStorageAccountId', + type: { + name: 'String' + } + }, + last_replicated_time: { + required: false, + serialized_name: 'lastReplicatedTime', + type: { + name: 'DateTime' + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + vm_protection_state: { + required: false, + serialized_name: 'vmProtectionState', + type: { + name: 'String' + } + }, + vm_protection_state_description: { + required: false, + serialized_name: 'vmProtectionStateDescription', + type: { + name: 'String' + } + }, + initial_replication_details: { + required: false, + serialized_name: 'initialReplicationDetails', + type: { + name: 'Composite', + class_name: 'InitialReplicationDetails' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicDetails' + } + } + } + }, + selected_recovery_azure_network_id: { + required: false, + serialized_name: 'selectedRecoveryAzureNetworkId', + type: { + name: 'String' + } + }, + encryption: { + required: false, + serialized_name: 'encryption', + type: { + name: 'String' + } + }, + o_sdetails: { + required: false, + serialized_name: 'oSDetails', + type: { + name: 'Composite', + class_name: 'OSDetails' + } + }, + source_vm_ramsize_in_mb: { + required: false, + serialized_name: 'sourceVmRAMSizeInMB', + type: { + name: 'Number' + } + }, + source_vm_cpucount: { + required: false, + serialized_name: 'sourceVmCPUCount', + type: { + name: 'Number' + } + }, + enable_rdpon_target_option: { + required: false, + serialized_name: 'enableRDPOnTargetOption', + type: { + name: 'String' + } + }, + recovery_azure_resource_group_id: { + required: false, + serialized_name: 'recoveryAzureResourceGroupId', + type: { + name: 'String' + } + }, + recovery_availability_set_id: { + required: false, + serialized_name: 'recoveryAvailabilitySetId', + type: { + name: 'String' + } + }, + use_managed_disks: { + required: false, + serialized_name: 'useManagedDisks', + type: { + name: 'String' + } + }, + license_type: { + required: false, + serialized_name: 'licenseType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_reprotect_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_reprotect_input.rb new file mode 100644 index 0000000000..4f56e13c50 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_reprotect_input.rb @@ -0,0 +1,109 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure specific reprotect input. + # + class HyperVReplicaAzureReprotectInput < ReverseReplicationProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [String] The Hyper-V host Vm Id. + attr_accessor :hv_host_vm_id + + # @return [String] The Vm Name. + attr_accessor :vm_name + + # @return [String] The OS type associated with vm. + attr_accessor :os_type + + # @return [String] The OS disk VHD id associated with vm. + attr_accessor :v_hdid + + # @return [String] The storage account name. + attr_accessor :storage_account_id + + # @return [String] The storage account to be used for logging during + # replication. + attr_accessor :log_storage_account_id + + + # + # Mapper for HyperVReplicaAzureReprotectInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureReprotectInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + hv_host_vm_id: { + required: false, + serialized_name: 'hvHostVmId', + type: { + name: 'String' + } + }, + vm_name: { + required: false, + serialized_name: 'vmName', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + v_hdid: { + required: false, + serialized_name: 'vHDId', + type: { + name: 'String' + } + }, + storage_account_id: { + required: false, + serialized_name: 'storageAccountId', + type: { + name: 'String' + } + }, + log_storage_account_id: { + required: false, + serialized_name: 'logStorageAccountId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_rp_recovery_point_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_rp_recovery_point_type.rb new file mode 100644 index 0000000000..e71ba2d7bb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_rp_recovery_point_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for HyperVReplicaAzureRpRecoveryPointType + # + module HyperVReplicaAzureRpRecoveryPointType + Latest = "Latest" + LatestApplicationConsistent = "LatestApplicationConsistent" + LatestProcessed = "LatestProcessed" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_update_replication_protected_item_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_update_replication_protected_item_input.rb new file mode 100644 index 0000000000..c91576fc2f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_update_replication_protected_item_input.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # HyperV replica Azure input to update replication protected item. + # + class HyperVReplicaAzureUpdateReplicationProtectedItemInput < UpdateReplicationProtectedItemProviderInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [String] The recovery Azure resource group Id for classic + # deployment. + attr_accessor :recovery_azure_v1resource_group_id + + # @return [String] The recovery Azure resource group Id for resource + # manager deployment. + attr_accessor :recovery_azure_v2resource_group_id + + # @return [String] A value indicating whether managed disks should be + # used during failover. + attr_accessor :use_managed_disks + + + # + # Mapper for HyperVReplicaAzureUpdateReplicationProtectedItemInput class + # as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'HyperVReplicaAzureUpdateReplicationProtectedItemInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_azure_v1resource_group_id: { + required: false, + serialized_name: 'recoveryAzureV1ResourceGroupId', + type: { + name: 'String' + } + }, + recovery_azure_v2resource_group_id: { + required: false, + serialized_name: 'recoveryAzureV2ResourceGroupId', + type: { + name: 'String' + } + }, + use_managed_disks: { + required: false, + serialized_name: 'useManagedDisks', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_event_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_event_details.rb new file mode 100644 index 0000000000..4340cd5217 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_event_details.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Abstract model class for event details of a HyperVReplica E2E event. + # + class HyperVReplicaBaseEventDetails < EventProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaBaseEventDetails" + end + + attr_accessor :instanceType + + # @return [String] The container friendly name. + attr_accessor :container_name + + # @return [String] The fabric friendly name. + attr_accessor :fabric_name + + # @return [String] The remote container name. + attr_accessor :remote_container_name + + # @return [String] The remote fabric name. + attr_accessor :remote_fabric_name + + + # + # Mapper for HyperVReplicaBaseEventDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaBaseEventDetails', + type: { + name: 'Composite', + class_name: 'HyperVReplicaBaseEventDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + container_name: { + required: false, + serialized_name: 'containerName', + type: { + name: 'String' + } + }, + fabric_name: { + required: false, + serialized_name: 'fabricName', + type: { + name: 'String' + } + }, + remote_container_name: { + required: false, + serialized_name: 'remoteContainerName', + type: { + name: 'String' + } + }, + remote_fabric_name: { + required: false, + serialized_name: 'remoteFabricName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_policy_details.rb new file mode 100644 index 0000000000..76928280bb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_policy_details.rb @@ -0,0 +1,151 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Base class for HyperVReplica policy details. + # + class HyperVReplicaBasePolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaBasePolicyDetails" + end + + attr_accessor :instanceType + + # @return [Integer] A value indicating the number of recovery points. + attr_accessor :recovery_points + + # @return [Integer] A value indicating the application consistent + # frequency. + attr_accessor :application_consistent_snapshot_frequency_in_hours + + # @return [String] A value indicating whether compression has to be + # enabled. + attr_accessor :compression + + # @return [String] A value indicating whether IR is online. + attr_accessor :initial_replication_method + + # @return [String] A value indicating the online IR start time. + attr_accessor :online_replication_start_time + + # @return [String] A value indicating the offline IR import path. + attr_accessor :offline_replication_import_path + + # @return [String] A value indicating the offline IR export path. + attr_accessor :offline_replication_export_path + + # @return [Integer] A value indicating the recovery HTTPS port. + attr_accessor :replication_port + + # @return [Integer] A value indicating the authentication type. + attr_accessor :allowed_authentication_type + + # @return [String] A value indicating whether the VM has to be auto + # deleted. Supported Values: String.Empty, None, OnRecoveryCloud + attr_accessor :replica_deletion_option + + + # + # Mapper for HyperVReplicaBasePolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaBasePolicyDetails', + type: { + name: 'Composite', + class_name: 'HyperVReplicaBasePolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_points: { + required: false, + serialized_name: 'recoveryPoints', + type: { + name: 'Number' + } + }, + application_consistent_snapshot_frequency_in_hours: { + required: false, + serialized_name: 'applicationConsistentSnapshotFrequencyInHours', + type: { + name: 'Number' + } + }, + compression: { + required: false, + serialized_name: 'compression', + type: { + name: 'String' + } + }, + initial_replication_method: { + required: false, + serialized_name: 'initialReplicationMethod', + type: { + name: 'String' + } + }, + online_replication_start_time: { + required: false, + serialized_name: 'onlineReplicationStartTime', + type: { + name: 'String' + } + }, + offline_replication_import_path: { + required: false, + serialized_name: 'offlineReplicationImportPath', + type: { + name: 'String' + } + }, + offline_replication_export_path: { + required: false, + serialized_name: 'offlineReplicationExportPath', + type: { + name: 'String' + } + }, + replication_port: { + required: false, + serialized_name: 'replicationPort', + type: { + name: 'Number' + } + }, + allowed_authentication_type: { + required: false, + serialized_name: 'allowedAuthenticationType', + type: { + name: 'Number' + } + }, + replica_deletion_option: { + required: false, + serialized_name: 'replicaDeletionOption', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_replication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_replication_details.rb new file mode 100644 index 0000000000..5d61109bc2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_replication_details.rb @@ -0,0 +1,135 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper V replica provider specific settings base class. + # + class HyperVReplicaBaseReplicationDetails < ReplicationProviderSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaBaseReplicationDetails" + end + + attr_accessor :instanceType + + # @return [DateTime] The Last replication time. + attr_accessor :last_replicated_time + + # @return [Array] The PE Network details. + attr_accessor :vm_nics + + # @return [String] The virtual machine Id. + attr_accessor :vm_id + + # @return [String] The protection state for the vm. + attr_accessor :vm_protection_state + + # @return [String] The protection state description for the vm. + attr_accessor :vm_protection_state_description + + # @return [InitialReplicationDetails] Initial replication details. + attr_accessor :initial_replication_details + + # @return [Array] VM disk details. + attr_accessor :v_mdisk_details + + + # + # Mapper for HyperVReplicaBaseReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaBaseReplicationDetails', + type: { + name: 'Composite', + class_name: 'HyperVReplicaBaseReplicationDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + last_replicated_time: { + required: false, + serialized_name: 'lastReplicatedTime', + type: { + name: 'DateTime' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicDetails' + } + } + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + vm_protection_state: { + required: false, + serialized_name: 'vmProtectionState', + type: { + name: 'String' + } + }, + vm_protection_state_description: { + required: false, + serialized_name: 'vmProtectionStateDescription', + type: { + name: 'String' + } + }, + initial_replication_details: { + required: false, + serialized_name: 'initialReplicationDetails', + type: { + name: 'Composite', + class_name: 'InitialReplicationDetails' + } + }, + v_mdisk_details: { + required: false, + serialized_name: 'vMDiskDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'DiskDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_details.rb new file mode 100644 index 0000000000..d31e6d2508 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_details.rb @@ -0,0 +1,161 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper-V Replica Blue specific protection profile details. + # + class HyperVReplicaBluePolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012R2" + end + + attr_accessor :instanceType + + # @return [Integer] A value indicating the replication interval. + attr_accessor :replication_frequency_in_seconds + + # @return [Integer] A value indicating the number of recovery points. + attr_accessor :recovery_points + + # @return [Integer] A value indicating the application consistent + # frequency. + attr_accessor :application_consistent_snapshot_frequency_in_hours + + # @return [String] A value indicating whether compression has to be + # enabled. + attr_accessor :compression + + # @return [String] A value indicating whether IR is online. + attr_accessor :initial_replication_method + + # @return [String] A value indicating the online IR start time. + attr_accessor :online_replication_start_time + + # @return [String] A value indicating the offline IR import path. + attr_accessor :offline_replication_import_path + + # @return [String] A value indicating the offline IR export path. + attr_accessor :offline_replication_export_path + + # @return [Integer] A value indicating the recovery HTTPS port. + attr_accessor :replication_port + + # @return [Integer] A value indicating the authentication type. + attr_accessor :allowed_authentication_type + + # @return [String] A value indicating whether the VM has to be auto + # deleted. Supported Values: String.Empty, None, OnRecoveryCloud + attr_accessor :replica_deletion_option + + + # + # Mapper for HyperVReplicaBluePolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012R2', + type: { + name: 'Composite', + class_name: 'HyperVReplicaBluePolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + replication_frequency_in_seconds: { + required: false, + serialized_name: 'replicationFrequencyInSeconds', + type: { + name: 'Number' + } + }, + recovery_points: { + required: false, + serialized_name: 'recoveryPoints', + type: { + name: 'Number' + } + }, + application_consistent_snapshot_frequency_in_hours: { + required: false, + serialized_name: 'applicationConsistentSnapshotFrequencyInHours', + type: { + name: 'Number' + } + }, + compression: { + required: false, + serialized_name: 'compression', + type: { + name: 'String' + } + }, + initial_replication_method: { + required: false, + serialized_name: 'initialReplicationMethod', + type: { + name: 'String' + } + }, + online_replication_start_time: { + required: false, + serialized_name: 'onlineReplicationStartTime', + type: { + name: 'String' + } + }, + offline_replication_import_path: { + required: false, + serialized_name: 'offlineReplicationImportPath', + type: { + name: 'String' + } + }, + offline_replication_export_path: { + required: false, + serialized_name: 'offlineReplicationExportPath', + type: { + name: 'String' + } + }, + replication_port: { + required: false, + serialized_name: 'replicationPort', + type: { + name: 'Number' + } + }, + allowed_authentication_type: { + required: false, + serialized_name: 'allowedAuthenticationType', + type: { + name: 'Number' + } + }, + replica_deletion_option: { + required: false, + serialized_name: 'replicaDeletionOption', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_input.rb new file mode 100644 index 0000000000..a3ae750385 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_input.rb @@ -0,0 +1,161 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # HyperV Replica Blue policy input. + # + class HyperVReplicaBluePolicyInput < PolicyProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012R2" + end + + attr_accessor :instanceType + + # @return [Integer] A value indicating the replication interval. + attr_accessor :replication_frequency_in_seconds + + # @return [Integer] A value indicating the number of recovery points. + attr_accessor :recovery_points + + # @return [Integer] A value indicating the application consistent + # frequency. + attr_accessor :application_consistent_snapshot_frequency_in_hours + + # @return [String] A value indicating whether compression has to be + # enabled. + attr_accessor :compression + + # @return [String] A value indicating whether IR is online. + attr_accessor :initial_replication_method + + # @return [String] A value indicating the online IR start time. + attr_accessor :online_replication_start_time + + # @return [String] A value indicating the offline IR import path. + attr_accessor :offline_replication_import_path + + # @return [String] A value indicating the offline IR export path. + attr_accessor :offline_replication_export_path + + # @return [Integer] A value indicating the recovery HTTPS port. + attr_accessor :replication_port + + # @return [Integer] A value indicating the authentication type. + attr_accessor :allowed_authentication_type + + # @return [String] A value indicating whether the VM has to be auto + # deleted. + attr_accessor :replica_deletion + + + # + # Mapper for HyperVReplicaBluePolicyInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012R2', + type: { + name: 'Composite', + class_name: 'HyperVReplicaBluePolicyInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + replication_frequency_in_seconds: { + required: false, + serialized_name: 'replicationFrequencyInSeconds', + type: { + name: 'Number' + } + }, + recovery_points: { + required: false, + serialized_name: 'recoveryPoints', + type: { + name: 'Number' + } + }, + application_consistent_snapshot_frequency_in_hours: { + required: false, + serialized_name: 'applicationConsistentSnapshotFrequencyInHours', + type: { + name: 'Number' + } + }, + compression: { + required: false, + serialized_name: 'compression', + type: { + name: 'String' + } + }, + initial_replication_method: { + required: false, + serialized_name: 'initialReplicationMethod', + type: { + name: 'String' + } + }, + online_replication_start_time: { + required: false, + serialized_name: 'onlineReplicationStartTime', + type: { + name: 'String' + } + }, + offline_replication_import_path: { + required: false, + serialized_name: 'offlineReplicationImportPath', + type: { + name: 'String' + } + }, + offline_replication_export_path: { + required: false, + serialized_name: 'offlineReplicationExportPath', + type: { + name: 'String' + } + }, + replication_port: { + required: false, + serialized_name: 'replicationPort', + type: { + name: 'Number' + } + }, + allowed_authentication_type: { + required: false, + serialized_name: 'allowedAuthenticationType', + type: { + name: 'Number' + } + }, + replica_deletion: { + required: false, + serialized_name: 'replicaDeletion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_replication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_replication_details.rb new file mode 100644 index 0000000000..0644e6e002 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_replication_details.rb @@ -0,0 +1,135 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # HyperV replica 2012 R2 (Blue) replication details. + # + class HyperVReplicaBlueReplicationDetails < ReplicationProviderSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012R2" + end + + attr_accessor :instanceType + + # @return [DateTime] The Last replication time. + attr_accessor :last_replicated_time + + # @return [Array] The PE Network details. + attr_accessor :vm_nics + + # @return [String] The virtual machine Id. + attr_accessor :vm_id + + # @return [String] The protection state for the vm. + attr_accessor :vm_protection_state + + # @return [String] The protection state description for the vm. + attr_accessor :vm_protection_state_description + + # @return [InitialReplicationDetails] Initial replication details. + attr_accessor :initial_replication_details + + # @return [Array] VM disk details. + attr_accessor :v_mdisk_details + + + # + # Mapper for HyperVReplicaBlueReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012R2', + type: { + name: 'Composite', + class_name: 'HyperVReplicaBlueReplicationDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + last_replicated_time: { + required: false, + serialized_name: 'lastReplicatedTime', + type: { + name: 'DateTime' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicDetails' + } + } + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + vm_protection_state: { + required: false, + serialized_name: 'vmProtectionState', + type: { + name: 'String' + } + }, + vm_protection_state_description: { + required: false, + serialized_name: 'vmProtectionStateDescription', + type: { + name: 'String' + } + }, + initial_replication_details: { + required: false, + serialized_name: 'initialReplicationDetails', + type: { + name: 'Composite', + class_name: 'InitialReplicationDetails' + } + }, + v_mdisk_details: { + required: false, + serialized_name: 'vMDiskDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'DiskDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_details.rb new file mode 100644 index 0000000000..36bf913e7b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_details.rb @@ -0,0 +1,151 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper-V Replica Blue specific protection profile details. + # + class HyperVReplicaPolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012" + end + + attr_accessor :instanceType + + # @return [Integer] A value indicating the number of recovery points. + attr_accessor :recovery_points + + # @return [Integer] A value indicating the application consistent + # frequency. + attr_accessor :application_consistent_snapshot_frequency_in_hours + + # @return [String] A value indicating whether compression has to be + # enabled. + attr_accessor :compression + + # @return [String] A value indicating whether IR is online. + attr_accessor :initial_replication_method + + # @return [String] A value indicating the online IR start time. + attr_accessor :online_replication_start_time + + # @return [String] A value indicating the offline IR import path. + attr_accessor :offline_replication_import_path + + # @return [String] A value indicating the offline IR export path. + attr_accessor :offline_replication_export_path + + # @return [Integer] A value indicating the recovery HTTPS port. + attr_accessor :replication_port + + # @return [Integer] A value indicating the authentication type. + attr_accessor :allowed_authentication_type + + # @return [String] A value indicating whether the VM has to be auto + # deleted. Supported Values: String.Empty, None, OnRecoveryCloud + attr_accessor :replica_deletion_option + + + # + # Mapper for HyperVReplicaPolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012', + type: { + name: 'Composite', + class_name: 'HyperVReplicaPolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_points: { + required: false, + serialized_name: 'recoveryPoints', + type: { + name: 'Number' + } + }, + application_consistent_snapshot_frequency_in_hours: { + required: false, + serialized_name: 'applicationConsistentSnapshotFrequencyInHours', + type: { + name: 'Number' + } + }, + compression: { + required: false, + serialized_name: 'compression', + type: { + name: 'String' + } + }, + initial_replication_method: { + required: false, + serialized_name: 'initialReplicationMethod', + type: { + name: 'String' + } + }, + online_replication_start_time: { + required: false, + serialized_name: 'onlineReplicationStartTime', + type: { + name: 'String' + } + }, + offline_replication_import_path: { + required: false, + serialized_name: 'offlineReplicationImportPath', + type: { + name: 'String' + } + }, + offline_replication_export_path: { + required: false, + serialized_name: 'offlineReplicationExportPath', + type: { + name: 'String' + } + }, + replication_port: { + required: false, + serialized_name: 'replicationPort', + type: { + name: 'Number' + } + }, + allowed_authentication_type: { + required: false, + serialized_name: 'allowedAuthenticationType', + type: { + name: 'Number' + } + }, + replica_deletion_option: { + required: false, + serialized_name: 'replicaDeletionOption', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_input.rb new file mode 100644 index 0000000000..17519435f6 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_input.rb @@ -0,0 +1,151 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper-V Replica specific protection profile Input. + # + class HyperVReplicaPolicyInput < PolicyProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012" + end + + attr_accessor :instanceType + + # @return [Integer] A value indicating the number of recovery points. + attr_accessor :recovery_points + + # @return [Integer] A value indicating the application consistent + # frequency. + attr_accessor :application_consistent_snapshot_frequency_in_hours + + # @return [String] A value indicating whether compression has to be + # enabled. + attr_accessor :compression + + # @return [String] A value indicating whether IR is online. + attr_accessor :initial_replication_method + + # @return [String] A value indicating the online IR start time. + attr_accessor :online_replication_start_time + + # @return [String] A value indicating the offline IR import path. + attr_accessor :offline_replication_import_path + + # @return [String] A value indicating the offline IR export path. + attr_accessor :offline_replication_export_path + + # @return [Integer] A value indicating the recovery HTTPS port. + attr_accessor :replication_port + + # @return [Integer] A value indicating the authentication type. + attr_accessor :allowed_authentication_type + + # @return [String] A value indicating whether the VM has to be auto + # deleted. + attr_accessor :replica_deletion + + + # + # Mapper for HyperVReplicaPolicyInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012', + type: { + name: 'Composite', + class_name: 'HyperVReplicaPolicyInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_points: { + required: false, + serialized_name: 'recoveryPoints', + type: { + name: 'Number' + } + }, + application_consistent_snapshot_frequency_in_hours: { + required: false, + serialized_name: 'applicationConsistentSnapshotFrequencyInHours', + type: { + name: 'Number' + } + }, + compression: { + required: false, + serialized_name: 'compression', + type: { + name: 'String' + } + }, + initial_replication_method: { + required: false, + serialized_name: 'initialReplicationMethod', + type: { + name: 'String' + } + }, + online_replication_start_time: { + required: false, + serialized_name: 'onlineReplicationStartTime', + type: { + name: 'String' + } + }, + offline_replication_import_path: { + required: false, + serialized_name: 'offlineReplicationImportPath', + type: { + name: 'String' + } + }, + offline_replication_export_path: { + required: false, + serialized_name: 'offlineReplicationExportPath', + type: { + name: 'String' + } + }, + replication_port: { + required: false, + serialized_name: 'replicationPort', + type: { + name: 'Number' + } + }, + allowed_authentication_type: { + required: false, + serialized_name: 'allowedAuthenticationType', + type: { + name: 'Number' + } + }, + replica_deletion: { + required: false, + serialized_name: 'replicaDeletion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_replication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_replication_details.rb new file mode 100644 index 0000000000..62a318b76a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_replication_details.rb @@ -0,0 +1,135 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # HyperV replica 2012 replication details. + # + class HyperVReplicaReplicationDetails < ReplicationProviderSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplica2012" + end + + attr_accessor :instanceType + + # @return [DateTime] The Last replication time. + attr_accessor :last_replicated_time + + # @return [Array] The PE Network details. + attr_accessor :vm_nics + + # @return [String] The virtual machine Id. + attr_accessor :vm_id + + # @return [String] The protection state for the vm. + attr_accessor :vm_protection_state + + # @return [String] The protection state description for the vm. + attr_accessor :vm_protection_state_description + + # @return [InitialReplicationDetails] Initial replication details. + attr_accessor :initial_replication_details + + # @return [Array] VM disk details. + attr_accessor :v_mdisk_details + + + # + # Mapper for HyperVReplicaReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplica2012', + type: { + name: 'Composite', + class_name: 'HyperVReplicaReplicationDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + last_replicated_time: { + required: false, + serialized_name: 'lastReplicatedTime', + type: { + name: 'DateTime' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicDetails' + } + } + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + vm_protection_state: { + required: false, + serialized_name: 'vmProtectionState', + type: { + name: 'String' + } + }, + vm_protection_state_description: { + required: false, + serialized_name: 'vmProtectionStateDescription', + type: { + name: 'String' + } + }, + initial_replication_details: { + required: false, + serialized_name: 'initialReplicationDetails', + type: { + name: 'Composite', + class_name: 'InitialReplicationDetails' + } + }, + v_mdisk_details: { + required: false, + serialized_name: 'vMDiskDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'DiskDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vsite_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vsite_details.rb new file mode 100644 index 0000000000..c085f6220e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vsite_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # HyperVSite fabric specific details. + # + class HyperVSiteDetails < FabricSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "HyperVSite" + end + + attr_accessor :instanceType + + + # + # Mapper for HyperVSiteDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVSite', + type: { + name: 'Composite', + class_name: 'HyperVSiteDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vvirtual_machine_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vvirtual_machine_details.rb new file mode 100644 index 0000000000..25e4b116f0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vvirtual_machine_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper V replica provider specific settings + # + class HyperVVirtualMachineDetails < ConfigurationSettings + + include MsRestAzure + + + def initialize + @instanceType = "HyperVVirtualMachine" + end + + attr_accessor :instanceType + + # @return [String] The source id of the object. + attr_accessor :source_item_id + + # @return [String] The id of the object in fabric. + attr_accessor :generation + + # @return [OSDetails] The Last replication time. + attr_accessor :os_details + + # @return [Array] The Last successful failover time. + attr_accessor :disk_details + + + # + # Mapper for HyperVVirtualMachineDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVVirtualMachine', + type: { + name: 'Composite', + class_name: 'HyperVVirtualMachineDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + source_item_id: { + required: false, + serialized_name: 'sourceItemId', + type: { + name: 'String' + } + }, + generation: { + required: false, + serialized_name: 'generation', + type: { + name: 'String' + } + }, + os_details: { + required: false, + serialized_name: 'osDetails', + type: { + name: 'Composite', + class_name: 'OSDetails' + } + }, + disk_details: { + required: false, + serialized_name: 'diskDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'DiskDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_information.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_information.rb new file mode 100644 index 0000000000..f5eafe9b5d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_information.rb @@ -0,0 +1,117 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Identity details. + # + class IdentityInformation + + include MsRestAzure + + # @return [IdentityProviderType] The identity provider type. Value is the + # ToString() of a IdentityProviderType value. Possible values include: + # 'RecoveryServicesActiveDirectory', 'CustomerActiveDirectory' + attr_accessor :identity_provider_type + + # @return [String] The tenant Id for the service principal with which the + # on-premise management/data plane components would communicate with our + # Azure services. + attr_accessor :tenant_id + + # @return [String] The application/client Id for the service principal + # with which the on-premise management/data plane components would + # communicate with our Azure services. + attr_accessor :application_id + + # @return [String] The object Id of the service principal with which the + # on-premise management/data plane components would communicate with our + # Azure services. + attr_accessor :object_id + + # @return [String] The intended Audience of the service principal with + # which the on-premise management/data plane components would communicate + # with our Azure services. + attr_accessor :audience + + # @return [String] The base authority for Azure Active Directory + # authentication. + attr_accessor :aad_authority + + # @return [String] The certificate thumbprint. Applicable only if + # IdentityProviderType is RecoveryServicesActiveDirectory. + attr_accessor :certificate_thumbprint + + + # + # Mapper for IdentityInformation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'IdentityInformation', + type: { + name: 'Composite', + class_name: 'IdentityInformation', + model_properties: { + identity_provider_type: { + required: false, + serialized_name: 'identityProviderType', + type: { + name: 'Enum', + module: 'IdentityProviderType' + } + }, + tenant_id: { + required: false, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + application_id: { + required: false, + serialized_name: 'applicationId', + type: { + name: 'String' + } + }, + object_id: { + required: false, + serialized_name: 'objectId', + type: { + name: 'String' + } + }, + audience: { + required: false, + serialized_name: 'audience', + type: { + name: 'String' + } + }, + aad_authority: { + required: false, + serialized_name: 'aadAuthority', + type: { + name: 'String' + } + }, + certificate_thumbprint: { + required: false, + serialized_name: 'certificateThumbprint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_provider_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_provider_type.rb new file mode 100644 index 0000000000..069bc79d3d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_provider_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for IdentityProviderType + # + module IdentityProviderType + RecoveryServicesActiveDirectory = "RecoveryServicesActiveDirectory" + CustomerActiveDirectory = "CustomerActiveDirectory" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_details.rb new file mode 100644 index 0000000000..80ad705fb7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # The details of the InMage agent. + # + class InMageAgentDetails + + include MsRestAzure + + # @return [String] The agent version. + attr_accessor :agent_version + + # @return [String] A value indicating whether installed agent needs to be + # updated. + attr_accessor :agent_update_status + + # @return [String] A value indicating whether reboot is required after + # update is applied. + attr_accessor :post_update_reboot_status + + + # + # Mapper for InMageAgentDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAgentDetails', + type: { + name: 'Composite', + class_name: 'InMageAgentDetails', + model_properties: { + agent_version: { + required: false, + serialized_name: 'agentVersion', + type: { + name: 'String' + } + }, + agent_update_status: { + required: false, + serialized_name: 'agentUpdateStatus', + type: { + name: 'String' + } + }, + post_update_reboot_status: { + required: false, + serialized_name: 'postUpdateRebootStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2apply_recovery_point_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2apply_recovery_point_input.rb new file mode 100644 index 0000000000..0cf68e8ee9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2apply_recovery_point_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # ApplyRecoveryPoint input specific to InMageAzureV2 provider. + # + class InMageAzureV2ApplyRecoveryPointInput < ApplyRecoveryPointProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] The vault location where the recovery Vm resides. + attr_accessor :vault_location + + + # + # Mapper for InMageAzureV2ApplyRecoveryPointInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2ApplyRecoveryPointInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vault_location: { + required: false, + serialized_name: 'vaultLocation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2enable_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2enable_protection_input.rb new file mode 100644 index 0000000000..2cd8a51a11 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2enable_protection_input.rb @@ -0,0 +1,211 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMware Azure specific enable protection input. + # + class InMageAzureV2EnableProtectionInput < EnableProtectionProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] The Master target Id. + attr_accessor :master_target_id + + # @return [String] The Process Server Id. + attr_accessor :process_server_id + + # @return [String] The storage account name. + attr_accessor :storage_account_id + + # @return [String] The CS account Id. + attr_accessor :run_as_account_id + + # @return [String] The multi vm group Id. + attr_accessor :multi_vm_group_id + + # @return [String] The multi vm group name. + attr_accessor :multi_vm_group_name + + # @return [Array] The disks to include list. + attr_accessor :disks_to_include + + # @return [String] The selected target Azure network Id. + attr_accessor :target_azure_network_id + + # @return [String] The selected target Azure subnet Id. + attr_accessor :target_azure_subnet_id + + # @return [String] The selected option to enable RDP\SSH on target vm + # after failover. String value of + # {SrsDataContract.EnableRDPOnTargetOption} enum. + attr_accessor :enable_rdpon_target_option + + # @return [String] The target azure Vm Name. + attr_accessor :target_azure_vm_name + + # @return [String] The storage account to be used for logging during + # replication. + attr_accessor :log_storage_account_id + + # @return [String] The Id of the target resource group (for classic + # deployment) in which the failover VM is to be created. + attr_accessor :target_azure_v1resource_group_id + + # @return [String] The Id of the target resource group (for resource + # manager deployment) in which the failover VM is to be created. + attr_accessor :target_azure_v2resource_group_id + + # @return [String] A value indicating whether managed disks should be + # used during failover. + attr_accessor :use_managed_disks + + + # + # Mapper for InMageAzureV2EnableProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2EnableProtectionInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + master_target_id: { + required: false, + serialized_name: 'masterTargetId', + type: { + name: 'String' + } + }, + process_server_id: { + required: false, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + storage_account_id: { + required: true, + serialized_name: 'storageAccountId', + type: { + name: 'String' + } + }, + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + }, + multi_vm_group_id: { + required: false, + serialized_name: 'multiVmGroupId', + type: { + name: 'String' + } + }, + multi_vm_group_name: { + required: false, + serialized_name: 'multiVmGroupName', + type: { + name: 'String' + } + }, + disks_to_include: { + required: false, + serialized_name: 'disksToInclude', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + target_azure_network_id: { + required: false, + serialized_name: 'targetAzureNetworkId', + type: { + name: 'String' + } + }, + target_azure_subnet_id: { + required: false, + serialized_name: 'targetAzureSubnetId', + type: { + name: 'String' + } + }, + enable_rdpon_target_option: { + required: false, + serialized_name: 'enableRDPOnTargetOption', + type: { + name: 'String' + } + }, + target_azure_vm_name: { + required: false, + serialized_name: 'targetAzureVmName', + type: { + name: 'String' + } + }, + log_storage_account_id: { + required: false, + serialized_name: 'logStorageAccountId', + type: { + name: 'String' + } + }, + target_azure_v1resource_group_id: { + required: false, + serialized_name: 'targetAzureV1ResourceGroupId', + type: { + name: 'String' + } + }, + target_azure_v2resource_group_id: { + required: false, + serialized_name: 'targetAzureV2ResourceGroupId', + type: { + name: 'String' + } + }, + use_managed_disks: { + required: false, + serialized_name: 'useManagedDisks', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2event_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2event_details.rb new file mode 100644 index 0000000000..a371f6710a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2event_details.rb @@ -0,0 +1,119 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for event details of a VMwareAzureV2 event. + # + class InMageAzureV2EventDetails < EventProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] InMage Event type. Takes one of the values of + # {InMageDataContract.InMageMonitoringEventType}. + attr_accessor :event_type + + # @return [String] InMage Event Category. + attr_accessor :category + + # @return [String] InMage Event Component. + attr_accessor :component + + # @return [String] Corrective Action string for the event. + attr_accessor :corrective_action + + # @return [String] InMage Event Details. + attr_accessor :details + + # @return [String] InMage Event Summary. + attr_accessor :summary + + # @return [String] VMware Site name. + attr_accessor :site_name + + + # + # Mapper for InMageAzureV2EventDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2EventDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + event_type: { + required: false, + serialized_name: 'eventType', + type: { + name: 'String' + } + }, + category: { + required: false, + serialized_name: 'category', + type: { + name: 'String' + } + }, + component: { + required: false, + serialized_name: 'component', + type: { + name: 'String' + } + }, + corrective_action: { + required: false, + serialized_name: 'correctiveAction', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'details', + type: { + name: 'String' + } + }, + summary: { + required: false, + serialized_name: 'summary', + type: { + name: 'String' + } + }, + site_name: { + required: false, + serialized_name: 'siteName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2failover_provider_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2failover_provider_input.rb new file mode 100644 index 0000000000..6732c07ec5 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2failover_provider_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMageAzureV2 provider specific input for failover. + # + class InMageAzureV2FailoverProviderInput < ProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] Location of the vault. + attr_accessor :vault_location + + # @return [String] The recovery point id to be passed to failover to a + # particular recovery point. In case of latest recovery point, null + # should be passed. + attr_accessor :recovery_point_id + + + # + # Mapper for InMageAzureV2FailoverProviderInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2FailoverProviderInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vault_location: { + required: false, + serialized_name: 'vaultLocation', + type: { + name: 'String' + } + }, + recovery_point_id: { + required: false, + serialized_name: 'recoveryPointId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_details.rb new file mode 100644 index 0000000000..750ed2fecf --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage Azure v2 specific protection profile details. + # + class InMageAzureV2PolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [Integer] The crash consistent snapshot frequency in minutes. + attr_accessor :crash_consistent_frequency_in_minutes + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The app consistent snapshot frequency in minutes. + attr_accessor :app_consistent_frequency_in_minutes + + # @return [String] A value indicating whether multi-VM sync has to be + # enabled. + attr_accessor :multi_vm_sync_status + + + # + # Mapper for InMageAzureV2PolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2PolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + crash_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'crashConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: false, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_input.rb new file mode 100644 index 0000000000..57ed09aeb6 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMWare Azure specific protection profile Input. + # + class InMageAzureV2PolicyInput < PolicyProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The crash consistent snapshot frequency (in minutes). + attr_accessor :crash_consistent_frequency_in_minutes + + # @return [Integer] The app consistent snapshot frequency (in minutes). + attr_accessor :app_consistent_frequency_in_minutes + + # @return [SetMultiVmSyncStatus] A value indicating whether multi-VM sync + # has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible + # values include: 'Enable', 'Disable' + attr_accessor :multi_vm_sync_status + + + # + # Mapper for InMageAzureV2PolicyInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2PolicyInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + crash_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'crashConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: true, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'Enum', + module: 'SetMultiVmSyncStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2protected_disk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2protected_disk_details.rb new file mode 100644 index 0000000000..4dd0ff7156 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2protected_disk_details.rb @@ -0,0 +1,185 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMageAzureV2 protected disk details. + # + class InMageAzureV2ProtectedDiskDetails + + include MsRestAzure + + # @return [String] The disk id. + attr_accessor :disk_id + + # @return [String] The disk name. + attr_accessor :disk_name + + # @return [String] The protection stage. + attr_accessor :protection_stage + + # @return [String] The health error code for the disk. + attr_accessor :health_error_code + + # @return [Integer] The RPO in seconds. + attr_accessor :rpo_in_seconds + + # @return [String] A value indicating whether resync is required for this + # disk. + attr_accessor :resync_required + + # @return [Integer] The resync progress percentage. + attr_accessor :resync_progress_percentage + + # @return [Integer] The resync duration in seconds. + attr_accessor :resync_duration_in_seconds + + # @return [Integer] The disk capacity in bytes. + attr_accessor :disk_capacity_in_bytes + + # @return [Integer] The disk file system capacity in bytes. + attr_accessor :file_system_capacity_in_bytes + + # @return [Float] The source data transit in MB. + attr_accessor :source_data_in_mega_bytes + + # @return [Float] The PS data transit in MB. + attr_accessor :ps_data_in_mega_bytes + + # @return [Float] The target data transit in MB. + attr_accessor :target_data_in_mega_bytes + + # @return [String] A value indicating whether disk is resized. + attr_accessor :disk_resized + + # @return [DateTime] The last RPO calculated time. + attr_accessor :last_rpo_calculated_time + + + # + # Mapper for InMageAzureV2ProtectedDiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2ProtectedDiskDetails', + type: { + name: 'Composite', + class_name: 'InMageAzureV2ProtectedDiskDetails', + model_properties: { + disk_id: { + required: false, + serialized_name: 'diskId', + type: { + name: 'String' + } + }, + disk_name: { + required: false, + serialized_name: 'diskName', + type: { + name: 'String' + } + }, + protection_stage: { + required: false, + serialized_name: 'protectionStage', + type: { + name: 'String' + } + }, + health_error_code: { + required: false, + serialized_name: 'healthErrorCode', + type: { + name: 'String' + } + }, + rpo_in_seconds: { + required: false, + serialized_name: 'rpoInSeconds', + type: { + name: 'Number' + } + }, + resync_required: { + required: false, + serialized_name: 'resyncRequired', + type: { + name: 'String' + } + }, + resync_progress_percentage: { + required: false, + serialized_name: 'resyncProgressPercentage', + type: { + name: 'Number' + } + }, + resync_duration_in_seconds: { + required: false, + serialized_name: 'resyncDurationInSeconds', + type: { + name: 'Number' + } + }, + disk_capacity_in_bytes: { + required: false, + serialized_name: 'diskCapacityInBytes', + type: { + name: 'Number' + } + }, + file_system_capacity_in_bytes: { + required: false, + serialized_name: 'fileSystemCapacityInBytes', + type: { + name: 'Number' + } + }, + source_data_in_mega_bytes: { + required: false, + serialized_name: 'sourceDataInMegaBytes', + type: { + name: 'Double' + } + }, + ps_data_in_mega_bytes: { + required: false, + serialized_name: 'psDataInMegaBytes', + type: { + name: 'Double' + } + }, + target_data_in_mega_bytes: { + required: false, + serialized_name: 'targetDataInMegaBytes', + type: { + name: 'Double' + } + }, + disk_resized: { + required: false, + serialized_name: 'diskResized', + type: { + name: 'String' + } + }, + last_rpo_calculated_time: { + required: false, + serialized_name: 'lastRpoCalculatedTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2recovery_point_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2recovery_point_details.rb new file mode 100644 index 0000000000..79df23d361 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2recovery_point_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage Azure V2 provider specific recovery point details. + # + class InMageAzureV2RecoveryPointDetails < ProviderSpecificRecoveryPointDetails + + include MsRestAzure + + # @return [String] Gets the instance type. + attr_accessor :instance_type + + # @return [String] A value indicating whether the recovery point is multi + # VM consistent. + attr_accessor :is_multi_vm_sync_point + + + # + # Mapper for InMageAzureV2RecoveryPointDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2RecoveryPointDetails', + type: { + name: 'Composite', + class_name: 'InMageAzureV2RecoveryPointDetails', + model_properties: { + type: { + required: false, + read_only: true, + serialized_name: 'Type', + type: { + name: 'String' + } + }, + instance_type: { + required: false, + read_only: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + is_multi_vm_sync_point: { + required: false, + serialized_name: 'isMultiVmSyncPoint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2replication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2replication_details.rb new file mode 100644 index 0000000000..86f5c92b54 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2replication_details.rb @@ -0,0 +1,573 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMageAzureV2 provider specific settings + # + class InMageAzureV2ReplicationDetails < ReplicationProviderSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] The infrastructure VM Id. + attr_accessor :infrastructure_vm_id + + # @return [String] The vCenter infrastructure Id. + attr_accessor :v_center_infrastructure_id + + # @return [String] The protection stage. + attr_accessor :protection_stage + + # @return [String] The virtual machine Id. + attr_accessor :vm_id + + # @return [String] The protection state for the vm. + attr_accessor :vm_protection_state + + # @return [String] The protection state description for the vm. + attr_accessor :vm_protection_state_description + + # @return [Integer] The resync progress percentage. + attr_accessor :resync_progress_percentage + + # @return [Integer] The RPO in seconds. + attr_accessor :rpo_in_seconds + + # @return [Float] The compressed data change rate in MB. + attr_accessor :compressed_data_rate_in_mb + + # @return [Float] The uncompressed data change rate in MB. + attr_accessor :uncompressed_data_rate_in_mb + + # @return [String] The source IP address. + attr_accessor :ip_address + + # @return [String] The agent version. + attr_accessor :agent_version + + # @return [String] A value indicating whether installed agent needs to be + # updated. + attr_accessor :is_agent_update_required + + # @return [String] A value indicating whether the source server requires + # a restart after update. + attr_accessor :is_reboot_after_update_required + + # @return [DateTime] The last heartbeat received from the source server. + attr_accessor :last_heartbeat + + # @return [String] The process server Id. + attr_accessor :process_server_id + + # @return [String] The multi vm group Id. + attr_accessor :multi_vm_group_id + + # @return [String] The multi vm group name. + attr_accessor :multi_vm_group_name + + # @return [String] A value indicating whether multi vm sync is enabled or + # disabled. + attr_accessor :multi_vm_sync_status + + # @return [Array] The list of + # protected disks. + attr_accessor :protected_disks + + # @return [String] A value indicating whether any disk is resized for + # this VM. + attr_accessor :disk_resized + + # @return [String] The master target Id. + attr_accessor :master_target_id + + # @return [Integer] The CPU count of the VM on the primary side. + attr_accessor :source_vm_cpucount + + # @return [Integer] The RAM size of the VM on the primary side. + attr_accessor :source_vm_ramsize_in_mb + + # @return [String] The type of the OS on the VM. + attr_accessor :os_type + + # @return [String] The OS disk VHD name. + attr_accessor :vhd_name + + # @return [String] The id of the disk containing the OS. + attr_accessor :os_disk_id + + # @return [Array] Azure VM Disk details. + attr_accessor :azure_vmdisk_details + + # @return [String] Recovery Azure given name. + attr_accessor :recovery_azure_vmname + + # @return [String] The Recovery Azure VM size. + attr_accessor :recovery_azure_vmsize + + # @return [String] The recovery Azure storage account. + attr_accessor :recovery_azure_storage_account + + # @return [String] The ARM id of the log storage account used for + # replication. This will be set to null if no log storage account was + # provided during enable protection. + attr_accessor :recovery_azure_log_storage_account_id + + # @return [Array] The PE Network details. + attr_accessor :vm_nics + + # @return [String] The selected recovery azure network Id. + attr_accessor :selected_recovery_azure_network_id + + # @return [String] A value indicating the discovery type of the machine. + # Value can be vCenter or physical. + attr_accessor :discovery_type + + # @return [String] The selected option to enable RDP\SSH on target vm + # after failover. String value of + # {SrsDataContract.EnableRDPOnTargetOption} enum. + attr_accessor :enable_rdpon_target_option + + # @return [Array] The datastores of the on-premise machine. Value + # can be list of strings that contain datastore names. + attr_accessor :datastores + + # @return [String] The ARM Id of the target Azure VM. This value will be + # null until the VM is failed over. Only after failure it will be + # populated with the ARM Id of the Azure VM. + attr_accessor :target_vm_id + + # @return [String] The target resource group Id. + attr_accessor :recovery_azure_resource_group_id + + # @return [String] The recovery availability set Id. + attr_accessor :recovery_availability_set_id + + # @return [String] A value indicating whether managed disks should be + # used during failover. + attr_accessor :use_managed_disks + + # @return [String] License Type of the VM to be used. + attr_accessor :license_type + + # @return [Array] The validation errors of the on-premise + # machine Value can be list of validation errors. + attr_accessor :validation_errors + + # @return [DateTime] The last RPO calculated time. + attr_accessor :last_rpo_calculated_time + + # @return [DateTime] The last update time received from on-prem + # components. + attr_accessor :last_update_received_time + + # @return [String] The replica id of the protected item. + attr_accessor :replica_id + + # @return [String] The OS Version of the protected item. + attr_accessor :os_version + + + # + # Mapper for InMageAzureV2ReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2ReplicationDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + infrastructure_vm_id: { + required: false, + serialized_name: 'infrastructureVmId', + type: { + name: 'String' + } + }, + v_center_infrastructure_id: { + required: false, + serialized_name: 'vCenterInfrastructureId', + type: { + name: 'String' + } + }, + protection_stage: { + required: false, + serialized_name: 'protectionStage', + type: { + name: 'String' + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + vm_protection_state: { + required: false, + serialized_name: 'vmProtectionState', + type: { + name: 'String' + } + }, + vm_protection_state_description: { + required: false, + serialized_name: 'vmProtectionStateDescription', + type: { + name: 'String' + } + }, + resync_progress_percentage: { + required: false, + serialized_name: 'resyncProgressPercentage', + type: { + name: 'Number' + } + }, + rpo_in_seconds: { + required: false, + serialized_name: 'rpoInSeconds', + type: { + name: 'Number' + } + }, + compressed_data_rate_in_mb: { + required: false, + serialized_name: 'compressedDataRateInMB', + type: { + name: 'Double' + } + }, + uncompressed_data_rate_in_mb: { + required: false, + serialized_name: 'uncompressedDataRateInMB', + type: { + name: 'Double' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + agent_version: { + required: false, + serialized_name: 'agentVersion', + type: { + name: 'String' + } + }, + is_agent_update_required: { + required: false, + serialized_name: 'isAgentUpdateRequired', + type: { + name: 'String' + } + }, + is_reboot_after_update_required: { + required: false, + serialized_name: 'isRebootAfterUpdateRequired', + type: { + name: 'String' + } + }, + last_heartbeat: { + required: false, + serialized_name: 'lastHeartbeat', + type: { + name: 'DateTime' + } + }, + process_server_id: { + required: false, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + multi_vm_group_id: { + required: false, + serialized_name: 'multiVmGroupId', + type: { + name: 'String' + } + }, + multi_vm_group_name: { + required: false, + serialized_name: 'multiVmGroupName', + type: { + name: 'String' + } + }, + multi_vm_sync_status: { + required: false, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'String' + } + }, + protected_disks: { + required: false, + serialized_name: 'protectedDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InMageAzureV2ProtectedDiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'InMageAzureV2ProtectedDiskDetails' + } + } + } + }, + disk_resized: { + required: false, + serialized_name: 'diskResized', + type: { + name: 'String' + } + }, + master_target_id: { + required: false, + serialized_name: 'masterTargetId', + type: { + name: 'String' + } + }, + source_vm_cpucount: { + required: false, + serialized_name: 'sourceVmCPUCount', + type: { + name: 'Number' + } + }, + source_vm_ramsize_in_mb: { + required: false, + serialized_name: 'sourceVmRAMSizeInMB', + type: { + name: 'Number' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + vhd_name: { + required: false, + serialized_name: 'vhdName', + type: { + name: 'String' + } + }, + os_disk_id: { + required: false, + serialized_name: 'osDiskId', + type: { + name: 'String' + } + }, + azure_vmdisk_details: { + required: false, + serialized_name: 'azureVMDiskDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AzureVmDiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'AzureVmDiskDetails' + } + } + } + }, + recovery_azure_vmname: { + required: false, + serialized_name: 'recoveryAzureVMName', + type: { + name: 'String' + } + }, + recovery_azure_vmsize: { + required: false, + serialized_name: 'recoveryAzureVMSize', + type: { + name: 'String' + } + }, + recovery_azure_storage_account: { + required: false, + serialized_name: 'recoveryAzureStorageAccount', + type: { + name: 'String' + } + }, + recovery_azure_log_storage_account_id: { + required: false, + serialized_name: 'recoveryAzureLogStorageAccountId', + type: { + name: 'String' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicDetails' + } + } + } + }, + selected_recovery_azure_network_id: { + required: false, + serialized_name: 'selectedRecoveryAzureNetworkId', + type: { + name: 'String' + } + }, + discovery_type: { + required: false, + serialized_name: 'discoveryType', + type: { + name: 'String' + } + }, + enable_rdpon_target_option: { + required: false, + serialized_name: 'enableRDPOnTargetOption', + type: { + name: 'String' + } + }, + datastores: { + required: false, + serialized_name: 'datastores', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + target_vm_id: { + required: false, + serialized_name: 'targetVmId', + type: { + name: 'String' + } + }, + recovery_azure_resource_group_id: { + required: false, + serialized_name: 'recoveryAzureResourceGroupId', + type: { + name: 'String' + } + }, + recovery_availability_set_id: { + required: false, + serialized_name: 'recoveryAvailabilitySetId', + type: { + name: 'String' + } + }, + use_managed_disks: { + required: false, + serialized_name: 'useManagedDisks', + type: { + name: 'String' + } + }, + license_type: { + required: false, + serialized_name: 'licenseType', + type: { + name: 'String' + } + }, + validation_errors: { + required: false, + serialized_name: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + last_rpo_calculated_time: { + required: false, + serialized_name: 'lastRpoCalculatedTime', + type: { + name: 'DateTime' + } + }, + last_update_received_time: { + required: false, + serialized_name: 'lastUpdateReceivedTime', + type: { + name: 'DateTime' + } + }, + replica_id: { + required: false, + serialized_name: 'replicaId', + type: { + name: 'String' + } + }, + os_version: { + required: false, + serialized_name: 'osVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2reprotect_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2reprotect_input.rb new file mode 100644 index 0000000000..7f11123011 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2reprotect_input.rb @@ -0,0 +1,126 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMageAzureV2 specific provider input. + # + class InMageAzureV2ReprotectInput < ReverseReplicationProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] The Master target Id. + attr_accessor :master_target_id + + # @return [String] The Process Server Id. + attr_accessor :process_server_id + + # @return [String] The storage account id. + attr_accessor :storage_account_id + + # @return [String] The CS account Id. + attr_accessor :run_as_account_id + + # @return [String] The Policy Id. + attr_accessor :policy_id + + # @return [String] The storage account to be used for logging during + # replication. + attr_accessor :log_storage_account_id + + # @return [Array] The disks to include list. + attr_accessor :disks_to_include + + + # + # Mapper for InMageAzureV2ReprotectInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2ReprotectInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + master_target_id: { + required: false, + serialized_name: 'masterTargetId', + type: { + name: 'String' + } + }, + process_server_id: { + required: false, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + storage_account_id: { + required: false, + serialized_name: 'storageAccountId', + type: { + name: 'String' + } + }, + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + }, + policy_id: { + required: false, + serialized_name: 'policyId', + type: { + name: 'String' + } + }, + log_storage_account_id: { + required: false, + serialized_name: 'logStorageAccountId', + type: { + name: 'String' + } + }, + disks_to_include: { + required: false, + serialized_name: 'disksToInclude', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2update_replication_protected_item_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2update_replication_protected_item_input.rb new file mode 100644 index 0000000000..72b65326d2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2update_replication_protected_item_input.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage Azure V2 input to update replication protected item. + # + class InMageAzureV2UpdateReplicationProtectedItemInput < UpdateReplicationProtectedItemProviderInput + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] The recovery Azure resource group Id for classic + # deployment. + attr_accessor :recovery_azure_v1resource_group_id + + # @return [String] The recovery Azure resource group Id for resource + # manager deployment. + attr_accessor :recovery_azure_v2resource_group_id + + # @return [String] A value indicating whether managed disks should be + # used during failover. + attr_accessor :use_managed_disks + + + # + # Mapper for InMageAzureV2UpdateReplicationProtectedItemInput class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'InMageAzureV2UpdateReplicationProtectedItemInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_azure_v1resource_group_id: { + required: false, + serialized_name: 'recoveryAzureV1ResourceGroupId', + type: { + name: 'String' + } + }, + recovery_azure_v2resource_group_id: { + required: false, + serialized_name: 'recoveryAzureV2ResourceGroupId', + type: { + name: 'String' + } + }, + use_managed_disks: { + required: false, + serialized_name: 'useManagedDisks', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_base_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_base_policy_details.rb new file mode 100644 index 0000000000..a7c8341218 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_base_policy_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Base class for the policies of providers using InMage replication. + # + class InMageBasePolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "InMageBasePolicyDetails" + end + + attr_accessor :instanceType + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The app consistent snapshot frequency in minutes. + attr_accessor :app_consistent_frequency_in_minutes + + # @return [String] A value indicating whether multi-VM sync has to be + # enabled. + attr_accessor :multi_vm_sync_status + + + # + # Mapper for InMageBasePolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageBasePolicyDetails', + type: { + name: 'Composite', + class_name: 'InMageBasePolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: false, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disable_protection_provider_specific_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disable_protection_provider_specific_input.rb new file mode 100644 index 0000000000..6ad098f8e4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disable_protection_provider_specific_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage disable protection provider specific input. + # + class InMageDisableProtectionProviderSpecificInput < DisableProtectionProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [String] A value indicating whether the replica VM should be + # destroyed or retained. Values from Delete and Retain. + attr_accessor :replica_vm_deletion_status + + + # + # Mapper for InMageDisableProtectionProviderSpecificInput class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'InMageDisableProtectionProviderSpecificInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + replica_vm_deletion_status: { + required: false, + serialized_name: 'replicaVmDeletionStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_details.rb new file mode 100644 index 0000000000..5a915c3d9c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMware/Physical specific Disk Details + # + class InMageDiskDetails + + include MsRestAzure + + # @return [String] The disk Id. + attr_accessor :disk_id + + # @return [String] The disk name. + attr_accessor :disk_name + + # @return [String] The disk size in MB. + attr_accessor :disk_size_in_mb + + # @return [String] Whether disk is system disk or data disk. + attr_accessor :disk_type + + # @return [String] Whether disk is dynamic disk or basic disk. + attr_accessor :disk_configuration + + # @return [Array] Volumes of the disk. + attr_accessor :volume_list + + + # + # Mapper for InMageDiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageDiskDetails', + type: { + name: 'Composite', + class_name: 'InMageDiskDetails', + model_properties: { + disk_id: { + required: false, + serialized_name: 'diskId', + type: { + name: 'String' + } + }, + disk_name: { + required: false, + serialized_name: 'diskName', + type: { + name: 'String' + } + }, + disk_size_in_mb: { + required: false, + serialized_name: 'diskSizeInMB', + type: { + name: 'String' + } + }, + disk_type: { + required: false, + serialized_name: 'diskType', + type: { + name: 'String' + } + }, + disk_configuration: { + required: false, + serialized_name: 'diskConfiguration', + type: { + name: 'String' + } + }, + volume_list: { + required: false, + serialized_name: 'volumeList', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiskVolumeDetailsElementType', + type: { + name: 'Composite', + class_name: 'DiskVolumeDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_exclusion_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_exclusion_input.rb new file mode 100644 index 0000000000..4c9d215bd3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_exclusion_input.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # DiskExclusionInput when doing enable protection of virtual machine in + # InMage provider. + # + class InMageDiskExclusionInput + + include MsRestAzure + + # @return [Array] The volume label based + # option for disk exclusion. + attr_accessor :volume_options + + # @return [Array] The guest disk + # signature based option for disk exclusion. + attr_accessor :disk_signature_options + + + # + # Mapper for InMageDiskExclusionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageDiskExclusionInput', + type: { + name: 'Composite', + class_name: 'InMageDiskExclusionInput', + model_properties: { + volume_options: { + required: false, + serialized_name: 'volumeOptions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InMageVolumeExclusionOptionsElementType', + type: { + name: 'Composite', + class_name: 'InMageVolumeExclusionOptions' + } + } + } + }, + disk_signature_options: { + required: false, + serialized_name: 'diskSignatureOptions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InMageDiskSignatureExclusionOptionsElementType', + type: { + name: 'Composite', + class_name: 'InMageDiskSignatureExclusionOptions' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_signature_exclusion_options.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_signature_exclusion_options.rb new file mode 100644 index 0000000000..67edcab4a4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_signature_exclusion_options.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Guest disk signature based disk exclusion option when doing enable + # protection of virtual machine in InMage provider. + # + class InMageDiskSignatureExclusionOptions + + include MsRestAzure + + # @return [String] The guest signature of disk to be excluded from + # replication. + attr_accessor :disk_signature + + + # + # Mapper for InMageDiskSignatureExclusionOptions class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageDiskSignatureExclusionOptions', + type: { + name: 'Composite', + class_name: 'InMageDiskSignatureExclusionOptions', + model_properties: { + disk_signature: { + required: false, + serialized_name: 'diskSignature', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_enable_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_enable_protection_input.rb new file mode 100644 index 0000000000..264de330bf --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_enable_protection_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMware Azure specific enable protection input. + # + class InMageEnableProtectionInput < EnableProtectionProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [String] The Vm Name. + attr_accessor :vm_friendly_name + + # @return [String] The Master Target Id. + attr_accessor :master_target_id + + # @return [String] The Process Server Id. + attr_accessor :process_server_id + + # @return [String] The retention drive to use on the MT. + attr_accessor :retention_drive + + # @return [String] The CS account Id. + attr_accessor :run_as_account_id + + # @return [String] The multi vm group Id. + attr_accessor :multi_vm_group_id + + # @return [String] The multi vm group name. + attr_accessor :multi_vm_group_name + + # @return [String] The target datastore name. + attr_accessor :datastore_name + + # @return [InMageDiskExclusionInput] The enable disk exclusion input. + attr_accessor :disk_exclusion_input + + # @return [Array] The disks to include list. + attr_accessor :disks_to_include + + + # + # Mapper for InMageEnableProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'InMageEnableProtectionInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vm_friendly_name: { + required: false, + serialized_name: 'vmFriendlyName', + type: { + name: 'String' + } + }, + master_target_id: { + required: true, + serialized_name: 'masterTargetId', + type: { + name: 'String' + } + }, + process_server_id: { + required: true, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + retention_drive: { + required: true, + serialized_name: 'retentionDrive', + type: { + name: 'String' + } + }, + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + }, + multi_vm_group_id: { + required: true, + serialized_name: 'multiVmGroupId', + type: { + name: 'String' + } + }, + multi_vm_group_name: { + required: true, + serialized_name: 'multiVmGroupName', + type: { + name: 'String' + } + }, + datastore_name: { + required: false, + serialized_name: 'datastoreName', + type: { + name: 'String' + } + }, + disk_exclusion_input: { + required: false, + serialized_name: 'diskExclusionInput', + type: { + name: 'Composite', + class_name: 'InMageDiskExclusionInput' + } + }, + disks_to_include: { + required: false, + serialized_name: 'disksToInclude', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_failover_provider_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_failover_provider_input.rb new file mode 100644 index 0000000000..5b5873618e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_failover_provider_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific input for InMage failover. + # + class InMageFailoverProviderInput < ProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [RecoveryPointType] The recovery point type. Values from + # LatestTime, LatestTag or Custom. In the case of custom, the recovery + # point provided by RecoveryPointId will be used. In the other two cases, + # recovery point id will be ignored. Possible values include: + # 'LatestTime', 'LatestTag', 'Custom' + attr_accessor :recovery_point_type + + # @return [String] The recovery point id to be passed to failover to a + # particular recovery point. In case of latest recovery point, null + # should be passed. + attr_accessor :recovery_point_id + + + # + # Mapper for InMageFailoverProviderInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'InMageFailoverProviderInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_type: { + required: false, + serialized_name: 'recoveryPointType', + type: { + name: 'Enum', + module: 'RecoveryPointType' + } + }, + recovery_point_id: { + required: false, + serialized_name: 'recoveryPointId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_details.rb new file mode 100644 index 0000000000..06dbb5706f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage specific protection profile details. + # + class InMagePolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The app consistent snapshot frequency in minutes. + attr_accessor :app_consistent_frequency_in_minutes + + # @return [String] A value indicating whether multi-VM sync has to be + # enabled. + attr_accessor :multi_vm_sync_status + + + # + # Mapper for InMagePolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'InMagePolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: false, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_input.rb new file mode 100644 index 0000000000..546c0ede2e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMWare Azure specific protection profile Input. + # + class InMagePolicyInput < PolicyProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The app consistent snapshot frequency (in minutes). + attr_accessor :app_consistent_frequency_in_minutes + + # @return [SetMultiVmSyncStatus] A value indicating whether multi-VM sync + # has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible + # values include: 'Enable', 'Disable' + attr_accessor :multi_vm_sync_status + + + # + # Mapper for InMagePolicyInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'InMagePolicyInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: true, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'Enum', + module: 'SetMultiVmSyncStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_protected_disk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_protected_disk_details.rb new file mode 100644 index 0000000000..d4df31de82 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_protected_disk_details.rb @@ -0,0 +1,185 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage protected disk details. + # + class InMageProtectedDiskDetails + + include MsRestAzure + + # @return [String] The disk id. + attr_accessor :disk_id + + # @return [String] The disk name. + attr_accessor :disk_name + + # @return [String] The protection stage. + attr_accessor :protection_stage + + # @return [String] The health error code for the disk. + attr_accessor :health_error_code + + # @return [Integer] The RPO in seconds. + attr_accessor :rpo_in_seconds + + # @return [String] A value indicating whether resync is required for this + # disk. + attr_accessor :resync_required + + # @return [Integer] The resync progress percentage. + attr_accessor :resync_progress_percentage + + # @return [Integer] The resync duration in seconds. + attr_accessor :resync_duration_in_seconds + + # @return [Integer] The disk capacity in bytes. + attr_accessor :disk_capacity_in_bytes + + # @return [Integer] The file system capacity in bytes. + attr_accessor :file_system_capacity_in_bytes + + # @return [Float] The source data transit in MB. + attr_accessor :source_data_in_mb + + # @return [Float] The PS data transit in MB. + attr_accessor :ps_data_in_mb + + # @return [Float] The target data transit in MB. + attr_accessor :target_data_in_mb + + # @return [String] A value indicating whether disk is resized. + attr_accessor :disk_resized + + # @return [DateTime] The last RPO calculated time. + attr_accessor :last_rpo_calculated_time + + + # + # Mapper for InMageProtectedDiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageProtectedDiskDetails', + type: { + name: 'Composite', + class_name: 'InMageProtectedDiskDetails', + model_properties: { + disk_id: { + required: false, + serialized_name: 'diskId', + type: { + name: 'String' + } + }, + disk_name: { + required: false, + serialized_name: 'diskName', + type: { + name: 'String' + } + }, + protection_stage: { + required: false, + serialized_name: 'protectionStage', + type: { + name: 'String' + } + }, + health_error_code: { + required: false, + serialized_name: 'healthErrorCode', + type: { + name: 'String' + } + }, + rpo_in_seconds: { + required: false, + serialized_name: 'rpoInSeconds', + type: { + name: 'Number' + } + }, + resync_required: { + required: false, + serialized_name: 'resyncRequired', + type: { + name: 'String' + } + }, + resync_progress_percentage: { + required: false, + serialized_name: 'resyncProgressPercentage', + type: { + name: 'Number' + } + }, + resync_duration_in_seconds: { + required: false, + serialized_name: 'resyncDurationInSeconds', + type: { + name: 'Number' + } + }, + disk_capacity_in_bytes: { + required: false, + serialized_name: 'diskCapacityInBytes', + type: { + name: 'Number' + } + }, + file_system_capacity_in_bytes: { + required: false, + serialized_name: 'fileSystemCapacityInBytes', + type: { + name: 'Number' + } + }, + source_data_in_mb: { + required: false, + serialized_name: 'sourceDataInMB', + type: { + name: 'Double' + } + }, + ps_data_in_mb: { + required: false, + serialized_name: 'psDataInMB', + type: { + name: 'Double' + } + }, + target_data_in_mb: { + required: false, + serialized_name: 'targetDataInMB', + type: { + name: 'Double' + } + }, + disk_resized: { + required: false, + serialized_name: 'diskResized', + type: { + name: 'String' + } + }, + last_rpo_calculated_time: { + required: false, + serialized_name: 'lastRpoCalculatedTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_replication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_replication_details.rb new file mode 100644 index 0000000000..e51f0ac28c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_replication_details.rb @@ -0,0 +1,472 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMage provider specific settings + # + class InMageReplicationDetails < ReplicationProviderSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [String] The active location of the VM. If the VM is being + # protected from Azure, this field will take values from { Azure, OnPrem + # }. If the VM is being protected between two data-centers, this field + # will be OnPrem always. + attr_accessor :active_site_type + + # @return [Integer] The CPU count of the VM on the primary side. + attr_accessor :source_vm_cpucount + + # @return [Integer] The RAM size of the VM on the primary side. + attr_accessor :source_vm_ramsize_in_mb + + # @return [OSDiskDetails] The OS details. + attr_accessor :os_details + + # @return [String] The protection stage. + attr_accessor :protection_stage + + # @return [String] The virtual machine Id. + attr_accessor :vm_id + + # @return [String] The protection state for the vm. + attr_accessor :vm_protection_state + + # @return [String] The protection state description for the vm. + attr_accessor :vm_protection_state_description + + # @return [InitialReplicationDetails] The resync details of the machine + attr_accessor :resync_details + + # @return [DateTime] The retention window start time. + attr_accessor :retention_window_start + + # @return [DateTime] The retention window end time. + attr_accessor :retention_window_end + + # @return [Float] The compressed data change rate in MB. + attr_accessor :compressed_data_rate_in_mb + + # @return [Float] The uncompressed data change rate in MB. + attr_accessor :uncompressed_data_rate_in_mb + + # @return [Integer] The RPO in seconds. + attr_accessor :rpo_in_seconds + + # @return [Array] The list of protected + # disks. + attr_accessor :protected_disks + + # @return [String] The source IP address. + attr_accessor :ip_address + + # @return [DateTime] The last heartbeat received from the source server. + attr_accessor :last_heartbeat + + # @return [String] The process server Id. + attr_accessor :process_server_id + + # @return [String] The master target Id. + attr_accessor :master_target_id + + # @return [Hash{String => DateTime}] The collection of Consistency + # points. + attr_accessor :consistency_points + + # @return [String] A value indicating whether any disk is resized for + # this VM. + attr_accessor :disk_resized + + # @return [String] A value indicating whether the source server requires + # a restart after update. + attr_accessor :reboot_after_update_status + + # @return [String] The multi vm group Id, if any. + attr_accessor :multi_vm_group_id + + # @return [String] The multi vm group name, if any. + attr_accessor :multi_vm_group_name + + # @return [String] A value indicating whether the multi vm sync is + # enabled or disabled. + attr_accessor :multi_vm_sync_status + + # @return [InMageAgentDetails] The agent details. + attr_accessor :agent_details + + # @return [String] The vCenter infrastructure Id. + attr_accessor :v_center_infrastructure_id + + # @return [String] The infrastructure VM Id. + attr_accessor :infrastructure_vm_id + + # @return [Array] The PE Network details. + attr_accessor :vm_nics + + # @return [String] A value indicating the discovery type of the machine. + attr_accessor :discovery_type + + # @return [String] A value indicating the underlying Azure storage + # account. If the VM is not running in Azure, this value shall be set to + # null. + attr_accessor :azure_storage_account_id + + # @return [Array] The datastores of the on-premise machine Value + # can be list of strings that contain datastore names + attr_accessor :datastores + + # @return [Array] The validation errors of the on-premise + # machine Value can be list of validation errors + attr_accessor :validation_errors + + # @return [DateTime] The last RPO calculated time. + attr_accessor :last_rpo_calculated_time + + # @return [DateTime] The last update time received from on-prem + # components. + attr_accessor :last_update_received_time + + # @return [String] The replica id of the protected item. + attr_accessor :replica_id + + # @return [String] The OS Version of the protected item. + attr_accessor :os_version + + + # + # Mapper for InMageReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'InMageReplicationDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + active_site_type: { + required: false, + serialized_name: 'activeSiteType', + type: { + name: 'String' + } + }, + source_vm_cpucount: { + required: false, + serialized_name: 'sourceVmCPUCount', + type: { + name: 'Number' + } + }, + source_vm_ramsize_in_mb: { + required: false, + serialized_name: 'sourceVmRAMSizeInMB', + type: { + name: 'Number' + } + }, + os_details: { + required: false, + serialized_name: 'osDetails', + type: { + name: 'Composite', + class_name: 'OSDiskDetails' + } + }, + protection_stage: { + required: false, + serialized_name: 'protectionStage', + type: { + name: 'String' + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + vm_protection_state: { + required: false, + serialized_name: 'vmProtectionState', + type: { + name: 'String' + } + }, + vm_protection_state_description: { + required: false, + serialized_name: 'vmProtectionStateDescription', + type: { + name: 'String' + } + }, + resync_details: { + required: false, + serialized_name: 'resyncDetails', + type: { + name: 'Composite', + class_name: 'InitialReplicationDetails' + } + }, + retention_window_start: { + required: false, + serialized_name: 'retentionWindowStart', + type: { + name: 'DateTime' + } + }, + retention_window_end: { + required: false, + serialized_name: 'retentionWindowEnd', + type: { + name: 'DateTime' + } + }, + compressed_data_rate_in_mb: { + required: false, + serialized_name: 'compressedDataRateInMB', + type: { + name: 'Double' + } + }, + uncompressed_data_rate_in_mb: { + required: false, + serialized_name: 'uncompressedDataRateInMB', + type: { + name: 'Double' + } + }, + rpo_in_seconds: { + required: false, + serialized_name: 'rpoInSeconds', + type: { + name: 'Number' + } + }, + protected_disks: { + required: false, + serialized_name: 'protectedDisks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InMageProtectedDiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'InMageProtectedDiskDetails' + } + } + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + last_heartbeat: { + required: false, + serialized_name: 'lastHeartbeat', + type: { + name: 'DateTime' + } + }, + process_server_id: { + required: false, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + master_target_id: { + required: false, + serialized_name: 'masterTargetId', + type: { + name: 'String' + } + }, + consistency_points: { + required: false, + serialized_name: 'consistencyPoints', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'DateTimeElementType', + type: { + name: 'DateTime' + } + } + } + }, + disk_resized: { + required: false, + serialized_name: 'diskResized', + type: { + name: 'String' + } + }, + reboot_after_update_status: { + required: false, + serialized_name: 'rebootAfterUpdateStatus', + type: { + name: 'String' + } + }, + multi_vm_group_id: { + required: false, + serialized_name: 'multiVmGroupId', + type: { + name: 'String' + } + }, + multi_vm_group_name: { + required: false, + serialized_name: 'multiVmGroupName', + type: { + name: 'String' + } + }, + multi_vm_sync_status: { + required: false, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'String' + } + }, + agent_details: { + required: false, + serialized_name: 'agentDetails', + type: { + name: 'Composite', + class_name: 'InMageAgentDetails' + } + }, + v_center_infrastructure_id: { + required: false, + serialized_name: 'vCenterInfrastructureId', + type: { + name: 'String' + } + }, + infrastructure_vm_id: { + required: false, + serialized_name: 'infrastructureVmId', + type: { + name: 'String' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicDetails' + } + } + } + }, + discovery_type: { + required: false, + serialized_name: 'discoveryType', + type: { + name: 'String' + } + }, + azure_storage_account_id: { + required: false, + serialized_name: 'azureStorageAccountId', + type: { + name: 'String' + } + }, + datastores: { + required: false, + serialized_name: 'datastores', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + validation_errors: { + required: false, + serialized_name: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + last_rpo_calculated_time: { + required: false, + serialized_name: 'lastRpoCalculatedTime', + type: { + name: 'DateTime' + } + }, + last_update_received_time: { + required: false, + serialized_name: 'lastUpdateReceivedTime', + type: { + name: 'DateTime' + } + }, + replica_id: { + required: false, + serialized_name: 'replicaId', + type: { + name: 'String' + } + }, + os_version: { + required: false, + serialized_name: 'osVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_reprotect_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_reprotect_input.rb new file mode 100644 index 0000000000..f266fb429f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_reprotect_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # InMageAzureV2 specific provider input. + # + class InMageReprotectInput < ReverseReplicationProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [String] The Master Target Id. + attr_accessor :master_target_id + + # @return [String] The Process Server Id. + attr_accessor :process_server_id + + # @return [String] The retention drive to use on the MT. + attr_accessor :retention_drive + + # @return [String] The CS account Id. + attr_accessor :run_as_account_id + + # @return [String] The target datastore name. + attr_accessor :datastore_name + + # @return [InMageDiskExclusionInput] The enable disk exclusion input. + attr_accessor :disk_exclusion_input + + # @return [String] The Policy Id. + attr_accessor :profile_id + + # @return [Array] The disks to include list. + attr_accessor :disks_to_include + + + # + # Mapper for InMageReprotectInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'InMageReprotectInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + master_target_id: { + required: true, + serialized_name: 'masterTargetId', + type: { + name: 'String' + } + }, + process_server_id: { + required: true, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + retention_drive: { + required: true, + serialized_name: 'retentionDrive', + type: { + name: 'String' + } + }, + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + }, + datastore_name: { + required: false, + serialized_name: 'datastoreName', + type: { + name: 'String' + } + }, + disk_exclusion_input: { + required: false, + serialized_name: 'diskExclusionInput', + type: { + name: 'Composite', + class_name: 'InMageDiskExclusionInput' + } + }, + profile_id: { + required: true, + serialized_name: 'profileId', + type: { + name: 'String' + } + }, + disks_to_include: { + required: false, + serialized_name: 'disksToInclude', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_v2rp_recovery_point_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_v2rp_recovery_point_type.rb new file mode 100644 index 0000000000..3facc1dfda --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_v2rp_recovery_point_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for InMageV2RpRecoveryPointType + # + module InMageV2RpRecoveryPointType + Latest = "Latest" + LatestApplicationConsistent = "LatestApplicationConsistent" + LatestCrashConsistent = "LatestCrashConsistent" + LatestProcessed = "LatestProcessed" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_volume_exclusion_options.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_volume_exclusion_options.rb new file mode 100644 index 0000000000..d89a2c0447 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_volume_exclusion_options.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Guest disk signature based disk exclusion option when doing enable + # protection of virtual machine in InMage provider. + # + class InMageVolumeExclusionOptions + + include MsRestAzure + + # @return [String] The volume label. The disk having any volume with this + # label will be excluded from replication. + attr_accessor :volume_label + + # @return [String] The value indicating whether to exclude multi volume + # disk or not. If a disk has multiple volumes and one of the volume has + # label matching with VolumeLabel this disk will be excluded from + # replication if OnlyExcludeIfSingleVolume is false. + attr_accessor :only_exclude_if_single_volume + + + # + # Mapper for InMageVolumeExclusionOptions class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageVolumeExclusionOptions', + type: { + name: 'Composite', + class_name: 'InMageVolumeExclusionOptions', + model_properties: { + volume_label: { + required: false, + serialized_name: 'volumeLabel', + type: { + name: 'String' + } + }, + only_exclude_if_single_volume: { + required: false, + serialized_name: 'OnlyExcludeIfSingleVolume', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inconsistent_vm_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inconsistent_vm_details.rb new file mode 100644 index 0000000000..dbc16d2a87 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inconsistent_vm_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class stores the monitoring details for consistency check of + # inconsistent Protected Entity. + # + class InconsistentVmDetails + + include MsRestAzure + + # @return [String] The Vm name. + attr_accessor :vm_name + + # @return [String] The Cloud name. + attr_accessor :cloud_name + + # @return [Array] The list of details regarding state of the + # Protected Entity in SRS and On prem. + attr_accessor :details + + # @return [Array] The list of error ids. + attr_accessor :error_ids + + + # + # Mapper for InconsistentVmDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InconsistentVmDetails', + type: { + name: 'Composite', + class_name: 'InconsistentVmDetails', + model_properties: { + vm_name: { + required: false, + serialized_name: 'vmName', + type: { + name: 'String' + } + }, + cloud_name: { + required: false, + serialized_name: 'cloudName', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'details', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + error_ids: { + required: false, + serialized_name: 'errorIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/initial_replication_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/initial_replication_details.rb new file mode 100644 index 0000000000..56b05c3aed --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/initial_replication_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Initial replication details. + # + class InitialReplicationDetails + + include MsRestAzure + + # @return [String] Initial replication type. + attr_accessor :initial_replication_type + + # @return [String] The initial replication progress percentage. + attr_accessor :initial_replication_progress_percentage + + + # + # Mapper for InitialReplicationDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InitialReplicationDetails', + type: { + name: 'Composite', + class_name: 'InitialReplicationDetails', + model_properties: { + initial_replication_type: { + required: false, + serialized_name: 'initialReplicationType', + type: { + name: 'String' + } + }, + initial_replication_progress_percentage: { + required: false, + serialized_name: 'initialReplicationProgressPercentage', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inline_workflow_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inline_workflow_task_details.rb new file mode 100644 index 0000000000..a2a2fdef13 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inline_workflow_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the inline workflow task details. + # + class InlineWorkflowTaskDetails < GroupTaskDetails + + include MsRestAzure + + + def initialize + @instanceType = "InlineWorkflowTaskDetails" + end + + attr_accessor :instanceType + + # @return [Array] The list of child workflow ids. + attr_accessor :workflow_ids + + + # + # Mapper for InlineWorkflowTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InlineWorkflowTaskDetails', + type: { + name: 'Composite', + class_name: 'InlineWorkflowTaskDetails', + model_properties: { + child_tasks: { + required: false, + serialized_name: 'childTasks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ASRTaskElementType', + type: { + name: 'Composite', + class_name: 'ASRTask' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + workflow_ids: { + required: false, + serialized_name: 'workflowIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/input_endpoint.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/input_endpoint.rb new file mode 100644 index 0000000000..dae8bea994 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/input_endpoint.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure VM input endpoint details. + # + class InputEndpoint + + include MsRestAzure + + # @return [String] The input endpoint name. + attr_accessor :endpoint_name + + # @return [Integer] The input endpoint private port. + attr_accessor :private_port + + # @return [Integer] The input endpoint public port. + attr_accessor :public_port + + # @return [String] The input endpoint protocol. + attr_accessor :protocol + + + # + # Mapper for InputEndpoint class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InputEndpoint', + type: { + name: 'Composite', + class_name: 'InputEndpoint', + model_properties: { + endpoint_name: { + required: false, + serialized_name: 'endpointName', + type: { + name: 'String' + } + }, + private_port: { + required: false, + serialized_name: 'privatePort', + type: { + name: 'Number' + } + }, + public_port: { + required: false, + serialized_name: 'publicPort', + type: { + name: 'Number' + } + }, + protocol: { + required: false, + serialized_name: 'protocol', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job.rb new file mode 100644 index 0000000000..babc2f343f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job.rb @@ -0,0 +1,119 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Job details. + # + class Job < Resource + + include MsRestAzure + + # @return [JobProperties] The custom data. + attr_accessor :properties + + # @return [String] The status of the Job. ARM expects the terminal status + # to be one of (1) Succeeded, (2) Failed or (3) Canceled. All other + # values imply that the operation is still running / being applied. + attr_accessor :status + + # @return [ARMException] The error. + attr_accessor :error + + # @return [String] The start time. + attr_accessor :start_time + + # @return [String] The start time. + attr_accessor :end_time + + + # + # Mapper for Job class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Job', + type: { + name: 'Composite', + class_name: 'Job', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'JobProperties' + } + }, + status: { + required: false, + serialized_name: 'status', + type: { + name: 'String' + } + }, + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'ARMException' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'String' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_collection.rb new file mode 100644 index 0000000000..e37d6e8cf2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of jobs. + # + class JobCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of jobs. + attr_accessor :value + + # @return [String] The value of next link. + 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 [JobCollection] 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 JobCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobCollection', + type: { + name: 'Composite', + class_name: 'JobCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobElementType', + type: { + name: 'Composite', + class_name: 'Job' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_details.rb new file mode 100644 index 0000000000..88213cbb51 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Job details based on specific job type. + # + class JobDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["AsrJobDetails"] = "AsrJobDetails" + @@discriminatorMap["TestFailoverJobDetails"] = "TestFailoverJobDetails" + @@discriminatorMap["FailoverJobDetails"] = "FailoverJobDetails" + @@discriminatorMap["ExportJobDetails"] = "ExportJobDetails" + @@discriminatorMap["SwitchProtectionJobDetails"] = "SwitchProtectionJobDetails" + + def initialize + @instanceType = "JobDetails" + end + + attr_accessor :instanceType + + # @return [Hash{String => String}] The affected object properties like + # source server, source cloud, target server, target cloud etc. based on + # the workflow object details. + attr_accessor :affected_object_details + + + # + # Mapper for JobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'JobDetails', + class_name: 'JobDetails', + model_properties: { + affected_object_details: { + required: false, + serialized_name: 'affectedObjectDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_entity.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_entity.rb new file mode 100644 index 0000000000..b8f6637f69 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_entity.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class contains the minimal job details required to navigate to the + # desired drill down. + # + class JobEntity + + include MsRestAzure + + # @return [String] The job id. + attr_accessor :job_id + + # @return [String] The job display name. + attr_accessor :job_friendly_name + + # @return [String] The object id. + attr_accessor :target_object_id + + # @return [String] The object name. + attr_accessor :target_object_name + + # @return [String] The workflow affected object type. + attr_accessor :target_instance_type + + # @return [String] The job name. Enum type ScenarioName. + attr_accessor :job_scenario_name + + + # + # Mapper for JobEntity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobEntity', + type: { + name: 'Composite', + class_name: 'JobEntity', + model_properties: { + job_id: { + required: false, + serialized_name: 'jobId', + type: { + name: 'String' + } + }, + job_friendly_name: { + required: false, + serialized_name: 'jobFriendlyName', + type: { + name: 'String' + } + }, + target_object_id: { + required: false, + serialized_name: 'targetObjectId', + type: { + name: 'String' + } + }, + target_object_name: { + required: false, + serialized_name: 'targetObjectName', + type: { + name: 'String' + } + }, + target_instance_type: { + required: false, + serialized_name: 'targetInstanceType', + type: { + name: 'String' + } + }, + job_scenario_name: { + required: false, + serialized_name: 'jobScenarioName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_error_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_error_details.rb new file mode 100644 index 0000000000..785ce6e717 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_error_details.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class contains the error details per object. + # + class JobErrorDetails + + include MsRestAzure + + # @return [ServiceError] The Service error details. + attr_accessor :service_error_details + + # @return [ProviderError] The Provider error details. + attr_accessor :provider_error_details + + # @return [String] Error level of error. + attr_accessor :error_level + + # @return [DateTime] The creation time of job error. + attr_accessor :creation_time + + # @return [String] The Id of the task. + attr_accessor :task_id + + + # + # Mapper for JobErrorDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobErrorDetails', + type: { + name: 'Composite', + class_name: 'JobErrorDetails', + model_properties: { + service_error_details: { + required: false, + serialized_name: 'serviceErrorDetails', + type: { + name: 'Composite', + class_name: 'ServiceError' + } + }, + provider_error_details: { + required: false, + serialized_name: 'providerErrorDetails', + type: { + name: 'Composite', + class_name: 'ProviderError' + } + }, + error_level: { + required: false, + serialized_name: 'errorLevel', + type: { + name: 'String' + } + }, + creation_time: { + required: false, + serialized_name: 'creationTime', + type: { + name: 'DateTime' + } + }, + task_id: { + required: false, + serialized_name: 'taskId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_properties.rb new file mode 100644 index 0000000000..442408d7a6 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_properties.rb @@ -0,0 +1,206 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Job custom data details. + # + class JobProperties + + include MsRestAzure + + # @return [String] The activity id. + attr_accessor :activity_id + + # @return [String] The ScenarioName. + attr_accessor :scenario_name + + # @return [String] The DisplayName. + attr_accessor :friendly_name + + # @return [String] The status of the Job. It is one of these values - + # NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or + # Other. + attr_accessor :state + + # @return [String] The description of the state of the Job. For e.g. - + # For Succeeded state, description can be Completed, PartiallySucceeded, + # CompletedWithInformation or Skipped. + attr_accessor :state_description + + # @return [Array] The tasks. + attr_accessor :tasks + + # @return [Array] The errors. + attr_accessor :errors + + # @return [DateTime] The start time. + attr_accessor :start_time + + # @return [DateTime] The end time. + attr_accessor :end_time + + # @return [Array] The Allowed action the job. + attr_accessor :allowed_actions + + # @return [String] The affected Object Id. + attr_accessor :target_object_id + + # @return [String] The name of the affected object. + attr_accessor :target_object_name + + # @return [String] The type of the affected object which is of + # {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} class. + attr_accessor :target_instance_type + + # @return [JobDetails] The custom job details like test failover job + # details. + attr_accessor :custom_details + + + # + # Mapper for JobProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobProperties', + type: { + name: 'Composite', + class_name: 'JobProperties', + model_properties: { + activity_id: { + required: false, + serialized_name: 'activityId', + type: { + name: 'String' + } + }, + scenario_name: { + required: false, + serialized_name: 'scenarioName', + type: { + name: 'String' + } + }, + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + state_description: { + required: false, + serialized_name: 'stateDescription', + type: { + name: 'String' + } + }, + tasks: { + required: false, + serialized_name: 'tasks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ASRTaskElementType', + type: { + name: 'Composite', + class_name: 'ASRTask' + } + } + } + }, + errors: { + required: false, + serialized_name: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + } + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + allowed_actions: { + required: false, + serialized_name: 'allowedActions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + target_object_id: { + required: false, + serialized_name: 'targetObjectId', + type: { + name: 'String' + } + }, + target_object_name: { + required: false, + serialized_name: 'targetObjectName', + type: { + name: 'String' + } + }, + target_instance_type: { + required: false, + serialized_name: 'targetInstanceType', + type: { + name: 'String' + } + }, + custom_details: { + required: false, + serialized_name: 'customDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'JobDetails', + class_name: 'JobDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_query_parameter.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_query_parameter.rb new file mode 100644 index 0000000000..f4d50f602e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_query_parameter.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Query parameter to enumerate jobs. + # + class JobQueryParameter + + include MsRestAzure + + # @return [String] Date time to get jobs from. + attr_accessor :start_time + + # @return [String] Date time to get jobs upto. + attr_accessor :end_time + + # @return [String] The Id of the fabric to search jobs under. + attr_accessor :fabric_id + + # @return [Array] The type of objects. + attr_accessor :affected_object_types + + # @return [Array] The states of the job to be filtered can be in. + attr_accessor :job_status + + + # + # Mapper for JobQueryParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobQueryParameter', + type: { + name: 'Composite', + class_name: 'JobQueryParameter', + model_properties: { + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'String' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'String' + } + }, + fabric_id: { + required: false, + serialized_name: 'fabricId', + type: { + name: 'String' + } + }, + affected_object_types: { + required: false, + serialized_name: 'affectedObjectTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + job_status: { + required: false, + serialized_name: 'jobStatus', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_status_event_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_status_event_details.rb new file mode 100644 index 0000000000..00e98deb8c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_status_event_details.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Model class for event details of a job status event. + # + class JobStatusEventDetails < EventSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "JobStatus" + end + + attr_accessor :instanceType + + # @return [String] Job arm id for the event. + attr_accessor :job_id + + # @return [String] JobName for the Event. + attr_accessor :job_friendly_name + + # @return [String] JobStatus for the Event. + attr_accessor :job_status + + # @return [String] AffectedObjectType for the event. + attr_accessor :affected_object_type + + + # + # Mapper for JobStatusEventDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStatus', + type: { + name: 'Composite', + class_name: 'JobStatusEventDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + job_id: { + required: false, + serialized_name: 'jobId', + type: { + name: 'String' + } + }, + job_friendly_name: { + required: false, + serialized_name: 'jobFriendlyName', + type: { + name: 'String' + } + }, + job_status: { + required: false, + serialized_name: 'jobStatus', + type: { + name: 'String' + } + }, + affected_object_type: { + required: false, + serialized_name: 'affectedObjectType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_task_details.rb new file mode 100644 index 0000000000..eb0c8c7fb2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents a task which is actually a workflow so that one can + # navigate to its individual drill down. + # + class JobTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "JobTaskDetails" + end + + attr_accessor :instanceType + + # @return [JobEntity] The job entity. + attr_accessor :job_task + + + # + # Mapper for JobTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobTaskDetails', + type: { + name: 'Composite', + class_name: 'JobTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + job_task: { + required: false, + serialized_name: 'jobTask', + type: { + name: 'Composite', + class_name: 'JobEntity' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/license_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/license_type.rb new file mode 100644 index 0000000000..7e9f9e4961 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/license_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for LicenseType + # + module LicenseType + NotSpecified = "NotSpecified" + NoLicenseType = "NoLicenseType" + WindowsServer = "WindowsServer" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network.rb new file mode 100644 index 0000000000..56c69b6b39 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Logical network data model. + # + class LogicalNetwork < Resource + + include MsRestAzure + + # @return [LogicalNetworkProperties] The Logical Network Properties. + attr_accessor :properties + + + # + # Mapper for LogicalNetwork class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LogicalNetwork', + type: { + name: 'Composite', + class_name: 'LogicalNetwork', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'LogicalNetworkProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_collection.rb new file mode 100644 index 0000000000..afcdf6b6cf --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # List of logical networks. + # + class LogicalNetworkCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The Logical Networks list details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [LogicalNetworkCollection] 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 LogicalNetworkCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LogicalNetworkCollection', + type: { + name: 'Composite', + class_name: 'LogicalNetworkCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LogicalNetworkElementType', + type: { + name: 'Composite', + class_name: 'LogicalNetwork' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_properties.rb new file mode 100644 index 0000000000..bed469e642 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Logical Network Properties. + # + class LogicalNetworkProperties + + include MsRestAzure + + # @return [String] The Friendly Name. + attr_accessor :friendly_name + + # @return [String] A value indicating whether Network Virtualization is + # enabled for the logical network. + attr_accessor :network_virtualization_status + + # @return [String] A value indicating whether logical network is used as + # private test network by test failover. + attr_accessor :logical_network_usage + + # @return [String] A value indicating whether logical network definitions + # are isolated. + attr_accessor :logical_network_definitions_status + + + # + # Mapper for LogicalNetworkProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LogicalNetworkProperties', + type: { + name: 'Composite', + class_name: 'LogicalNetworkProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + network_virtualization_status: { + required: false, + serialized_name: 'networkVirtualizationStatus', + type: { + name: 'String' + } + }, + logical_network_usage: { + required: false, + serialized_name: 'logicalNetworkUsage', + type: { + name: 'String' + } + }, + logical_network_definitions_status: { + required: false, + serialized_name: 'logicalNetworkDefinitionsStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/manual_action_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/manual_action_task_details.rb new file mode 100644 index 0000000000..985a2cef7a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/manual_action_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the manual action task details. + # + class ManualActionTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "ManualActionTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] The name. + attr_accessor :name + + # @return [String] The instructions. + attr_accessor :instructions + + # @return [String] The observation. + attr_accessor :observation + + + # + # Mapper for ManualActionTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManualActionTaskDetails', + type: { + name: 'Composite', + class_name: 'ManualActionTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + instructions: { + required: false, + serialized_name: 'instructions', + type: { + name: 'String' + } + }, + observation: { + required: false, + serialized_name: 'observation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/master_target_server.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/master_target_server.rb new file mode 100644 index 0000000000..23e0729277 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/master_target_server.rb @@ -0,0 +1,179 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Details of a Master Target Server. + # + class MasterTargetServer + + include MsRestAzure + + # @return [String] The server Id. + attr_accessor :id + + # @return [String] The IP address of the server. + attr_accessor :ip_address + + # @return [String] The server name. + attr_accessor :name + + # @return [String] The OS type of the server. + attr_accessor :os_type + + # @return [String] The version of the scout component on the server. + attr_accessor :agent_version + + # @return [DateTime] The last heartbeat received from the server. + attr_accessor :last_heartbeat + + # @return [String] Version status + attr_accessor :version_status + + # @return [Array] The retention volumes of Master target + # Server. + attr_accessor :retention_volumes + + # @return [Array] The list of data stores in the fabric. + attr_accessor :data_stores + + # @return [Array] Validation errors. + attr_accessor :validation_errors + + # @return [Integer] Disk count of the master target. + attr_accessor :disk_count + + # @return [String] OS Version of the master target. + attr_accessor :os_version + + + # + # Mapper for MasterTargetServer class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MasterTargetServer', + type: { + name: 'Composite', + class_name: 'MasterTargetServer', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + agent_version: { + required: false, + serialized_name: 'agentVersion', + type: { + name: 'String' + } + }, + last_heartbeat: { + required: false, + serialized_name: 'lastHeartbeat', + type: { + name: 'DateTime' + } + }, + version_status: { + required: false, + serialized_name: 'versionStatus', + type: { + name: 'String' + } + }, + retention_volumes: { + required: false, + serialized_name: 'retentionVolumes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RetentionVolumeElementType', + type: { + name: 'Composite', + class_name: 'RetentionVolume' + } + } + } + }, + data_stores: { + required: false, + serialized_name: 'dataStores', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DataStoreElementType', + type: { + name: 'Composite', + class_name: 'DataStore' + } + } + } + }, + validation_errors: { + required: false, + serialized_name: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + disk_count: { + required: false, + serialized_name: 'diskCount', + type: { + name: 'Number' + } + }, + os_version: { + required: false, + serialized_name: 'osVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/method_call_status.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/method_call_status.rb new file mode 100644 index 0000000000..97a3887414 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/method_call_status.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Reports method status where exception was raised. + # + class MethodCallStatus + + include MsRestAzure + + # @return [String] Gets a value indicating whether called method was + # virtual + attr_accessor :is_virtual + + # @return [Array] Gets parameter list passed to method. + attr_accessor :parameters + + # @return [String] Gets a value indicating whether method container + # generic params. + attr_accessor :contains_generic_parameters + + + # + # Mapper for MethodCallStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MethodCallStatus', + type: { + name: 'Composite', + class_name: 'MethodCallStatus', + model_properties: { + is_virtual: { + required: false, + serialized_name: 'isVirtual', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serialized_name: 'parameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + contains_generic_parameters: { + required: false, + serialized_name: 'containsGenericParameters', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/mobility_service_update.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/mobility_service_update.rb new file mode 100644 index 0000000000..aec3d018d3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/mobility_service_update.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # The Mobility Service update details. + # + class MobilityServiceUpdate + + include MsRestAzure + + # @return [String] The version of the latest update. + attr_accessor :version + + # @return [String] The reboot status of the update - whether it is + # required or not. + attr_accessor :reboot_status + + # @return [String] The OS type. + attr_accessor :os_type + + + # + # Mapper for MobilityServiceUpdate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MobilityServiceUpdate', + type: { + name: 'Composite', + class_name: 'MobilityServiceUpdate', + model_properties: { + version: { + required: false, + serialized_name: 'version', + type: { + name: 'String' + } + }, + reboot_status: { + required: false, + serialized_name: 'rebootStatus', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_status.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_status.rb new file mode 100644 index 0000000000..99e860cdc9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_status.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for MultiVmSyncStatus + # + module MultiVmSyncStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network.rb new file mode 100644 index 0000000000..583b14255f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Network model. + # + class Network < Resource + + include MsRestAzure + + # @return [NetworkProperties] The Network Properties. + attr_accessor :properties + + + # + # Mapper for Network class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Network', + type: { + name: 'Composite', + class_name: 'Network', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'NetworkProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_collection.rb new file mode 100644 index 0000000000..3da482dcd2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # List of networks. + # + class NetworkCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The Networks list details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [NetworkCollection] 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 NetworkCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkCollection', + type: { + name: 'Composite', + class_name: 'NetworkCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NetworkElementType', + type: { + name: 'Composite', + class_name: 'Network' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping.rb new file mode 100644 index 0000000000..0e67c8802d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Network Mapping model. Ideally it should have been possible to inherit + # this class from prev version in InheritedModels as long as there is no + # difference in structure or method signature. Since there were no base + # Models for certain fields and methods viz NetworkMappingProperties and + # Load with required return type, the class has been introduced in its + # entirety with references to base models to facilitate exensions in + # subsequent versions. + # + class NetworkMapping < Resource + + include MsRestAzure + + # @return [NetworkMappingProperties] The Network Mapping Properties. + attr_accessor :properties + + + # + # Mapper for NetworkMapping class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkMapping', + type: { + name: 'Composite', + class_name: 'NetworkMapping', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'NetworkMappingProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_collection.rb new file mode 100644 index 0000000000..aa139fb1ba --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_collection.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # List of network mappings. As with NetworkMapping, it should be possible + # to reuse a prev version of this class. It doesn't seem likely this class + # could be anything more than a slightly bespoke collection of + # NetworkMapping. Hence it makes sense to override Load with + # Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. + # + class NetworkMappingCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The Network Mappings list. + attr_accessor :value + + # @return [String] The value of next link. + 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 [NetworkMappingCollection] 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 NetworkMappingCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkMappingCollection', + type: { + name: 'Composite', + class_name: 'NetworkMappingCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NetworkMappingElementType', + type: { + name: 'Composite', + class_name: 'NetworkMapping' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_fabric_specific_settings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_fabric_specific_settings.rb new file mode 100644 index 0000000000..4e9b2c908a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_fabric_specific_settings.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Network Mapping fabric specific settings. + # + class NetworkMappingFabricSpecificSettings + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["AzureToAzure"] = "AzureToAzureNetworkMappingSettings" + @@discriminatorMap["VmmToAzure"] = "VmmToAzureNetworkMappingSettings" + @@discriminatorMap["VmmToVmm"] = "VmmToVmmNetworkMappingSettings" + + def initialize + @instanceType = "NetworkMappingFabricSpecificSettings" + end + + attr_accessor :instanceType + + + # + # Mapper for NetworkMappingFabricSpecificSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkMappingFabricSpecificSettings', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'NetworkMappingFabricSpecificSettings', + class_name: 'NetworkMappingFabricSpecificSettings', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_properties.rb new file mode 100644 index 0000000000..c09d0d2624 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_properties.rb @@ -0,0 +1,128 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Network Mapping Properties. + # + class NetworkMappingProperties + + include MsRestAzure + + # @return [String] The pairing state for network mapping. + attr_accessor :state + + # @return [String] The primary network friendly name. + attr_accessor :primary_network_friendly_name + + # @return [String] The primary network id for network mapping. + attr_accessor :primary_network_id + + # @return [String] The primary fabric friendly name. + attr_accessor :primary_fabric_friendly_name + + # @return [String] The recovery network friendly name. + attr_accessor :recovery_network_friendly_name + + # @return [String] The recovery network id for network mapping. + attr_accessor :recovery_network_id + + # @return [String] The recovery fabric ARM id. + attr_accessor :recovery_fabric_arm_id + + # @return [String] The recovery fabric friendly name. + attr_accessor :recovery_fabric_friendly_name + + # @return [NetworkMappingFabricSpecificSettings] The fabric specific + # settings. + attr_accessor :fabric_specific_settings + + + # + # Mapper for NetworkMappingProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkMappingProperties', + type: { + name: 'Composite', + class_name: 'NetworkMappingProperties', + model_properties: { + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + primary_network_friendly_name: { + required: false, + serialized_name: 'primaryNetworkFriendlyName', + type: { + name: 'String' + } + }, + primary_network_id: { + required: false, + serialized_name: 'primaryNetworkId', + type: { + name: 'String' + } + }, + primary_fabric_friendly_name: { + required: false, + serialized_name: 'primaryFabricFriendlyName', + type: { + name: 'String' + } + }, + recovery_network_friendly_name: { + required: false, + serialized_name: 'recoveryNetworkFriendlyName', + type: { + name: 'String' + } + }, + recovery_network_id: { + required: false, + serialized_name: 'recoveryNetworkId', + type: { + name: 'String' + } + }, + recovery_fabric_arm_id: { + required: false, + serialized_name: 'recoveryFabricArmId', + type: { + name: 'String' + } + }, + recovery_fabric_friendly_name: { + required: false, + serialized_name: 'recoveryFabricFriendlyName', + type: { + name: 'String' + } + }, + fabric_specific_settings: { + required: false, + serialized_name: 'fabricSpecificSettings', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'NetworkMappingFabricSpecificSettings', + class_name: 'NetworkMappingFabricSpecificSettings' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_properties.rb new file mode 100644 index 0000000000..26d4bf4f6f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_properties.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Network Properties + # + class NetworkProperties + + include MsRestAzure + + # @return [String] The Fabric Type. + attr_accessor :fabric_type + + # @return [Array] The List of subnets. + attr_accessor :subnets + + # @return [String] The Friendly Name. + attr_accessor :friendly_name + + # @return [String] The Network Type. + attr_accessor :network_type + + + # + # Mapper for NetworkProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkProperties', + type: { + name: 'Composite', + class_name: 'NetworkProperties', + model_properties: { + fabric_type: { + required: false, + serialized_name: 'fabricType', + type: { + name: 'String' + } + }, + subnets: { + required: false, + serialized_name: 'subnets', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SubnetElementType', + type: { + name: 'Composite', + class_name: 'Subnet' + } + } + } + }, + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + network_type: { + required: false, + serialized_name: 'networkType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery.rb new file mode 100644 index 0000000000..1303313d53 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Operations discovery class. + # + class OperationsDiscovery + + include MsRestAzure + + # @return [String] Name of the API. The name of the operation being + # performed on this particular object. It should match the action name + # that appears in RBAC / the event service. Examples of operations + # include: * Microsoft.Compute/virtualMachine/capture/action * + # Microsoft.Compute/virtualMachine/restart/action * + # Microsoft.Compute/virtualMachine/write * + # Microsoft.Compute/virtualMachine/read * + # Microsoft.Compute/virtualMachine/delete Each action should include, in + # order: (1) Resource Provider Namespace (2) Type hierarchy for which the + # action applies (e.g. server/databases for a SQL Azure database) (3) + # Read, Write, Action or Delete indicating which type applies. If it is a + # PUT/PATCH on a collection or named value, Write should be used. If it + # is a GET, Read should be used. If it is a DELETE, Delete should be + # used. If it is a POST, Action should be used. As a note: all resource + # providers would need to include the "{Resource Provider + # Namespace}/register/action" operation in their response. This API is + # used to register for their service, and should include details about + # the operation (e.g. a localized name for the resource provider + any + # special considerations like PII release) + attr_accessor :name + + # @return [Display] Object type + attr_accessor :display + + # @return [String] Origin. The intended executor of the operation; + # governs the display of the operation in the RBAC UX and the audit logs + # UX. Default value is "user,system" + attr_accessor :origin + + # @return Properties. Reserved for future use. + attr_accessor :properties + + + # + # Mapper for OperationsDiscovery class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationsDiscovery', + type: { + name: 'Composite', + class_name: 'OperationsDiscovery', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'Display' + } + }, + 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery_collection.rb new file mode 100644 index 0000000000..70ee4e5fc0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of ClientDiscovery details. + # + class OperationsDiscoveryCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The ClientDiscovery details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [OperationsDiscoveryCollection] 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 OperationsDiscoveryCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationsDiscoveryCollection', + type: { + name: 'Composite', + class_name: 'OperationsDiscoveryCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationsDiscoveryElementType', + type: { + name: 'Composite', + class_name: 'OperationsDiscovery' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdetails.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdetails.rb new file mode 100644 index 0000000000..f636ebd897 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdetails.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Disk Details. + # + class OSDetails + + include MsRestAzure + + # @return [String] VM Disk details. + attr_accessor :os_type + + # @return [String] Product type. + attr_accessor :product_type + + # @return [String] The OSEdition. + attr_accessor :os_edition + + # @return [String] The OS Version. + attr_accessor :o_sversion + + # @return [String] The OS Major Version. + attr_accessor :o_smajor_version + + # @return [String] The OS Minor Version. + attr_accessor :o_sminor_version + + + # + # Mapper for OSDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OSDetails', + type: { + name: 'Composite', + class_name: 'OSDetails', + model_properties: { + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + product_type: { + required: false, + serialized_name: 'productType', + type: { + name: 'String' + } + }, + os_edition: { + required: false, + serialized_name: 'osEdition', + type: { + name: 'String' + } + }, + o_sversion: { + required: false, + serialized_name: 'oSVersion', + type: { + name: 'String' + } + }, + o_smajor_version: { + required: false, + serialized_name: 'oSMajorVersion', + type: { + name: 'String' + } + }, + o_sminor_version: { + required: false, + serialized_name: 'oSMinorVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdisk_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdisk_details.rb new file mode 100644 index 0000000000..05b7a9c687 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdisk_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Details of the OS Disk. + # + class OSDiskDetails + + include MsRestAzure + + # @return [String] The id of the disk containing the OS. + attr_accessor :os_vhd_id + + # @return [String] The type of the OS on the VM. + attr_accessor :os_type + + # @return [String] The OS disk VHD name. + attr_accessor :vhd_name + + + # + # Mapper for OSDiskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OSDiskDetails', + type: { + name: 'Composite', + class_name: 'OSDiskDetails', + model_properties: { + os_vhd_id: { + required: false, + serialized_name: 'osVhdId', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + vhd_name: { + required: false, + serialized_name: 'vhdName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input.rb new file mode 100644 index 0000000000..d4a3891cf0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for planned failover. + # + class PlannedFailoverInput + + include MsRestAzure + + # @return [PlannedFailoverInputProperties] Planned failover input + # properties + attr_accessor :properties + + + # + # Mapper for PlannedFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PlannedFailoverInput', + type: { + name: 'Composite', + class_name: 'PlannedFailoverInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'PlannedFailoverInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input_properties.rb new file mode 100644 index 0000000000..33d118f732 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for planned failover input properties. + # + class PlannedFailoverInputProperties + + include MsRestAzure + + # @return [String] Failover direction. + attr_accessor :failover_direction + + # @return [ProviderSpecificFailoverInput] Provider specific settings + attr_accessor :provider_specific_details + + + # + # Mapper for PlannedFailoverInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PlannedFailoverInputProperties', + type: { + name: 'Composite', + class_name: 'PlannedFailoverInputProperties', + model_properties: { + failover_direction: { + required: false, + serialized_name: 'failoverDirection', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ProviderSpecificFailoverInput', + class_name: 'ProviderSpecificFailoverInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy.rb new file mode 100644 index 0000000000..7fb6192a05 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection profile details. + # + class Policy < Resource + + include MsRestAzure + + # @return [PolicyProperties] The custom data. + attr_accessor :properties + + + # + # Mapper for Policy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Policy', + type: { + name: 'Composite', + class_name: 'Policy', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'PolicyProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_collection.rb new file mode 100644 index 0000000000..ebd5d20b10 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection Profile Collection details. + # + class PolicyCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The policy details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [PolicyCollection] 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 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: 'PolicyElementType', + type: { + name: 'Composite', + class_name: 'Policy' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_properties.rb new file mode 100644 index 0000000000..cfe4eab3e7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection profile custom data details. + # + class PolicyProperties + + include MsRestAzure + + # @return [String] The FriendlyName. + attr_accessor :friendly_name + + # @return [PolicyProviderSpecificDetails] The ReplicationChannelSetting. + attr_accessor :provider_specific_details + + + # + # Mapper for PolicyProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicyProperties', + type: { + name: 'Composite', + class_name: 'PolicyProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'PolicyProviderSpecificDetails', + class_name: 'PolicyProviderSpecificDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_details.rb new file mode 100644 index 0000000000..6d458705f1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Base class for Provider specific details for policies. + # + class PolicyProviderSpecificDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzurePolicyDetails" + @@discriminatorMap["HyperVReplicaBasePolicyDetails"] = "HyperVReplicaBasePolicyDetails" + @@discriminatorMap["HyperVReplica2012"] = "HyperVReplicaPolicyDetails" + @@discriminatorMap["HyperVReplica2012R2"] = "HyperVReplicaBluePolicyDetails" + @@discriminatorMap["InMageBasePolicyDetails"] = "InMageBasePolicyDetails" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2PolicyDetails" + @@discriminatorMap["InMage"] = "InMagePolicyDetails" + @@discriminatorMap["A2A"] = "A2APolicyDetails" + @@discriminatorMap["RcmAzureMigration"] = "RcmAzureMigrationPolicyDetails" + @@discriminatorMap["VMwareCbt"] = "VmwareCbtPolicyDetails" + + def initialize + @instanceType = "PolicyProviderSpecificDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for PolicyProviderSpecificDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicyProviderSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'PolicyProviderSpecificDetails', + class_name: 'PolicyProviderSpecificDetails', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_input.rb new file mode 100644 index 0000000000..2a3a7e50b1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_input.rb @@ -0,0 +1,51 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Base class for provider specific input + # + class PolicyProviderSpecificInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzurePolicyInput" + @@discriminatorMap["HyperVReplica2012"] = "HyperVReplicaPolicyInput" + @@discriminatorMap["HyperVReplica2012R2"] = "HyperVReplicaBluePolicyInput" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2PolicyInput" + @@discriminatorMap["InMage"] = "InMagePolicyInput" + @@discriminatorMap["A2A"] = "A2APolicyCreationInput" + @@discriminatorMap["VMwareCbt"] = "VMwareCbtPolicyCreationInput" + + def initialize + @instanceType = "PolicyProviderSpecificInput" + end + + attr_accessor :instanceType + + + # + # Mapper for PolicyProviderSpecificInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PolicyProviderSpecificInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'PolicyProviderSpecificInput', + class_name: 'PolicyProviderSpecificInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/possible_operations_directions.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/possible_operations_directions.rb new file mode 100644 index 0000000000..7a03e60d91 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/possible_operations_directions.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for PossibleOperationsDirections + # + module PossibleOperationsDirections + PrimaryToRecovery = "PrimaryToRecovery" + RecoveryToPrimary = "RecoveryToPrimary" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/process_server.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/process_server.rb new file mode 100644 index 0000000000..76182e253f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/process_server.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. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Details of the Process Server. + # + class ProcessServer + + include MsRestAzure + + # @return [String] The Process Server's friendly name. + attr_accessor :friendly_name + + # @return [String] The Process Server Id. + attr_accessor :id + + # @return [String] The IP address of the server. + attr_accessor :ip_address + + # @return [String] The OS type of the server. + attr_accessor :os_type + + # @return [String] The version of the scout component on the server. + attr_accessor :agent_version + + # @return [DateTime] The last heartbeat received from the server. + attr_accessor :last_heartbeat + + # @return [String] Version status + attr_accessor :version_status + + # @return [Array] The list of the mobility service + # updates available on the Process Server. + attr_accessor :mobility_service_updates + + # @return [String] The agent generated Id. + attr_accessor :host_id + + # @return [String] The servers configured with this PS. + attr_accessor :machine_count + + # @return [String] The number of replication pairs configured in this PS. + attr_accessor :replication_pair_count + + # @return [String] The percentage of the system load. + attr_accessor :system_load + + # @return [String] The system load status. + attr_accessor :system_load_status + + # @return [String] The percentage of the CPU load. + attr_accessor :cpu_load + + # @return [String] The CPU load status. + attr_accessor :cpu_load_status + + # @return [Integer] The total memory. + attr_accessor :total_memory_in_bytes + + # @return [Integer] The available memory. + attr_accessor :available_memory_in_bytes + + # @return [String] The memory usage status. + attr_accessor :memory_usage_status + + # @return [Integer] The total space. + attr_accessor :total_space_in_bytes + + # @return [Integer] The available space. + attr_accessor :available_space_in_bytes + + # @return [String] The space usage status. + attr_accessor :space_usage_status + + # @return [String] The PS service status. + attr_accessor :ps_service_status + + # @return [DateTime] The PS SSL cert expiry date. + attr_accessor :ssl_cert_expiry_date + + # @return [Integer] CS SSL cert expiry date. + attr_accessor :ssl_cert_expiry_remaining_days + + # @return [String] OS Version of the process server. Note: This will get + # populated if user has CS version greater than 9.12.0.0. + attr_accessor :os_version + + + # + # Mapper for ProcessServer class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProcessServer', + type: { + name: 'Composite', + class_name: 'ProcessServer', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + agent_version: { + required: false, + serialized_name: 'agentVersion', + type: { + name: 'String' + } + }, + last_heartbeat: { + required: false, + serialized_name: 'lastHeartbeat', + type: { + name: 'DateTime' + } + }, + version_status: { + required: false, + serialized_name: 'versionStatus', + type: { + name: 'String' + } + }, + mobility_service_updates: { + required: false, + serialized_name: 'mobilityServiceUpdates', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MobilityServiceUpdateElementType', + type: { + name: 'Composite', + class_name: 'MobilityServiceUpdate' + } + } + } + }, + host_id: { + required: false, + serialized_name: 'hostId', + type: { + name: 'String' + } + }, + machine_count: { + required: false, + serialized_name: 'machineCount', + type: { + name: 'String' + } + }, + replication_pair_count: { + required: false, + serialized_name: 'replicationPairCount', + type: { + name: 'String' + } + }, + system_load: { + required: false, + serialized_name: 'systemLoad', + type: { + name: 'String' + } + }, + system_load_status: { + required: false, + serialized_name: 'systemLoadStatus', + type: { + name: 'String' + } + }, + cpu_load: { + required: false, + serialized_name: 'cpuLoad', + type: { + name: 'String' + } + }, + cpu_load_status: { + required: false, + serialized_name: 'cpuLoadStatus', + type: { + name: 'String' + } + }, + total_memory_in_bytes: { + required: false, + serialized_name: 'totalMemoryInBytes', + type: { + name: 'Number' + } + }, + available_memory_in_bytes: { + required: false, + serialized_name: 'availableMemoryInBytes', + type: { + name: 'Number' + } + }, + memory_usage_status: { + required: false, + serialized_name: 'memoryUsageStatus', + type: { + name: 'String' + } + }, + total_space_in_bytes: { + required: false, + serialized_name: 'totalSpaceInBytes', + type: { + name: 'Number' + } + }, + available_space_in_bytes: { + required: false, + serialized_name: 'availableSpaceInBytes', + type: { + name: 'Number' + } + }, + space_usage_status: { + required: false, + serialized_name: 'spaceUsageStatus', + type: { + name: 'String' + } + }, + ps_service_status: { + required: false, + serialized_name: 'psServiceStatus', + type: { + name: 'String' + } + }, + ssl_cert_expiry_date: { + required: false, + serialized_name: 'sslCertExpiryDate', + type: { + name: 'DateTime' + } + }, + ssl_cert_expiry_remaining_days: { + required: false, + serialized_name: 'sslCertExpiryRemainingDays', + type: { + name: 'Number' + } + }, + os_version: { + required: false, + serialized_name: 'osVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item.rb new file mode 100644 index 0000000000..f95f3e581f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication protected item + # + class ProtectableItem < Resource + + include MsRestAzure + + # @return [ProtectableItemProperties] The custom data. + attr_accessor :properties + + + # + # Mapper for ProtectableItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectableItem', + type: { + name: 'Composite', + class_name: 'ProtectableItem', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ProtectableItemProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_collection.rb new file mode 100644 index 0000000000..c4cf670a2c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protectable item collection. + # + class ProtectableItemCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The Protectable item details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [ProtectableItemCollection] 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 ProtectableItemCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectableItemCollection', + type: { + name: 'Composite', + class_name: 'ProtectableItemCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtectableItemElementType', + type: { + name: 'Composite', + class_name: 'ProtectableItem' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_properties.rb new file mode 100644 index 0000000000..b6e1f617ad --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication protected item custom data details. + # + class ProtectableItemProperties + + include MsRestAzure + + # @return [String] The name. + attr_accessor :friendly_name + + # @return [String] The protection status. + attr_accessor :protection_status + + # @return [String] The ARM resource of protected items. + attr_accessor :replication_protected_item_id + + # @return [String] The recovery provider ARM Id. + attr_accessor :recovery_services_provider_id + + # @return [Array] The Current protection readiness errors. + attr_accessor :protection_readiness_errors + + # @return [Array] The list of replication providers supported for + # the protectable item. + attr_accessor :supported_replication_providers + + # @return [ConfigurationSettings] The Replication provider custom + # settings. + attr_accessor :custom_details + + + # + # Mapper for ProtectableItemProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectableItemProperties', + type: { + name: 'Composite', + class_name: 'ProtectableItemProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + protection_status: { + required: false, + serialized_name: 'protectionStatus', + type: { + name: 'String' + } + }, + replication_protected_item_id: { + required: false, + serialized_name: 'replicationProtectedItemId', + type: { + name: 'String' + } + }, + recovery_services_provider_id: { + required: false, + serialized_name: 'recoveryServicesProviderId', + type: { + name: 'String' + } + }, + protection_readiness_errors: { + required: false, + serialized_name: 'protectionReadinessErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + supported_replication_providers: { + required: false, + serialized_name: 'supportedReplicationProviders', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + custom_details: { + required: false, + serialized_name: 'customDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ConfigurationSettings', + class_name: 'ConfigurationSettings' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protected_items_query_parameter.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protected_items_query_parameter.rb new file mode 100644 index 0000000000..ac37cb6fe5 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protected_items_query_parameter.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Query parameter to enumerate protected items. + # + class ProtectedItemsQueryParameter + + include MsRestAzure + + # @return [String] The source fabric name filter. + attr_accessor :source_fabric_name + + # @return [String] The recovery plan filter. + attr_accessor :recovery_plan_name + + # @return [String] The vCenter name filter. + attr_accessor :v_center_name + + + # + # Mapper for ProtectedItemsQueryParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectedItemsQueryParameter', + type: { + name: 'Composite', + class_name: 'ProtectedItemsQueryParameter', + model_properties: { + source_fabric_name: { + required: false, + serialized_name: 'sourceFabricName', + type: { + name: 'String' + } + }, + recovery_plan_name: { + required: false, + serialized_name: 'recoveryPlanName', + type: { + name: 'String' + } + }, + v_center_name: { + required: false, + serialized_name: 'vCenterName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container.rb new file mode 100644 index 0000000000..e6d5b874ec --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection container details. + # + class ProtectionContainer < Resource + + include MsRestAzure + + # @return [ProtectionContainerProperties] The custom data. + attr_accessor :properties + + + # + # Mapper for ProtectionContainer class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainer', + type: { + name: 'Composite', + class_name: 'ProtectionContainer', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ProtectionContainerProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_collection.rb new file mode 100644 index 0000000000..4285a1e71f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection Container collection. + # + class ProtectionContainerCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The Protection Container details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [ProtectionContainerCollection] 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 ProtectionContainerCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainerCollection', + type: { + name: 'Composite', + class_name: 'ProtectionContainerCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtectionContainerElementType', + type: { + name: 'Composite', + class_name: 'ProtectionContainer' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_fabric_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_fabric_specific_details.rb new file mode 100644 index 0000000000..1a1038867c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_fabric_specific_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Base class for fabric specific details of container. + # + class ProtectionContainerFabricSpecificDetails + + include MsRestAzure + + # @return [String] Gets the class type. Overriden in derived classes. + attr_accessor :instance_type + + + # + # Mapper for ProtectionContainerFabricSpecificDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainerFabricSpecificDetails', + type: { + name: 'Composite', + class_name: 'ProtectionContainerFabricSpecificDetails', + model_properties: { + instance_type: { + required: false, + read_only: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping.rb new file mode 100644 index 0000000000..fa3056295a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection container mapping object. + # + class ProtectionContainerMapping < Resource + + include MsRestAzure + + # @return [ProtectionContainerMappingProperties] The custom data. + attr_accessor :properties + + + # + # Mapper for ProtectionContainerMapping class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainerMapping', + type: { + name: 'Composite', + class_name: 'ProtectionContainerMapping', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ProtectionContainerMappingProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_collection.rb new file mode 100644 index 0000000000..0e5100a0cb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection container mapping collection class. + # + class ProtectionContainerMappingCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of container mappings. + attr_accessor :value + + # @return [String] Link to fetch rest of the data. + 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 [ProtectionContainerMappingCollection] 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 ProtectionContainerMappingCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainerMappingCollection', + type: { + name: 'Composite', + class_name: 'ProtectionContainerMappingCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProtectionContainerMappingElementType', + type: { + name: 'Composite', + class_name: 'ProtectionContainerMapping' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_properties.rb new file mode 100644 index 0000000000..894946f340 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection container mapping properties. + # + class ProtectionContainerMappingProperties + + include MsRestAzure + + # @return [String] Paired protection container ARM ID. + attr_accessor :target_protection_container_id + + # @return [String] Friendly name of paired container. + attr_accessor :target_protection_container_friendly_name + + # @return [ProtectionContainerMappingProviderSpecificDetails] Provider + # specific provider details. + attr_accessor :provider_specific_details + + # @return [String] Health of pairing. + attr_accessor :health + + # @return [Array] Health error. + attr_accessor :health_error_details + + # @return [String] Policy ARM Id. + attr_accessor :policy_id + + # @return [String] Association Status + attr_accessor :state + + # @return [String] Friendly name of source protection container. + attr_accessor :source_protection_container_friendly_name + + # @return [String] Friendly name of source fabric. + attr_accessor :source_fabric_friendly_name + + # @return [String] Friendly name of target fabric. + attr_accessor :target_fabric_friendly_name + + # @return [String] Friendly name of replication policy. + attr_accessor :policy_friendly_name + + + # + # Mapper for ProtectionContainerMappingProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainerMappingProperties', + type: { + name: 'Composite', + class_name: 'ProtectionContainerMappingProperties', + model_properties: { + target_protection_container_id: { + required: false, + serialized_name: 'targetProtectionContainerId', + type: { + name: 'String' + } + }, + target_protection_container_friendly_name: { + required: false, + serialized_name: 'targetProtectionContainerFriendlyName', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + class_name: 'ProtectionContainerMappingProviderSpecificDetails' + } + }, + health: { + required: false, + serialized_name: 'health', + type: { + name: 'String' + } + }, + health_error_details: { + required: false, + serialized_name: 'healthErrorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + policy_id: { + required: false, + serialized_name: 'policyId', + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'state', + type: { + name: 'String' + } + }, + source_protection_container_friendly_name: { + required: false, + serialized_name: 'sourceProtectionContainerFriendlyName', + type: { + name: 'String' + } + }, + source_fabric_friendly_name: { + required: false, + serialized_name: 'sourceFabricFriendlyName', + type: { + name: 'String' + } + }, + target_fabric_friendly_name: { + required: false, + serialized_name: 'targetFabricFriendlyName', + type: { + name: 'String' + } + }, + policy_friendly_name: { + required: false, + serialized_name: 'policyFriendlyName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_provider_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_provider_specific_details.rb new file mode 100644 index 0000000000..bba579e7e1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_provider_specific_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Container mapping provider specific details. + # + class ProtectionContainerMappingProviderSpecificDetails + + include MsRestAzure + + # @return [String] Gets the class type. Overriden in derived classes. + attr_accessor :instance_type + + + # + # Mapper for ProtectionContainerMappingProviderSpecificDetails class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainerMappingProviderSpecificDetails', + type: { + name: 'Composite', + class_name: 'ProtectionContainerMappingProviderSpecificDetails', + model_properties: { + instance_type: { + required: false, + read_only: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_properties.rb new file mode 100644 index 0000000000..9308200597 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Protection profile custom data details. + # + class ProtectionContainerProperties + + include MsRestAzure + + # @return [String] Fabric friendly name. + attr_accessor :fabric_friendly_name + + # @return [String] The name. + attr_accessor :friendly_name + + # @return [String] The fabric type. + attr_accessor :fabric_type + + # @return [Integer] Number of protected PEs + attr_accessor :protected_item_count + + # @return [String] The pairing status of this cloud. + attr_accessor :pairing_status + + # @return [String] The role of this cloud. + attr_accessor :role + + # @return [ProtectionContainerFabricSpecificDetails] Fabric specific + # details. + attr_accessor :fabric_specific_details + + + # + # Mapper for ProtectionContainerProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProtectionContainerProperties', + type: { + name: 'Composite', + class_name: 'ProtectionContainerProperties', + model_properties: { + fabric_friendly_name: { + required: false, + serialized_name: 'fabricFriendlyName', + type: { + name: 'String' + } + }, + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + fabric_type: { + required: false, + serialized_name: 'fabricType', + type: { + name: 'String' + } + }, + protected_item_count: { + required: false, + serialized_name: 'protectedItemCount', + type: { + name: 'Number' + } + }, + pairing_status: { + required: false, + serialized_name: 'pairingStatus', + type: { + name: 'String' + } + }, + role: { + required: false, + serialized_name: 'role', + type: { + name: 'String' + } + }, + fabric_specific_details: { + required: false, + serialized_name: 'fabricSpecificDetails', + type: { + name: 'Composite', + class_name: 'ProtectionContainerFabricSpecificDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_error.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_error.rb new file mode 100644 index 0000000000..fda1e57d84 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_error.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class contains the error details per object. + # + class ProviderError + + include MsRestAzure + + # @return [Integer] The Error code. + attr_accessor :error_code + + # @return [String] The Error message. + attr_accessor :error_message + + # @return [String] The Provider error Id. + attr_accessor :error_id + + # @return [String] The possible causes for the error. + attr_accessor :possible_causes + + # @return [String] The recommended action to resolve the error. + attr_accessor :recommended_action + + + # + # Mapper for ProviderError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProviderError', + type: { + name: 'Composite', + class_name: 'ProviderError', + model_properties: { + error_code: { + required: false, + serialized_name: 'errorCode', + type: { + name: 'Number' + } + }, + error_message: { + required: false, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + }, + error_id: { + required: false, + serialized_name: 'errorId', + type: { + name: 'String' + } + }, + possible_causes: { + required: false, + serialized_name: 'possibleCauses', + type: { + name: 'String' + } + }, + recommended_action: { + required: false, + serialized_name: 'recommendedAction', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_failover_input.rb new file mode 100644 index 0000000000..2b19fb2fb8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_failover_input.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific failover input. + # + class ProviderSpecificFailoverInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzureFailoverProviderInput" + @@discriminatorMap["HyperVReplicaAzureFailback"] = "HyperVReplicaAzureFailbackProviderInput" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2FailoverProviderInput" + @@discriminatorMap["InMage"] = "InMageFailoverProviderInput" + @@discriminatorMap["A2A"] = "A2AFailoverProviderInput" + + def initialize + @instanceType = "ProviderSpecificFailoverInput" + end + + attr_accessor :instanceType + + + # + # Mapper for ProviderSpecificFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProviderSpecificFailoverInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ProviderSpecificFailoverInput', + class_name: 'ProviderSpecificFailoverInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_recovery_point_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_recovery_point_details.rb new file mode 100644 index 0000000000..99f2429775 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_recovery_point_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication provider specific recovery point details. + # + class ProviderSpecificRecoveryPointDetails + + include MsRestAzure + + # @return [String] Gets the provider type. + attr_accessor :type + + + # + # Mapper for ProviderSpecificRecoveryPointDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProviderSpecificRecoveryPointDetails', + type: { + name: 'Composite', + class_name: 'ProviderSpecificRecoveryPointDetails', + model_properties: { + type: { + required: false, + read_only: true, + serialized_name: 'Type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rcm_azure_migration_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rcm_azure_migration_policy_details.rb new file mode 100644 index 0000000000..77dc05adca --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rcm_azure_migration_policy_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # RCM based Azure migration specific policy details. + # + class RcmAzureMigrationPolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "RcmAzureMigration" + end + + attr_accessor :instanceType + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The app consistent snapshot frequency in minutes. + attr_accessor :app_consistent_frequency_in_minutes + + # @return [MultiVmSyncStatus] A value indicating whether multi-VM sync + # has to be enabled. Possible values include: 'Enabled', 'Disabled' + attr_accessor :multi_vm_sync_status + + # @return [Integer] The crash consistent snapshot frequency in minutes. + attr_accessor :crash_consistent_frequency_in_minutes + + + # + # Mapper for RcmAzureMigrationPolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RcmAzureMigration', + type: { + name: 'Composite', + class_name: 'RcmAzureMigrationPolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + multi_vm_sync_status: { + required: false, + serialized_name: 'multiVmSyncStatus', + type: { + name: 'Enum', + module: 'MultiVmSyncStatus' + } + }, + crash_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'crashConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan.rb new file mode 100644 index 0000000000..ffd23d2c3a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan details. + # + class RecoveryPlan < Resource + + include MsRestAzure + + # @return [RecoveryPlanProperties] The custom details. + attr_accessor :properties + + + # + # Mapper for RecoveryPlan class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlan', + type: { + name: 'Composite', + class_name: 'RecoveryPlan', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_a2afailover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_a2afailover_input.rb new file mode 100644 index 0000000000..271c126fc1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_a2afailover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan A2A failover input. + # + class RecoveryPlanA2AFailoverInput < RecoveryPlanProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "A2A" + end + + attr_accessor :instanceType + + # @return [A2ARpRecoveryPointType] The recovery point type. Possible + # values include: 'Latest', 'LatestApplicationConsistent', + # 'LatestCrashConsistent', 'LatestProcessed' + attr_accessor :recovery_point_type + + # @return [String] A value indicating whether to use recovery cloud + # service for TFO or not. + attr_accessor :cloud_service_creation_option + + + # + # Mapper for RecoveryPlanA2AFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'A2A', + type: { + name: 'Composite', + class_name: 'RecoveryPlanA2AFailoverInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_type: { + required: true, + serialized_name: 'recoveryPointType', + type: { + name: 'Enum', + module: 'A2ARpRecoveryPointType' + } + }, + cloud_service_creation_option: { + required: false, + serialized_name: 'cloudServiceCreationOption', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action.rb new file mode 100644 index 0000000000..93a4bb4202 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan action details. + # + class RecoveryPlanAction + + include MsRestAzure + + # @return [String] The action name. + attr_accessor :action_name + + # @return [Array] The list of failover + # types. + attr_accessor :failover_types + + # @return [Array] The list of failover + # directions. + attr_accessor :failover_directions + + # @return [RecoveryPlanActionDetails] The custom details. + attr_accessor :custom_details + + + # + # Mapper for RecoveryPlanAction class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanAction', + type: { + name: 'Composite', + class_name: 'RecoveryPlanAction', + model_properties: { + action_name: { + required: true, + serialized_name: 'actionName', + type: { + name: 'String' + } + }, + failover_types: { + required: true, + serialized_name: 'failoverTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ReplicationProtectedItemOperationElementType', + type: { + name: 'Enum', + module: 'ReplicationProtectedItemOperation' + } + } + } + }, + failover_directions: { + required: true, + serialized_name: 'failoverDirections', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PossibleOperationsDirectionsElementType', + type: { + name: 'Enum', + module: 'PossibleOperationsDirections' + } + } + } + }, + custom_details: { + required: true, + serialized_name: 'customDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'RecoveryPlanActionDetails', + class_name: 'RecoveryPlanActionDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_details.rb new file mode 100644 index 0000000000..9914c3e901 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan action custom details. + # + class RecoveryPlanActionDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["ScriptActionDetails"] = "RecoveryPlanScriptActionDetails" + @@discriminatorMap["AutomationRunbookActionDetails"] = "RecoveryPlanAutomationRunbookActionDetails" + @@discriminatorMap["ManualActionDetails"] = "RecoveryPlanManualActionDetails" + + def initialize + @instanceType = "RecoveryPlanActionDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for RecoveryPlanActionDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanActionDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'RecoveryPlanActionDetails', + class_name: 'RecoveryPlanActionDetails', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_location.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_location.rb new file mode 100644 index 0000000000..8ada7e51b5 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_location.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for RecoveryPlanActionLocation + # + module RecoveryPlanActionLocation + Primary = "Primary" + Recovery = "Recovery" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_automation_runbook_action_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_automation_runbook_action_details.rb new file mode 100644 index 0000000000..2ce2b5fa43 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_automation_runbook_action_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan Automation runbook action details. + # + class RecoveryPlanAutomationRunbookActionDetails < RecoveryPlanActionDetails + + include MsRestAzure + + + def initialize + @instanceType = "AutomationRunbookActionDetails" + end + + attr_accessor :instanceType + + # @return [String] The runbook ARM Id. + attr_accessor :runbook_id + + # @return [String] The runbook timeout. + attr_accessor :timeout + + # @return [RecoveryPlanActionLocation] The fabric location. Possible + # values include: 'Primary', 'Recovery' + attr_accessor :fabric_location + + + # + # Mapper for RecoveryPlanAutomationRunbookActionDetails class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AutomationRunbookActionDetails', + type: { + name: 'Composite', + class_name: 'RecoveryPlanAutomationRunbookActionDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + runbook_id: { + required: false, + serialized_name: 'runbookId', + type: { + name: 'String' + } + }, + timeout: { + required: false, + serialized_name: 'timeout', + type: { + name: 'String' + } + }, + fabric_location: { + required: true, + serialized_name: 'fabricLocation', + type: { + name: 'Enum', + module: 'RecoveryPlanActionLocation' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_collection.rb new file mode 100644 index 0000000000..faf5471efb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan collection details. + # + class RecoveryPlanCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of recovery plans. + attr_accessor :value + + # @return [String] The value of next link. + 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 [RecoveryPlanCollection] 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 RecoveryPlanCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanCollection', + type: { + name: 'Composite', + class_name: 'RecoveryPlanCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPlan' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group.rb new file mode 100644 index 0000000000..695aeee8de --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan group details. + # + class RecoveryPlanGroup + + include MsRestAzure + + # @return [RecoveryPlanGroupType] The group type. Possible values + # include: 'Shutdown', 'Boot', 'Failover' + attr_accessor :group_type + + # @return [Array] The list of protected items. + attr_accessor :replication_protected_items + + # @return [Array] The start group actions. + attr_accessor :start_group_actions + + # @return [Array] The end group actions. + attr_accessor :end_group_actions + + + # + # Mapper for RecoveryPlanGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanGroup', + type: { + name: 'Composite', + class_name: 'RecoveryPlanGroup', + model_properties: { + group_type: { + required: true, + serialized_name: 'groupType', + type: { + name: 'Enum', + module: 'RecoveryPlanGroupType' + } + }, + replication_protected_items: { + required: false, + serialized_name: 'replicationProtectedItems', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanProtectedItemElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPlanProtectedItem' + } + } + } + }, + start_group_actions: { + required: false, + serialized_name: 'startGroupActions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanActionElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPlanAction' + } + } + } + }, + end_group_actions: { + required: false, + serialized_name: 'endGroupActions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanActionElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPlanAction' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_task_details.rb new file mode 100644 index 0000000000..4659e77fc2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the recovery plan group task. + # + class RecoveryPlanGroupTaskDetails < GroupTaskDetails + + include MsRestAzure + + + def initialize + @instanceType = "RecoveryPlanGroupTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] The name. + attr_accessor :name + + # @return [String] The group identifier. + attr_accessor :group_id + + # @return [String] The group type. + attr_accessor :rp_group_type + + + # + # Mapper for RecoveryPlanGroupTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanGroupTaskDetails', + type: { + name: 'Composite', + class_name: 'RecoveryPlanGroupTaskDetails', + model_properties: { + child_tasks: { + required: false, + serialized_name: 'childTasks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ASRTaskElementType', + type: { + name: 'Composite', + class_name: 'ASRTask' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + group_id: { + required: false, + serialized_name: 'groupId', + type: { + name: 'String' + } + }, + rp_group_type: { + required: false, + serialized_name: 'rpGroupType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_type.rb new file mode 100644 index 0000000000..ce66773185 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for RecoveryPlanGroupType + # + module RecoveryPlanGroupType + Shutdown = "Shutdown" + Boot = "Boot" + Failover = "Failover" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failback_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failback_input.rb new file mode 100644 index 0000000000..ca0750d5fb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failback_input.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan HVR Azure failback input. + # + class RecoveryPlanHyperVReplicaAzureFailbackInput < RecoveryPlanProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzureFailback" + end + + attr_accessor :instanceType + + # @return [DataSyncStatus] The data sync option. Possible values include: + # 'ForDownTime', 'ForSynchronization' + attr_accessor :data_sync_option + + # @return [AlternateLocationRecoveryOption] The ALR option. Possible + # values include: 'CreateVmIfNotFound', 'NoAction' + attr_accessor :recovery_vm_creation_option + + + # + # Mapper for RecoveryPlanHyperVReplicaAzureFailbackInput class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzureFailback', + type: { + name: 'Composite', + class_name: 'RecoveryPlanHyperVReplicaAzureFailbackInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + data_sync_option: { + required: true, + serialized_name: 'dataSyncOption', + type: { + name: 'Enum', + module: 'DataSyncStatus' + } + }, + recovery_vm_creation_option: { + required: true, + serialized_name: 'recoveryVmCreationOption', + type: { + name: 'Enum', + module: 'AlternateLocationRecoveryOption' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failover_input.rb new file mode 100644 index 0000000000..b7b209a937 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan HVR Azure failover input. + # + class RecoveryPlanHyperVReplicaAzureFailoverInput < RecoveryPlanProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "HyperVReplicaAzure" + end + + attr_accessor :instanceType + + # @return [String] The vault location. + attr_accessor :vault_location + + # @return [String] The primary KEK certificate PFX. + attr_accessor :primary_kek_certificate_pfx + + # @return [String] The secondary KEK certificate PFX. + attr_accessor :secondary_kek_certificate_pfx + + # @return [HyperVReplicaAzureRpRecoveryPointType] The recovery point + # type. Possible values include: 'Latest', 'LatestApplicationConsistent', + # 'LatestProcessed' + attr_accessor :recovery_point_type + + + # + # Mapper for RecoveryPlanHyperVReplicaAzureFailoverInput class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HyperVReplicaAzure', + type: { + name: 'Composite', + class_name: 'RecoveryPlanHyperVReplicaAzureFailoverInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vault_location: { + required: true, + serialized_name: 'vaultLocation', + type: { + name: 'String' + } + }, + primary_kek_certificate_pfx: { + required: false, + serialized_name: 'primaryKekCertificatePfx', + type: { + name: 'String' + } + }, + secondary_kek_certificate_pfx: { + required: false, + serialized_name: 'secondaryKekCertificatePfx', + type: { + name: 'String' + } + }, + recovery_point_type: { + required: false, + serialized_name: 'recoveryPointType', + type: { + name: 'Enum', + module: 'HyperVReplicaAzureRpRecoveryPointType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_azure_v2failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_azure_v2failover_input.rb new file mode 100644 index 0000000000..a857d9d28a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_azure_v2failover_input.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan InMageAzureV2 failover input. + # + class RecoveryPlanInMageAzureV2FailoverInput < RecoveryPlanProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "InMageAzureV2" + end + + attr_accessor :instanceType + + # @return [String] The vault location. + attr_accessor :vault_location + + # @return [InMageV2RpRecoveryPointType] The recovery point type. Possible + # values include: 'Latest', 'LatestApplicationConsistent', + # 'LatestCrashConsistent', 'LatestProcessed' + attr_accessor :recovery_point_type + + # @return [String] A value indicating whether multi VM sync enabled VMs + # should use multi VM sync points for failover. + attr_accessor :use_multi_vm_sync_point + + + # + # Mapper for RecoveryPlanInMageAzureV2FailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMageAzureV2', + type: { + name: 'Composite', + class_name: 'RecoveryPlanInMageAzureV2FailoverInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vault_location: { + required: true, + serialized_name: 'vaultLocation', + type: { + name: 'String' + } + }, + recovery_point_type: { + required: true, + serialized_name: 'recoveryPointType', + type: { + name: 'Enum', + module: 'InMageV2RpRecoveryPointType' + } + }, + use_multi_vm_sync_point: { + required: false, + serialized_name: 'useMultiVmSyncPoint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_failover_input.rb new file mode 100644 index 0000000000..de7487c3ea --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan InMage failover input. + # + class RecoveryPlanInMageFailoverInput < RecoveryPlanProviderSpecificFailoverInput + + include MsRestAzure + + + def initialize + @instanceType = "InMage" + end + + attr_accessor :instanceType + + # @return [RpInMageRecoveryPointType] The recovery point type. Possible + # values include: 'LatestTime', 'LatestTag', 'Custom' + attr_accessor :recovery_point_type + + + # + # Mapper for RecoveryPlanInMageFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InMage', + type: { + name: 'Composite', + class_name: 'RecoveryPlanInMageFailoverInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_type: { + required: true, + serialized_name: 'recoveryPointType', + type: { + name: 'Enum', + module: 'RpInMageRecoveryPointType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_manual_action_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_manual_action_details.rb new file mode 100644 index 0000000000..74ef926765 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_manual_action_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan manual action details. + # + class RecoveryPlanManualActionDetails < RecoveryPlanActionDetails + + include MsRestAzure + + + def initialize + @instanceType = "ManualActionDetails" + end + + attr_accessor :instanceType + + # @return [String] The manual action description. + attr_accessor :description + + + # + # Mapper for RecoveryPlanManualActionDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManualActionDetails', + type: { + name: 'Composite', + class_name: 'RecoveryPlanManualActionDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input.rb new file mode 100644 index 0000000000..bac89a3f90 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan planned failover input. + # + class RecoveryPlanPlannedFailoverInput + + include MsRestAzure + + # @return [RecoveryPlanPlannedFailoverInputProperties] The recovery plan + # planned failover input properties. + attr_accessor :properties + + + # + # Mapper for RecoveryPlanPlannedFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanPlannedFailoverInput', + type: { + name: 'Composite', + class_name: 'RecoveryPlanPlannedFailoverInput', + model_properties: { + properties: { + required: true, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanPlannedFailoverInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input_properties.rb new file mode 100644 index 0000000000..2050747430 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan planned failover input properties. + # + class RecoveryPlanPlannedFailoverInputProperties + + include MsRestAzure + + # @return [PossibleOperationsDirections] The failover direction. Possible + # values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + attr_accessor :failover_direction + + # @return [Array] The provider + # specific properties. + attr_accessor :provider_specific_details + + + # + # Mapper for RecoveryPlanPlannedFailoverInputProperties class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanPlannedFailoverInputProperties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanPlannedFailoverInputProperties', + model_properties: { + failover_direction: { + required: true, + serialized_name: 'failoverDirection', + type: { + name: 'Enum', + module: 'PossibleOperationsDirections' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanProviderSpecificFailoverInputElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'RecoveryPlanProviderSpecificFailoverInput', + class_name: 'RecoveryPlanProviderSpecificFailoverInput' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_properties.rb new file mode 100644 index 0000000000..444ed2994d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_properties.rb @@ -0,0 +1,207 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan custom details. + # + class RecoveryPlanProperties + + include MsRestAzure + + # @return [String] The friendly name. + attr_accessor :friendly_name + + # @return [String] The primary fabric Id. + attr_accessor :primary_fabric_id + + # @return [String] The primary fabric friendly name. + attr_accessor :primary_fabric_friendly_name + + # @return [String] The recovery fabric Id. + attr_accessor :recovery_fabric_id + + # @return [String] The recovery fabric friendly name. + attr_accessor :recovery_fabric_friendly_name + + # @return [String] The failover deployment model. + attr_accessor :failover_deployment_model + + # @return [Array] The list of replication providers. + attr_accessor :replication_providers + + # @return [Array] The list of allowed operations. + attr_accessor :allowed_operations + + # @return [DateTime] The start time of the last planned failover. + attr_accessor :last_planned_failover_time + + # @return [DateTime] The start time of the last unplanned failover. + attr_accessor :last_unplanned_failover_time + + # @return [DateTime] The start time of the last test failover. + attr_accessor :last_test_failover_time + + # @return [CurrentScenarioDetails] The current scenario details. + attr_accessor :current_scenario + + # @return [String] The recovery plan status. + attr_accessor :current_scenario_status + + # @return [String] The recovery plan status description. + attr_accessor :current_scenario_status_description + + # @return [Array] The recovery plan groups. + attr_accessor :groups + + + # + # Mapper for RecoveryPlanProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanProperties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + primary_fabric_id: { + required: false, + serialized_name: 'primaryFabricId', + type: { + name: 'String' + } + }, + primary_fabric_friendly_name: { + required: false, + serialized_name: 'primaryFabricFriendlyName', + type: { + name: 'String' + } + }, + recovery_fabric_id: { + required: false, + serialized_name: 'recoveryFabricId', + type: { + name: 'String' + } + }, + recovery_fabric_friendly_name: { + required: false, + serialized_name: 'recoveryFabricFriendlyName', + type: { + name: 'String' + } + }, + failover_deployment_model: { + required: false, + serialized_name: 'failoverDeploymentModel', + type: { + name: 'String' + } + }, + replication_providers: { + required: false, + serialized_name: 'replicationProviders', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + allowed_operations: { + required: false, + serialized_name: 'allowedOperations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + last_planned_failover_time: { + required: false, + serialized_name: 'lastPlannedFailoverTime', + type: { + name: 'DateTime' + } + }, + last_unplanned_failover_time: { + required: false, + serialized_name: 'lastUnplannedFailoverTime', + type: { + name: 'DateTime' + } + }, + last_test_failover_time: { + required: false, + serialized_name: 'lastTestFailoverTime', + type: { + name: 'DateTime' + } + }, + current_scenario: { + required: false, + serialized_name: 'currentScenario', + type: { + name: 'Composite', + class_name: 'CurrentScenarioDetails' + } + }, + current_scenario_status: { + required: false, + serialized_name: 'currentScenarioStatus', + type: { + name: 'String' + } + }, + current_scenario_status_description: { + required: false, + serialized_name: 'currentScenarioStatusDescription', + type: { + name: 'String' + } + }, + groups: { + required: false, + serialized_name: 'groups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanGroupElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPlanGroup' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_protected_item.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_protected_item.rb new file mode 100644 index 0000000000..198f9f3c88 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_protected_item.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan protected item. + # + class RecoveryPlanProtectedItem + + include MsRestAzure + + # @return [String] The ARM Id of the recovery plan protected item. + attr_accessor :id + + # @return [String] The virtual machine Id. + attr_accessor :virtual_machine_id + + + # + # Mapper for RecoveryPlanProtectedItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanProtectedItem', + type: { + name: 'Composite', + class_name: 'RecoveryPlanProtectedItem', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + virtual_machine_id: { + required: false, + serialized_name: 'virtualMachineId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_provider_specific_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_provider_specific_failover_input.rb new file mode 100644 index 0000000000..04a1870ab7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_provider_specific_failover_input.rb @@ -0,0 +1,50 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan provider specific failover input base class. + # + class RecoveryPlanProviderSpecificFailoverInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "RecoveryPlanHyperVReplicaAzureFailoverInput" + @@discriminatorMap["HyperVReplicaAzureFailback"] = "RecoveryPlanHyperVReplicaAzureFailbackInput" + @@discriminatorMap["InMageAzureV2"] = "RecoveryPlanInMageAzureV2FailoverInput" + @@discriminatorMap["InMage"] = "RecoveryPlanInMageFailoverInput" + @@discriminatorMap["A2A"] = "RecoveryPlanA2AFailoverInput" + + def initialize + @instanceType = "RecoveryPlanProviderSpecificFailoverInput" + end + + attr_accessor :instanceType + + + # + # Mapper for RecoveryPlanProviderSpecificFailoverInput class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanProviderSpecificFailoverInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'RecoveryPlanProviderSpecificFailoverInput', + class_name: 'RecoveryPlanProviderSpecificFailoverInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_script_action_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_script_action_details.rb new file mode 100644 index 0000000000..d2b562de57 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_script_action_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan script action details. + # + class RecoveryPlanScriptActionDetails < RecoveryPlanActionDetails + + include MsRestAzure + + + def initialize + @instanceType = "ScriptActionDetails" + end + + attr_accessor :instanceType + + # @return [String] The script path. + attr_accessor :path + + # @return [String] The script timeout. + attr_accessor :timeout + + # @return [RecoveryPlanActionLocation] The fabric location. Possible + # values include: 'Primary', 'Recovery' + attr_accessor :fabric_location + + + # + # Mapper for RecoveryPlanScriptActionDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ScriptActionDetails', + type: { + name: 'Composite', + class_name: 'RecoveryPlanScriptActionDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + path: { + required: true, + serialized_name: 'path', + type: { + name: 'String' + } + }, + timeout: { + required: false, + serialized_name: 'timeout', + type: { + name: 'String' + } + }, + fabric_location: { + required: true, + serialized_name: 'fabricLocation', + type: { + name: 'Enum', + module: 'RecoveryPlanActionLocation' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_shutdown_group_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_shutdown_group_task_details.rb new file mode 100644 index 0000000000..eac4907029 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_shutdown_group_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the recovery plan shutdown group task details. + # + class RecoveryPlanShutdownGroupTaskDetails < GroupTaskDetails + + include MsRestAzure + + + def initialize + @instanceType = "RecoveryPlanShutdownGroupTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] The name. + attr_accessor :name + + # @return [String] The group identifier. + attr_accessor :group_id + + # @return [String] The group type. + attr_accessor :rp_group_type + + + # + # Mapper for RecoveryPlanShutdownGroupTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanShutdownGroupTaskDetails', + type: { + name: 'Composite', + class_name: 'RecoveryPlanShutdownGroupTaskDetails', + model_properties: { + child_tasks: { + required: false, + serialized_name: 'childTasks', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ASRTaskElementType', + type: { + name: 'Composite', + class_name: 'ASRTask' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + group_id: { + required: false, + serialized_name: 'groupId', + type: { + name: 'String' + } + }, + rp_group_type: { + required: false, + serialized_name: 'rpGroupType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input.rb new file mode 100644 index 0000000000..8d22351bca --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan test failover cleanup input. + # + class RecoveryPlanTestFailoverCleanupInput + + include MsRestAzure + + # @return [RecoveryPlanTestFailoverCleanupInputProperties] The recovery + # plan test failover cleanup input properties. + attr_accessor :properties + + + # + # Mapper for RecoveryPlanTestFailoverCleanupInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanTestFailoverCleanupInput', + type: { + name: 'Composite', + class_name: 'RecoveryPlanTestFailoverCleanupInput', + model_properties: { + properties: { + required: true, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanTestFailoverCleanupInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input_properties.rb new file mode 100644 index 0000000000..8080035a80 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan test failover cleanup input properties. + # + class RecoveryPlanTestFailoverCleanupInputProperties + + include MsRestAzure + + # @return [String] The test failover cleanup comments. + attr_accessor :comments + + + # + # Mapper for RecoveryPlanTestFailoverCleanupInputProperties class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanTestFailoverCleanupInputProperties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanTestFailoverCleanupInputProperties', + model_properties: { + comments: { + required: false, + serialized_name: 'comments', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input.rb new file mode 100644 index 0000000000..a30fa4daa8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan test failover input. + # + class RecoveryPlanTestFailoverInput + + include MsRestAzure + + # @return [RecoveryPlanTestFailoverInputProperties] The recovery plan + # test failover input properties. + attr_accessor :properties + + + # + # Mapper for RecoveryPlanTestFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanTestFailoverInput', + type: { + name: 'Composite', + class_name: 'RecoveryPlanTestFailoverInput', + model_properties: { + properties: { + required: true, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanTestFailoverInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input_properties.rb new file mode 100644 index 0000000000..faf558d244 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan test failover input properties. + # + class RecoveryPlanTestFailoverInputProperties + + include MsRestAzure + + # @return [PossibleOperationsDirections] The failover direction. Possible + # values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + attr_accessor :failover_direction + + # @return [String] The network type to be used for test failover. + attr_accessor :network_type + + # @return [String] The Id of the network to be used for test failover. + attr_accessor :network_id + + # @return [String] A value indicating whether the test failover cleanup + # is to be skipped. + attr_accessor :skip_test_failover_cleanup + + # @return [Array] The provider + # specific properties. + attr_accessor :provider_specific_details + + + # + # Mapper for RecoveryPlanTestFailoverInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanTestFailoverInputProperties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanTestFailoverInputProperties', + model_properties: { + failover_direction: { + required: true, + serialized_name: 'failoverDirection', + type: { + name: 'Enum', + module: 'PossibleOperationsDirections' + } + }, + network_type: { + required: true, + serialized_name: 'networkType', + type: { + name: 'String' + } + }, + network_id: { + required: false, + serialized_name: 'networkId', + type: { + name: 'String' + } + }, + skip_test_failover_cleanup: { + required: false, + serialized_name: 'skipTestFailoverCleanup', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanProviderSpecificFailoverInputElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'RecoveryPlanProviderSpecificFailoverInput', + class_name: 'RecoveryPlanProviderSpecificFailoverInput' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input.rb new file mode 100644 index 0000000000..53b34626c4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan unplanned failover input. + # + class RecoveryPlanUnplannedFailoverInput + + include MsRestAzure + + # @return [RecoveryPlanUnplannedFailoverInputProperties] The recovery + # plan unplanned failover input properties. + attr_accessor :properties + + + # + # Mapper for RecoveryPlanUnplannedFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanUnplannedFailoverInput', + type: { + name: 'Composite', + class_name: 'RecoveryPlanUnplannedFailoverInput', + model_properties: { + properties: { + required: true, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanUnplannedFailoverInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input_properties.rb new file mode 100644 index 0000000000..59dfdb8c6e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan unplanned failover input properties. + # + class RecoveryPlanUnplannedFailoverInputProperties + + include MsRestAzure + + # @return [PossibleOperationsDirections] The failover direction. Possible + # values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + attr_accessor :failover_direction + + # @return [SourceSiteOperations] A value indicating whether source site + # operations are required. Possible values include: 'Required', + # 'NotRequired' + attr_accessor :source_site_operations + + # @return [Array] The provider + # specific properties. + attr_accessor :provider_specific_details + + + # + # Mapper for RecoveryPlanUnplannedFailoverInputProperties class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPlanUnplannedFailoverInputProperties', + type: { + name: 'Composite', + class_name: 'RecoveryPlanUnplannedFailoverInputProperties', + model_properties: { + failover_direction: { + required: true, + serialized_name: 'failoverDirection', + type: { + name: 'Enum', + module: 'PossibleOperationsDirections' + } + }, + source_site_operations: { + required: true, + serialized_name: 'sourceSiteOperations', + type: { + name: 'Enum', + module: 'SourceSiteOperations' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanProviderSpecificFailoverInputElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'RecoveryPlanProviderSpecificFailoverInput', + class_name: 'RecoveryPlanProviderSpecificFailoverInput' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point.rb new file mode 100644 index 0000000000..8d34334839 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Base class representing a recovery point. + # + class RecoveryPoint < Resource + + include MsRestAzure + + # @return [RecoveryPointProperties] Recovery point related data. + attr_accessor :properties + + + # + # Mapper for RecoveryPoint class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPoint', + type: { + name: 'Composite', + class_name: 'RecoveryPoint', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RecoveryPointProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_collection.rb new file mode 100644 index 0000000000..81f9d19c11 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of recovery point details. + # + class RecoveryPointCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The recovery point details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [RecoveryPointCollection] 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 RecoveryPointCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPointCollection', + type: { + name: 'Composite', + class_name: 'RecoveryPointCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPointElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPoint' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_properties.rb new file mode 100644 index 0000000000..aa618c218b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery point properties. + # + class RecoveryPointProperties + + include MsRestAzure + + # @return [DateTime] The recovery point time. + attr_accessor :recovery_point_time + + # @return [String] The recovery point type: ApplicationConsistent, + # CrashConsistent. + attr_accessor :recovery_point_type + + # @return [ProviderSpecificRecoveryPointDetails] The provider specific + # details for the recovery point. + attr_accessor :provider_specific_details + + + # + # Mapper for RecoveryPointProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryPointProperties', + type: { + name: 'Composite', + class_name: 'RecoveryPointProperties', + model_properties: { + recovery_point_time: { + required: false, + serialized_name: 'recoveryPointTime', + type: { + name: 'DateTime' + } + }, + recovery_point_type: { + required: false, + serialized_name: 'recoveryPointType', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + class_name: 'ProviderSpecificRecoveryPointDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_type.rb new file mode 100644 index 0000000000..f5b1899796 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for RecoveryPointType + # + module RecoveryPointType + LatestTime = "LatestTime" + LatestTag = "LatestTag" + Custom = "Custom" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider.rb new file mode 100644 index 0000000000..d12d451397 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider details. + # + class RecoveryServicesProvider < Resource + + include MsRestAzure + + # @return [RecoveryServicesProviderProperties] Provider properties. + attr_accessor :properties + + + # + # Mapper for RecoveryServicesProvider class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryServicesProvider', + type: { + name: 'Composite', + class_name: 'RecoveryServicesProvider', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RecoveryServicesProviderProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_collection.rb new file mode 100644 index 0000000000..ab0db73920 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of providers. + # + class RecoveryServicesProviderCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The Servers details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [RecoveryServicesProviderCollection] 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 RecoveryServicesProviderCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryServicesProviderCollection', + type: { + name: 'Composite', + class_name: 'RecoveryServicesProviderCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryServicesProviderElementType', + type: { + name: 'Composite', + class_name: 'RecoveryServicesProvider' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_properties.rb new file mode 100644 index 0000000000..ebf9866c4a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_properties.rb @@ -0,0 +1,191 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery services provider properties. + # + class RecoveryServicesProviderProperties + + include MsRestAzure + + # @return [String] Type of the site. + attr_accessor :fabric_type + + # @return [String] Friendly name of the DRA. + attr_accessor :friendly_name + + # @return [String] The provider version. + attr_accessor :provider_version + + # @return [String] The fabric provider. + attr_accessor :server_version + + # @return [String] DRA version status. + attr_accessor :provider_version_state + + # @return [DateTime] Expiry date if the version is deprecated. + attr_accessor :provider_version_expiry_date + + # @return [String] The fabric friendly name. + attr_accessor :fabric_friendly_name + + # @return [DateTime] Time when last heartbeat was sent by the DRA. + attr_accessor :last_heart_beat + + # @return [String] A value indicating whether DRA is responsive. + attr_accessor :connection_status + + # @return [Integer] Number of protected VMs currently managed by the DRA. + attr_accessor :protected_item_count + + # @return [Array] The scenarios allowed on this provider. + attr_accessor :allowed_scenarios + + # @return [Array] The recovery services provider health + # error details. + attr_accessor :health_error_details + + # @return [String] The DRA Id. + attr_accessor :dra_identifier + + # @return [IdentityInformation] The identity details. + attr_accessor :identity_details + + + # + # Mapper for RecoveryServicesProviderProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RecoveryServicesProviderProperties', + type: { + name: 'Composite', + class_name: 'RecoveryServicesProviderProperties', + model_properties: { + fabric_type: { + required: false, + serialized_name: 'fabricType', + type: { + name: 'String' + } + }, + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + provider_version: { + required: false, + serialized_name: 'providerVersion', + type: { + name: 'String' + } + }, + server_version: { + required: false, + serialized_name: 'serverVersion', + type: { + name: 'String' + } + }, + provider_version_state: { + required: false, + serialized_name: 'providerVersionState', + type: { + name: 'String' + } + }, + provider_version_expiry_date: { + required: false, + serialized_name: 'providerVersionExpiryDate', + type: { + name: 'DateTime' + } + }, + fabric_friendly_name: { + required: false, + serialized_name: 'fabricFriendlyName', + type: { + name: 'String' + } + }, + last_heart_beat: { + required: false, + serialized_name: 'lastHeartBeat', + type: { + name: 'DateTime' + } + }, + connection_status: { + required: false, + serialized_name: 'connectionStatus', + type: { + name: 'String' + } + }, + protected_item_count: { + required: false, + serialized_name: 'protectedItemCount', + type: { + name: 'Number' + } + }, + allowed_scenarios: { + required: false, + serialized_name: 'allowedScenarios', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + health_error_details: { + required: false, + serialized_name: 'healthErrorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + dra_identifier: { + required: false, + serialized_name: 'draIdentifier', + type: { + name: 'String' + } + }, + identity_details: { + required: false, + serialized_name: 'identityDetails', + type: { + name: 'Composite', + class_name: 'IdentityInformation' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input.rb new file mode 100644 index 0000000000..f6ef3ece18 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Container unpairing input. + # + class RemoveProtectionContainerMappingInput + + include MsRestAzure + + # @return [RemoveProtectionContainerMappingInputProperties] Configure + # protection input properties. + attr_accessor :properties + + + # + # Mapper for RemoveProtectionContainerMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RemoveProtectionContainerMappingInput', + type: { + name: 'Composite', + class_name: 'RemoveProtectionContainerMappingInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RemoveProtectionContainerMappingInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input_properties.rb new file mode 100644 index 0000000000..2e922080f4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Unpairing input properties. + # + class RemoveProtectionContainerMappingInputProperties + + include MsRestAzure + + # @return [ReplicationProviderContainerUnmappingInput] Provider specific + # input for unpairing. + attr_accessor :provider_specific_input + + + # + # Mapper for RemoveProtectionContainerMappingInputProperties class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RemoveProtectionContainerMappingInputProperties', + type: { + name: 'Composite', + class_name: 'RemoveProtectionContainerMappingInputProperties', + model_properties: { + provider_specific_input: { + required: false, + serialized_name: 'providerSpecificInput', + type: { + name: 'Composite', + class_name: 'ReplicationProviderContainerUnmappingInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input.rb new file mode 100644 index 0000000000..c48a46d904 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Certificate renewal input. + # + class RenewCertificateInput + + include MsRestAzure + + # @return [RenewCertificateInputProperties] Renew certificate input + # properties. + attr_accessor :properties + + + # + # Mapper for RenewCertificateInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RenewCertificateInput', + type: { + name: 'Composite', + class_name: 'RenewCertificateInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'RenewCertificateInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input_properties.rb new file mode 100644 index 0000000000..1287e604eb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Renew Certificate input properties. + # + class RenewCertificateInputProperties + + include MsRestAzure + + # @return [String] Renew certificate type. + attr_accessor :renew_certificate_type + + + # + # Mapper for RenewCertificateInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RenewCertificateInputProperties', + type: { + name: 'Composite', + class_name: 'RenewCertificateInputProperties', + model_properties: { + renew_certificate_type: { + required: false, + serialized_name: 'renewCertificateType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_group_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_group_details.rb new file mode 100644 index 0000000000..59e7b6b989 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_group_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication group details. This will be used in case of San and Wvr. + # + class ReplicationGroupDetails < ConfigurationSettings + + include MsRestAzure + + + def initialize + @instanceType = "ReplicationGroupDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for ReplicationGroupDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationGroupDetails', + type: { + name: 'Composite', + class_name: 'ReplicationGroupDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item.rb new file mode 100644 index 0000000000..1ee09901fc --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication protected item. + # + class ReplicationProtectedItem < Resource + + include MsRestAzure + + # @return [ReplicationProtectedItemProperties] The custom data. + attr_accessor :properties + + + # + # Mapper for ReplicationProtectedItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationProtectedItem', + type: { + name: 'Composite', + class_name: 'ReplicationProtectedItem', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ReplicationProtectedItemProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_collection.rb new file mode 100644 index 0000000000..092fb9b4c1 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_collection.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication protected item collection. + # + class ReplicationProtectedItemCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The Replication protected + # item details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [ReplicationProtectedItemCollection] 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 ReplicationProtectedItemCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationProtectedItemCollection', + type: { + name: 'Composite', + class_name: 'ReplicationProtectedItemCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ReplicationProtectedItemElementType', + type: { + name: 'Composite', + class_name: 'ReplicationProtectedItem' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_operation.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_operation.rb new file mode 100644 index 0000000000..d563cd344f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_operation.rb @@ -0,0 +1,27 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for ReplicationProtectedItemOperation + # + module ReplicationProtectedItemOperation + ReverseReplicate = "ReverseReplicate" + Commit = "Commit" + PlannedFailover = "PlannedFailover" + UnplannedFailover = "UnplannedFailover" + DisableProtection = "DisableProtection" + TestFailover = "TestFailover" + TestFailoverCleanup = "TestFailoverCleanup" + Failback = "Failback" + FinalizeFailback = "FinalizeFailback" + ChangePit = "ChangePit" + RepairReplication = "RepairReplication" + SwitchProtection = "SwitchProtection" + CompleteMigration = "CompleteMigration" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_properties.rb new file mode 100644 index 0000000000..97c97f6620 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_properties.rb @@ -0,0 +1,338 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication protected item custom data details. + # + class ReplicationProtectedItemProperties + + include MsRestAzure + + # @return [String] The name. + attr_accessor :friendly_name + + # @return [String] The type of protected item type. + attr_accessor :protected_item_type + + # @return [String] The protected item ARM Id. + attr_accessor :protectable_item_id + + # @return [String] The recovery provider ARM Id. + attr_accessor :recovery_services_provider_id + + # @return [String] The friendly name of the primary fabric. + attr_accessor :primary_fabric_friendly_name + + # @return [String] The friendly name of recovery fabric. + attr_accessor :recovery_fabric_friendly_name + + # @return [String] The Arm Id of recovery fabric. + attr_accessor :recovery_fabric_id + + # @return [String] The name of primary protection container friendly + # name. + attr_accessor :primary_protection_container_friendly_name + + # @return [String] The name of recovery container friendly name. + attr_accessor :recovery_protection_container_friendly_name + + # @return [String] The protection status. + attr_accessor :protection_state + + # @return [String] The protection state description. + attr_accessor :protection_state_description + + # @return [String] The Current active location of the PE. + attr_accessor :active_location + + # @return [String] The Test failover state. + attr_accessor :test_failover_state + + # @return [String] The Test failover state description. + attr_accessor :test_failover_state_description + + # @return [Array] The allowed operations on the Replication + # protected item. + attr_accessor :allowed_operations + + # @return [String] The consolidated protection health for the VM taking + # any issues with SRS as well as all the replication units associated + # with the VM's replication group into account. This is a string + # representation of the ProtectionHealth enumeration. + attr_accessor :replication_health + + # @return [String] The consolidated failover health for the VM. + attr_accessor :failover_health + + # @return [Array] List of replication health errors. + attr_accessor :replication_health_errors + + # @return [Array] List of failover health errors. + attr_accessor :failover_health_errors + + # @return [String] The ID of Policy governing this PE. + attr_accessor :policy_id + + # @return [String] The name of Policy governing this PE. + attr_accessor :policy_friendly_name + + # @return [DateTime] The Last successful failover time. + attr_accessor :last_successful_failover_time + + # @return [DateTime] The Last successful test failover time. + attr_accessor :last_successful_test_failover_time + + # @return [CurrentScenarioDetails] The current scenario. + attr_accessor :current_scenario + + # @return [String] The recovery point ARM Id to which the Vm was failed + # over. + attr_accessor :failover_recovery_point_id + + # @return [ReplicationProviderSpecificSettings] The Replication provider + # custom settings. + attr_accessor :provider_specific_details + + # @return [String] The recovery container Id. + attr_accessor :recovery_container_id + + + # + # Mapper for ReplicationProtectedItemProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationProtectedItemProperties', + type: { + name: 'Composite', + class_name: 'ReplicationProtectedItemProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + protected_item_type: { + required: false, + serialized_name: 'protectedItemType', + type: { + name: 'String' + } + }, + protectable_item_id: { + required: false, + serialized_name: 'protectableItemId', + type: { + name: 'String' + } + }, + recovery_services_provider_id: { + required: false, + serialized_name: 'recoveryServicesProviderId', + type: { + name: 'String' + } + }, + primary_fabric_friendly_name: { + required: false, + serialized_name: 'primaryFabricFriendlyName', + type: { + name: 'String' + } + }, + recovery_fabric_friendly_name: { + required: false, + serialized_name: 'recoveryFabricFriendlyName', + type: { + name: 'String' + } + }, + recovery_fabric_id: { + required: false, + serialized_name: 'recoveryFabricId', + type: { + name: 'String' + } + }, + primary_protection_container_friendly_name: { + required: false, + serialized_name: 'primaryProtectionContainerFriendlyName', + type: { + name: 'String' + } + }, + recovery_protection_container_friendly_name: { + required: false, + serialized_name: 'recoveryProtectionContainerFriendlyName', + type: { + name: 'String' + } + }, + protection_state: { + required: false, + serialized_name: 'protectionState', + type: { + name: 'String' + } + }, + protection_state_description: { + required: false, + serialized_name: 'protectionStateDescription', + type: { + name: 'String' + } + }, + active_location: { + required: false, + serialized_name: 'activeLocation', + type: { + name: 'String' + } + }, + test_failover_state: { + required: false, + serialized_name: 'testFailoverState', + type: { + name: 'String' + } + }, + test_failover_state_description: { + required: false, + serialized_name: 'testFailoverStateDescription', + type: { + name: 'String' + } + }, + allowed_operations: { + required: false, + serialized_name: 'allowedOperations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + replication_health: { + required: false, + serialized_name: 'replicationHealth', + type: { + name: 'String' + } + }, + failover_health: { + required: false, + serialized_name: 'failoverHealth', + type: { + name: 'String' + } + }, + replication_health_errors: { + required: false, + serialized_name: 'replicationHealthErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + failover_health_errors: { + required: false, + serialized_name: 'failoverHealthErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + policy_id: { + required: false, + serialized_name: 'policyId', + type: { + name: 'String' + } + }, + policy_friendly_name: { + required: false, + serialized_name: 'policyFriendlyName', + type: { + name: 'String' + } + }, + last_successful_failover_time: { + required: false, + serialized_name: 'lastSuccessfulFailoverTime', + type: { + name: 'DateTime' + } + }, + last_successful_test_failover_time: { + required: false, + serialized_name: 'lastSuccessfulTestFailoverTime', + type: { + name: 'DateTime' + } + }, + current_scenario: { + required: false, + serialized_name: 'currentScenario', + type: { + name: 'Composite', + class_name: 'CurrentScenarioDetails' + } + }, + failover_recovery_point_id: { + required: false, + serialized_name: 'failoverRecoveryPointId', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ReplicationProviderSpecificSettings', + class_name: 'ReplicationProviderSpecificSettings' + } + }, + recovery_container_id: { + required: false, + serialized_name: 'recoveryContainerId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_container_unmapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_container_unmapping_input.rb new file mode 100644 index 0000000000..61b61e2ea4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_container_unmapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific input for unpairing operations. + # + class ReplicationProviderContainerUnmappingInput + + include MsRestAzure + + # @return [String] The class type. + attr_accessor :instance_type + + + # + # Mapper for ReplicationProviderContainerUnmappingInput class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationProviderContainerUnmappingInput', + type: { + name: 'Composite', + class_name: 'ReplicationProviderContainerUnmappingInput', + model_properties: { + instance_type: { + required: false, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_creation_input.rb new file mode 100644 index 0000000000..2504073339 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific input for container creation operation. + # + class ReplicationProviderSpecificContainerCreationInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["A2A"] = "A2AContainerCreationInput" + + def initialize + @instanceType = "ReplicationProviderSpecificContainerCreationInput" + end + + attr_accessor :instanceType + + + # + # Mapper for ReplicationProviderSpecificContainerCreationInput class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationProviderSpecificContainerCreationInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ReplicationProviderSpecificContainerCreationInput', + class_name: 'ReplicationProviderSpecificContainerCreationInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_mapping_input.rb new file mode 100644 index 0000000000..1e994e5045 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific input for pairing operations. + # + class ReplicationProviderSpecificContainerMappingInput + + include MsRestAzure + + # @return [String] The class type. + attr_accessor :instance_type + + + # + # Mapper for ReplicationProviderSpecificContainerMappingInput class as + # Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationProviderSpecificContainerMappingInput', + type: { + name: 'Composite', + class_name: 'ReplicationProviderSpecificContainerMappingInput', + model_properties: { + instance_type: { + required: false, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_settings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_settings.rb new file mode 100644 index 0000000000..d0683d491d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_settings.rb @@ -0,0 +1,51 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Replication provider specific settings. + # + class ReplicationProviderSpecificSettings + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaBaseReplicationDetails"] = "HyperVReplicaBaseReplicationDetails" + @@discriminatorMap["HyperVReplica2012"] = "HyperVReplicaReplicationDetails" + @@discriminatorMap["HyperVReplica2012R2"] = "HyperVReplicaBlueReplicationDetails" + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzureReplicationDetails" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2ReplicationDetails" + @@discriminatorMap["InMage"] = "InMageReplicationDetails" + @@discriminatorMap["A2A"] = "A2AReplicationDetails" + + def initialize + @instanceType = "ReplicationProviderSpecificSettings" + end + + attr_accessor :instanceType + + + # + # Mapper for ReplicationProviderSpecificSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReplicationProviderSpecificSettings', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ReplicationProviderSpecificSettings', + class_name: 'ReplicationProviderSpecificSettings', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource.rb new file mode 100644 index 0000000000..e4ca8d2443 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure resource. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource Name + attr_accessor :name + + # @return [String] Resource Type + attr_accessor :type + + # @return [String] Resource Location + attr_accessor :location + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource_health_summary.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource_health_summary.rb new file mode 100644 index 0000000000..13ecd61b40 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource_health_summary.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Base class to define the health summary of the resources contained under + # an Arm resource. + # + class ResourceHealthSummary + + include MsRestAzure + + # @return [Integer] The count of total resources umder the container. + attr_accessor :resource_count + + # @return [Array] The list of summary of health + # errors across the resources under the container. + attr_accessor :issues + + + # + # Mapper for ResourceHealthSummary class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceHealthSummary', + type: { + name: 'Composite', + class_name: 'ResourceHealthSummary', + model_properties: { + resource_count: { + required: false, + serialized_name: 'resourceCount', + type: { + name: 'Number' + } + }, + issues: { + required: false, + serialized_name: 'issues', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorSummaryElementType', + type: { + name: 'Composite', + class_name: 'HealthErrorSummary' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params.rb new file mode 100644 index 0000000000..17225d17a4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Resume job params. + # + class ResumeJobParams + + include MsRestAzure + + # @return [ResumeJobParamsProperties] Resume job properties. + attr_accessor :properties + + + # + # Mapper for ResumeJobParams class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResumeJobParams', + type: { + name: 'Composite', + class_name: 'ResumeJobParams', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ResumeJobParamsProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params_properties.rb new file mode 100644 index 0000000000..f4fe7cf1bc --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Resume job properties. + # + class ResumeJobParamsProperties + + include MsRestAzure + + # @return [String] Resume job comments. + attr_accessor :comments + + + # + # Mapper for ResumeJobParamsProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResumeJobParamsProperties', + type: { + name: 'Composite', + class_name: 'ResumeJobParamsProperties', + model_properties: { + comments: { + required: false, + serialized_name: 'comments', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/retention_volume.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/retention_volume.rb new file mode 100644 index 0000000000..1a8437b033 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/retention_volume.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # The retention details of the MT. + # + class RetentionVolume + + include MsRestAzure + + # @return [String] The volume name. + attr_accessor :volume_name + + # @return [Integer] The volume capacity. + attr_accessor :capacity_in_bytes + + # @return [Integer] The free space available in this volume. + attr_accessor :free_space_in_bytes + + # @return [Integer] The threshold percentage. + attr_accessor :threshold_percentage + + + # + # Mapper for RetentionVolume class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RetentionVolume', + type: { + name: 'Composite', + class_name: 'RetentionVolume', + model_properties: { + volume_name: { + required: false, + serialized_name: 'volumeName', + type: { + name: 'String' + } + }, + capacity_in_bytes: { + required: false, + serialized_name: 'capacityInBytes', + type: { + name: 'Number' + } + }, + free_space_in_bytes: { + required: false, + serialized_name: 'freeSpaceInBytes', + type: { + name: 'Number' + } + }, + threshold_percentage: { + required: false, + serialized_name: 'thresholdPercentage', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input.rb new file mode 100644 index 0000000000..6b442ef77c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Reverse replication input. + # + class ReverseReplicationInput + + include MsRestAzure + + # @return [ReverseReplicationInputProperties] Reverse replication + # properties + attr_accessor :properties + + + # + # Mapper for ReverseReplicationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReverseReplicationInput', + type: { + name: 'Composite', + class_name: 'ReverseReplicationInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'ReverseReplicationInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input_properties.rb new file mode 100644 index 0000000000..10b4ede102 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Reverse replication input properties. + # + class ReverseReplicationInputProperties + + include MsRestAzure + + # @return [String] Failover direction. + attr_accessor :failover_direction + + # @return [ReverseReplicationProviderSpecificInput] Provider specific + # reverse replication input. + attr_accessor :provider_specific_details + + + # + # Mapper for ReverseReplicationInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReverseReplicationInputProperties', + type: { + name: 'Composite', + class_name: 'ReverseReplicationInputProperties', + model_properties: { + failover_direction: { + required: false, + serialized_name: 'failoverDirection', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ReverseReplicationProviderSpecificInput', + class_name: 'ReverseReplicationProviderSpecificInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_provider_specific_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_provider_specific_input.rb new file mode 100644 index 0000000000..fddc205541 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_provider_specific_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific reverse replication input. + # + class ReverseReplicationProviderSpecificInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzureReprotectInput" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2ReprotectInput" + @@discriminatorMap["InMage"] = "InMageReprotectInput" + @@discriminatorMap["A2A"] = "A2AReprotectInput" + + def initialize + @instanceType = "ReverseReplicationProviderSpecificInput" + end + + attr_accessor :instanceType + + + # + # Mapper for ReverseReplicationProviderSpecificInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ReverseReplicationProviderSpecificInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ReverseReplicationProviderSpecificInput', + class_name: 'ReverseReplicationProviderSpecificInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/role_assignment.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/role_assignment.rb new file mode 100644 index 0000000000..63c94231b9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/role_assignment.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Azure role assignment details. + # + class RoleAssignment + + include MsRestAzure + + # @return [String] The ARM Id of the role assignment. + attr_accessor :id + + # @return [String] The name of the role assignment. + attr_accessor :name + + # @return [String] Role assignment scope. + attr_accessor :scope + + # @return [String] Principal Id. + attr_accessor :principal_id + + # @return [String] Role definition id. + attr_accessor :role_definition_id + + + # + # Mapper for RoleAssignment class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RoleAssignment', + type: { + name: 'Composite', + class_name: 'RoleAssignment', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + scope: { + required: false, + serialized_name: 'scope', + type: { + name: 'String' + } + }, + principal_id: { + required: false, + serialized_name: 'principalId', + type: { + name: 'String' + } + }, + role_definition_id: { + required: false, + serialized_name: 'roleDefinitionId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rp_in_mage_recovery_point_type.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rp_in_mage_recovery_point_type.rb new file mode 100644 index 0000000000..95d7fb9ac8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rp_in_mage_recovery_point_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for RpInMageRecoveryPointType + # + module RpInMageRecoveryPointType + LatestTime = "LatestTime" + LatestTag = "LatestTag" + Custom = "Custom" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/run_as_account.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/run_as_account.rb new file mode 100644 index 0000000000..7620652c58 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/run_as_account.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # CS Accounts Details. + # + class RunAsAccount + + include MsRestAzure + + # @return [String] The CS RunAs account Id. + attr_accessor :account_id + + # @return [String] The CS RunAs account name. + attr_accessor :account_name + + + # + # Mapper for RunAsAccount class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RunAsAccount', + type: { + name: 'Composite', + class_name: 'RunAsAccount', + model_properties: { + account_id: { + required: false, + serialized_name: 'accountId', + type: { + name: 'String' + } + }, + account_name: { + required: false, + serialized_name: 'accountName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/san_enable_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/san_enable_protection_input.rb new file mode 100644 index 0000000000..be4eb74fb7 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/san_enable_protection_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # San enable protection provider specific input. + # + class SanEnableProtectionInput < EnableProtectionProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "San" + end + + attr_accessor :instanceType + + + # + # Mapper for SanEnableProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'San', + type: { + name: 'Composite', + class_name: 'SanEnableProtectionInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/script_action_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/script_action_task_details.rb new file mode 100644 index 0000000000..28c507336f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/script_action_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the script action task details. + # + class ScriptActionTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "ScriptActionTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] The name. + attr_accessor :name + + # @return [String] The path. + attr_accessor :path + + # @return [String] The output. + attr_accessor :output + + # @return [Boolean] A value indicating whether it is a primary side + # script or not. + attr_accessor :is_primary_side_script + + + # + # Mapper for ScriptActionTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ScriptActionTaskDetails', + type: { + name: 'Composite', + class_name: 'ScriptActionTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + path: { + required: false, + serialized_name: 'path', + type: { + name: 'String' + } + }, + output: { + required: false, + serialized_name: 'output', + type: { + name: 'String' + } + }, + is_primary_side_script: { + required: false, + serialized_name: 'isPrimarySideScript', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/service_error.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/service_error.rb new file mode 100644 index 0000000000..c302752292 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/service_error.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # ASR error model + # + class ServiceError + + include MsRestAzure + + # @return [String] Error code. + attr_accessor :code + + # @return [String] Error message. + attr_accessor :message + + # @return [String] Possible causes of error. + attr_accessor :possible_causes + + # @return [String] Recommended action to resolve error. + attr_accessor :recommended_action + + # @return [String] Activity Id. + attr_accessor :activity_id + + + # + # Mapper for ServiceError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ServiceError', + type: { + name: 'Composite', + class_name: 'ServiceError', + model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, + possible_causes: { + required: false, + serialized_name: 'possibleCauses', + type: { + name: 'String' + } + }, + recommended_action: { + required: false, + serialized_name: 'recommendedAction', + type: { + name: 'String' + } + }, + activity_id: { + required: false, + serialized_name: 'activityId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/set_multi_vm_sync_status.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/set_multi_vm_sync_status.rb new file mode 100644 index 0000000000..aebd416547 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/set_multi_vm_sync_status.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for SetMultiVmSyncStatus + # + module SetMultiVmSyncStatus + Enable = "Enable" + Disable = "Disable" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/severity.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/severity.rb new file mode 100644 index 0000000000..567a08b274 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/severity.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for Severity + # + module Severity + NONE = "NONE" + Warning = "Warning" + Error = "Error" + Info = "Info" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/source_site_operations.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/source_site_operations.rb new file mode 100644 index 0000000000..af72209e0c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/source_site_operations.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Defines values for SourceSiteOperations + # + module SourceSiteOperations + Required = "Required" + NotRequired = "NotRequired" + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification.rb new file mode 100644 index 0000000000..cf2710a3a2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Storage object definition. + # + class StorageClassification < Resource + + include MsRestAzure + + # @return [StorageClassificationProperties] Proprties of the storage + # object. + attr_accessor :properties + + + # + # Mapper for StorageClassification class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageClassification', + type: { + name: 'Composite', + class_name: 'StorageClassification', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'StorageClassificationProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_collection.rb new file mode 100644 index 0000000000..44ecf89d2b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of storage details. + # + class StorageClassificationCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The storage details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [StorageClassificationCollection] 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 StorageClassificationCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageClassificationCollection', + type: { + name: 'Composite', + class_name: 'StorageClassificationCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StorageClassificationElementType', + type: { + name: 'Composite', + class_name: 'StorageClassification' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping.rb new file mode 100644 index 0000000000..781a765a2c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Storage mapping object. + # + class StorageClassificationMapping < Resource + + include MsRestAzure + + # @return [StorageClassificationMappingProperties] Proprties of the + # storage mappping object. + attr_accessor :properties + + + # + # Mapper for StorageClassificationMapping class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageClassificationMapping', + type: { + name: 'Composite', + class_name: 'StorageClassificationMapping', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'StorageClassificationMappingProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_collection.rb new file mode 100644 index 0000000000..da5dab1bfc --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_collection.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of storage mapping details. + # + class StorageClassificationMappingCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The storage details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [StorageClassificationMappingCollection] 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 StorageClassificationMappingCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageClassificationMappingCollection', + type: { + name: 'Composite', + class_name: 'StorageClassificationMappingCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StorageClassificationMappingElementType', + type: { + name: 'Composite', + class_name: 'StorageClassificationMapping' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_input.rb new file mode 100644 index 0000000000..f621021c78 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Storage mapping input. + # + class StorageClassificationMappingInput + + include MsRestAzure + + # @return [StorageMappingInputProperties] Storage mapping input + # properties. + attr_accessor :properties + + + # + # Mapper for StorageClassificationMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageClassificationMappingInput', + type: { + name: 'Composite', + class_name: 'StorageClassificationMappingInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'StorageMappingInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_properties.rb new file mode 100644 index 0000000000..2e95dad5ca --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Storage mapping properties. + # + class StorageClassificationMappingProperties + + include MsRestAzure + + # @return [String] Target storage object Id. + attr_accessor :target_storage_classification_id + + + # + # Mapper for StorageClassificationMappingProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageClassificationMappingProperties', + type: { + name: 'Composite', + class_name: 'StorageClassificationMappingProperties', + model_properties: { + target_storage_classification_id: { + required: false, + serialized_name: 'targetStorageClassificationId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_properties.rb new file mode 100644 index 0000000000..bfaa72a155 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Storage object properties. + # + class StorageClassificationProperties + + include MsRestAzure + + # @return [String] Friendly name of the Storage classification. + attr_accessor :friendly_name + + + # + # Mapper for StorageClassificationProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageClassificationProperties', + type: { + name: 'Composite', + class_name: 'StorageClassificationProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_mapping_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_mapping_input_properties.rb new file mode 100644 index 0000000000..5e82ee0cd9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_mapping_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Storage mapping input properties. + # + class StorageMappingInputProperties + + include MsRestAzure + + # @return [String] The ID of the storage object. + attr_accessor :target_storage_classification_id + + + # + # Mapper for StorageMappingInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageMappingInputProperties', + type: { + name: 'Composite', + class_name: 'StorageMappingInputProperties', + model_properties: { + target_storage_classification_id: { + required: false, + serialized_name: 'targetStorageClassificationId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/subnet.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/subnet.rb new file mode 100644 index 0000000000..2b6731473b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/subnet.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Subnets of the network. + # + class Subnet + + include MsRestAzure + + # @return [String] The subnet name. + attr_accessor :name + + # @return [String] The subnet friendly name. + attr_accessor :friendly_name + + # @return [Array] The list of addresses for the subnet. + attr_accessor :address_list + + + # + # Mapper for Subnet class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Subnet', + type: { + name: 'Composite', + class_name: 'Subnet', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + address_list: { + required: false, + serialized_name: 'addressList', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input.rb new file mode 100644 index 0000000000..5714c67f1d --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Switch protection input. + # + class SwitchProtectionInput + + include MsRestAzure + + # @return [SwitchProtectionInputProperties] Switch protection properties + attr_accessor :properties + + + # + # Mapper for SwitchProtectionInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SwitchProtectionInput', + type: { + name: 'Composite', + class_name: 'SwitchProtectionInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'SwitchProtectionInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input_properties.rb new file mode 100644 index 0000000000..75f5aed4f0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Switch protection input properties. + # + class SwitchProtectionInputProperties + + include MsRestAzure + + # @return [String] The unique replication protected item name. + attr_accessor :replication_protected_item_name + + # @return [SwitchProtectionProviderSpecificInput] Provider specific + # switch protection input. + attr_accessor :provider_specific_details + + + # + # Mapper for SwitchProtectionInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SwitchProtectionInputProperties', + type: { + name: 'Composite', + class_name: 'SwitchProtectionInputProperties', + model_properties: { + replication_protected_item_name: { + required: false, + serialized_name: 'replicationProtectedItemName', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'SwitchProtectionProviderSpecificInput', + class_name: 'SwitchProtectionProviderSpecificInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_job_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_job_details.rb new file mode 100644 index 0000000000..a0e8a645a3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_job_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents details for switch protection job. + # + class SwitchProtectionJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @instanceType = "SwitchProtectionJobDetails" + end + + attr_accessor :instanceType + + # @return [String] ARM Id of the new replication protected item. + attr_accessor :new_replication_protected_item_id + + + # + # Mapper for SwitchProtectionJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SwitchProtectionJobDetails', + type: { + name: 'Composite', + class_name: 'SwitchProtectionJobDetails', + model_properties: { + affected_object_details: { + required: false, + serialized_name: 'affectedObjectDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + new_replication_protected_item_id: { + required: false, + serialized_name: 'newReplicationProtectedItemId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_provider_specific_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_provider_specific_input.rb new file mode 100644 index 0000000000..887caee17b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_provider_specific_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Provider specific switch protection input. + # + class SwitchProtectionProviderSpecificInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["A2A"] = "A2ASwitchProtectionInput" + + def initialize + @instanceType = "SwitchProtectionProviderSpecificInput" + end + + attr_accessor :instanceType + + + # + # Mapper for SwitchProtectionProviderSpecificInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SwitchProtectionProviderSpecificInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'SwitchProtectionProviderSpecificInput', + class_name: 'SwitchProtectionProviderSpecificInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/task_type_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/task_type_details.rb new file mode 100644 index 0000000000..863f6e3fb0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/task_type_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Task details based on specific task type. + # + class TaskTypeDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["JobTaskDetails"] = "JobTaskDetails" + @@discriminatorMap["VirtualMachineTaskDetails"] = "VirtualMachineTaskDetails" + @@discriminatorMap["FabricReplicationGroupTaskDetails"] = "FabricReplicationGroupTaskDetails" + @@discriminatorMap["ManualActionTaskDetails"] = "ManualActionTaskDetails" + @@discriminatorMap["ScriptActionTaskDetails"] = "ScriptActionTaskDetails" + @@discriminatorMap["VmNicUpdatesTaskDetails"] = "VmNicUpdatesTaskDetails" + @@discriminatorMap["ConsistencyCheckTaskDetails"] = "ConsistencyCheckTaskDetails" + @@discriminatorMap["AutomationRunbookTaskDetails"] = "AutomationRunbookTaskDetails" + + def initialize + @instanceType = "TaskTypeDetails" + end + + attr_accessor :instanceType + + + # + # Mapper for TaskTypeDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TaskTypeDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'TaskTypeDetails', + class_name: 'TaskTypeDetails', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input.rb new file mode 100644 index 0000000000..70c34c1fae --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for test failover cleanup. + # + class TestFailoverCleanupInput + + include MsRestAzure + + # @return [TestFailoverCleanupInputProperties] Test failover cleanup + # input properties. + attr_accessor :properties + + + # + # Mapper for TestFailoverCleanupInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TestFailoverCleanupInput', + type: { + name: 'Composite', + class_name: 'TestFailoverCleanupInput', + model_properties: { + properties: { + required: true, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'TestFailoverCleanupInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input_properties.rb new file mode 100644 index 0000000000..d33ca47473 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for test failover cleanup input properties. + # + class TestFailoverCleanupInputProperties + + include MsRestAzure + + # @return [String] Test failover cleanup comments. + attr_accessor :comments + + + # + # Mapper for TestFailoverCleanupInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TestFailoverCleanupInputProperties', + type: { + name: 'Composite', + class_name: 'TestFailoverCleanupInputProperties', + model_properties: { + comments: { + required: false, + serialized_name: 'comments', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input.rb new file mode 100644 index 0000000000..a10d848017 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for planned failover. + # + class TestFailoverInput + + include MsRestAzure + + # @return [TestFailoverInputProperties] Planned failover input properties + attr_accessor :properties + + + # + # Mapper for TestFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TestFailoverInput', + type: { + name: 'Composite', + class_name: 'TestFailoverInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'TestFailoverInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input_properties.rb new file mode 100644 index 0000000000..c12c8121a8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input_properties.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for planned failover input properties. + # + class TestFailoverInputProperties + + include MsRestAzure + + # @return [String] Failover direction. + attr_accessor :failover_direction + + # @return [String] Network type to be used for test failover. + attr_accessor :network_type + + # @return [String] The id of the network to be used for test failover + attr_accessor :network_id + + # @return [String] A value indicating whether the test failover cleanup + # is to be skipped. + attr_accessor :skip_test_failover_cleanup + + # @return [ProviderSpecificFailoverInput] Provider specific settings + attr_accessor :provider_specific_details + + + # + # Mapper for TestFailoverInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TestFailoverInputProperties', + type: { + name: 'Composite', + class_name: 'TestFailoverInputProperties', + model_properties: { + failover_direction: { + required: false, + serialized_name: 'failoverDirection', + type: { + name: 'String' + } + }, + network_type: { + required: false, + serialized_name: 'networkType', + type: { + name: 'String' + } + }, + network_id: { + required: false, + serialized_name: 'networkId', + type: { + name: 'String' + } + }, + skip_test_failover_cleanup: { + required: false, + serialized_name: 'skipTestFailoverCleanup', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ProviderSpecificFailoverInput', + class_name: 'ProviderSpecificFailoverInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_job_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_job_details.rb new file mode 100644 index 0000000000..c746983928 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_job_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the details for a test failover job. + # + class TestFailoverJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @instanceType = "TestFailoverJobDetails" + end + + attr_accessor :instanceType + + # @return [String] The test failover status. + attr_accessor :test_failover_status + + # @return [String] The test failover comments. + attr_accessor :comments + + # @return [String] The test network name. + attr_accessor :network_name + + # @return [String] The test network friendly name. + attr_accessor :network_friendly_name + + # @return [String] The test network type (see TestFailoverInput enum for + # possible values). + attr_accessor :network_type + + # @return [Array] The test VM + # details. + attr_accessor :protected_item_details + + + # + # Mapper for TestFailoverJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TestFailoverJobDetails', + type: { + name: 'Composite', + class_name: 'TestFailoverJobDetails', + model_properties: { + affected_object_details: { + required: false, + serialized_name: 'affectedObjectDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + test_failover_status: { + required: false, + serialized_name: 'testFailoverStatus', + type: { + name: 'String' + } + }, + comments: { + required: false, + serialized_name: 'comments', + type: { + name: 'String' + } + }, + network_name: { + required: false, + serialized_name: 'networkName', + type: { + name: 'String' + } + }, + network_friendly_name: { + required: false, + serialized_name: 'networkFriendlyName', + type: { + name: 'String' + } + }, + network_type: { + required: false, + serialized_name: 'networkType', + type: { + name: 'String' + } + }, + protected_item_details: { + required: false, + serialized_name: 'protectedItemDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FailoverReplicationProtectedItemDetailsElementType', + type: { + name: 'Composite', + class_name: 'FailoverReplicationProtectedItemDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input.rb new file mode 100644 index 0000000000..3b7b5f0cd9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for planned failover. + # + class UnplannedFailoverInput + + include MsRestAzure + + # @return [UnplannedFailoverInputProperties] Planned failover input + # properties + attr_accessor :properties + + + # + # Mapper for UnplannedFailoverInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UnplannedFailoverInput', + type: { + name: 'Composite', + class_name: 'UnplannedFailoverInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'UnplannedFailoverInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input_properties.rb new file mode 100644 index 0000000000..7a5cccfcdb --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input definition for planned failover input properties. + # + class UnplannedFailoverInputProperties + + include MsRestAzure + + # @return [String] Failover direction. + attr_accessor :failover_direction + + # @return [String] Source site operations status + attr_accessor :source_site_operations + + # @return [ProviderSpecificFailoverInput] Provider specific settings + attr_accessor :provider_specific_details + + + # + # Mapper for UnplannedFailoverInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UnplannedFailoverInputProperties', + type: { + name: 'Composite', + class_name: 'UnplannedFailoverInputProperties', + model_properties: { + failover_direction: { + required: false, + serialized_name: 'failoverDirection', + type: { + name: 'String' + } + }, + source_site_operations: { + required: false, + serialized_name: 'sourceSiteOperations', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'ProviderSpecificFailoverInput', + class_name: 'ProviderSpecificFailoverInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request.rb new file mode 100644 index 0000000000..304c8c53dc --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Request to update the mobility service on a protected item. + # + class UpdateMobilityServiceRequest + + include MsRestAzure + + # @return [UpdateMobilityServiceRequestProperties] The properties of the + # update mobility service request. + attr_accessor :properties + + + # + # Mapper for UpdateMobilityServiceRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateMobilityServiceRequest', + type: { + name: 'Composite', + class_name: 'UpdateMobilityServiceRequest', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'UpdateMobilityServiceRequestProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request_properties.rb new file mode 100644 index 0000000000..09d5f2986a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # The properties of an update mobility service request. + # + class UpdateMobilityServiceRequestProperties + + include MsRestAzure + + # @return [String] The CS run as account Id. + attr_accessor :run_as_account_id + + + # + # Mapper for UpdateMobilityServiceRequestProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateMobilityServiceRequestProperties', + type: { + name: 'Composite', + class_name: 'UpdateMobilityServiceRequestProperties', + model_properties: { + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input.rb new file mode 100644 index 0000000000..1057e3df40 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update network mapping input. + # + class UpdateNetworkMappingInput + + include MsRestAzure + + # @return [UpdateNetworkMappingInputProperties] The input properties + # needed to update network mapping. + attr_accessor :properties + + + # + # Mapper for UpdateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateNetworkMappingInput', + type: { + name: 'Composite', + class_name: 'UpdateNetworkMappingInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'UpdateNetworkMappingInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input_properties.rb new file mode 100644 index 0000000000..45ebb41643 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Common input details for network mapping operation. + # + class UpdateNetworkMappingInputProperties + + include MsRestAzure + + # @return [String] Recovery fabric name. + attr_accessor :recovery_fabric_name + + # @return [String] Recovery network Id. + attr_accessor :recovery_network_id + + # @return [FabricSpecificUpdateNetworkMappingInput] Fabrics specific + # input network Id. + attr_accessor :fabric_specific_details + + + # + # Mapper for UpdateNetworkMappingInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateNetworkMappingInputProperties', + type: { + name: 'Composite', + class_name: 'UpdateNetworkMappingInputProperties', + model_properties: { + recovery_fabric_name: { + required: false, + serialized_name: 'recoveryFabricName', + type: { + name: 'String' + } + }, + recovery_network_id: { + required: false, + serialized_name: 'recoveryNetworkId', + type: { + name: 'String' + } + }, + fabric_specific_details: { + required: false, + serialized_name: 'fabricSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'FabricSpecificUpdateNetworkMappingInput', + class_name: 'FabricSpecificUpdateNetworkMappingInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input.rb new file mode 100644 index 0000000000..8c25392f84 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update protection profile input. + # + class UpdatePolicyInput + + include MsRestAzure + + # @return [UpdatePolicyInputProperties] The ReplicationProviderSettings. + attr_accessor :properties + + + # + # Mapper for UpdatePolicyInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdatePolicyInput', + type: { + name: 'Composite', + class_name: 'UpdatePolicyInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'UpdatePolicyInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input_properties.rb new file mode 100644 index 0000000000..de107fdc92 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Policy update properties. + # + class UpdatePolicyInputProperties + + include MsRestAzure + + # @return [PolicyProviderSpecificInput] The ReplicationProviderSettings. + attr_accessor :replication_provider_settings + + + # + # Mapper for UpdatePolicyInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdatePolicyInputProperties', + type: { + name: 'Composite', + class_name: 'UpdatePolicyInputProperties', + model_properties: { + replication_provider_settings: { + required: false, + serialized_name: 'replicationProviderSettings', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'PolicyProviderSpecificInput', + class_name: 'PolicyProviderSpecificInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input.rb new file mode 100644 index 0000000000..a0d6f27590 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update recovery plan input class. + # + class UpdateRecoveryPlanInput + + include MsRestAzure + + # @return [UpdateRecoveryPlanInputProperties] Recovery plan update + # properties. + attr_accessor :properties + + + # + # Mapper for UpdateRecoveryPlanInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateRecoveryPlanInput', + type: { + name: 'Composite', + class_name: 'UpdateRecoveryPlanInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'UpdateRecoveryPlanInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input_properties.rb new file mode 100644 index 0000000000..0f70b96f36 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Recovery plan updation properties. + # + class UpdateRecoveryPlanInputProperties + + include MsRestAzure + + # @return [Array] The recovery plan groups. + attr_accessor :groups + + + # + # Mapper for UpdateRecoveryPlanInputProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateRecoveryPlanInputProperties', + type: { + name: 'Composite', + class_name: 'UpdateRecoveryPlanInputProperties', + model_properties: { + groups: { + required: false, + serialized_name: 'groups', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RecoveryPlanGroupElementType', + type: { + name: 'Composite', + class_name: 'RecoveryPlanGroup' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input.rb new file mode 100644 index 0000000000..f18adcfa99 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update replication protected item input. + # + class UpdateReplicationProtectedItemInput + + include MsRestAzure + + # @return [UpdateReplicationProtectedItemInputProperties] Update + # replication protected item properties. + attr_accessor :properties + + + # + # Mapper for UpdateReplicationProtectedItemInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateReplicationProtectedItemInput', + type: { + name: 'Composite', + class_name: 'UpdateReplicationProtectedItemInput', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'UpdateReplicationProtectedItemInputProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input_properties.rb new file mode 100644 index 0000000000..e2edf4477c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update protected item input properties. + # + class UpdateReplicationProtectedItemInputProperties + + include MsRestAzure + + # @return [String] Target azure VM name given by the user. + attr_accessor :recovery_azure_vmname + + # @return [String] Target Azure Vm size. + attr_accessor :recovery_azure_vmsize + + # @return [String] Target Azure Network Id. + attr_accessor :selected_recovery_azure_network_id + + # @return [String] The selected option to enable RDP\SSH on target vm + # after failover. String value of + # {SrsDataContract.EnableRDPOnTargetOption} enum. + attr_accessor :enable_rdpon_target_option + + # @return [Array] The list of vm nic details. + attr_accessor :vm_nics + + # @return [LicenseType] License type. Possible values include: + # 'NotSpecified', 'NoLicenseType', 'WindowsServer' + attr_accessor :license_type + + # @return [String] The target availability set id. + attr_accessor :recovery_availability_set_id + + # @return [UpdateReplicationProtectedItemProviderInput] The provider + # specific input to update replication protected item. + attr_accessor :provider_specific_details + + + # + # Mapper for UpdateReplicationProtectedItemInputProperties class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateReplicationProtectedItemInputProperties', + type: { + name: 'Composite', + class_name: 'UpdateReplicationProtectedItemInputProperties', + model_properties: { + recovery_azure_vmname: { + required: false, + serialized_name: 'recoveryAzureVMName', + type: { + name: 'String' + } + }, + recovery_azure_vmsize: { + required: false, + serialized_name: 'recoveryAzureVMSize', + type: { + name: 'String' + } + }, + selected_recovery_azure_network_id: { + required: false, + serialized_name: 'selectedRecoveryAzureNetworkId', + type: { + name: 'String' + } + }, + enable_rdpon_target_option: { + required: false, + serialized_name: 'enableRDPOnTargetOption', + type: { + name: 'String' + } + }, + vm_nics: { + required: false, + serialized_name: 'vmNics', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VMNicInputDetailsElementType', + type: { + name: 'Composite', + class_name: 'VMNicInputDetails' + } + } + } + }, + license_type: { + required: false, + serialized_name: 'licenseType', + type: { + name: 'Enum', + module: 'LicenseType' + } + }, + recovery_availability_set_id: { + required: false, + serialized_name: 'recoveryAvailabilitySetId', + type: { + name: 'String' + } + }, + provider_specific_details: { + required: false, + serialized_name: 'providerSpecificDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'UpdateReplicationProtectedItemProviderInput', + class_name: 'UpdateReplicationProtectedItemProviderInput' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_provider_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_provider_input.rb new file mode 100644 index 0000000000..2b9a53d60a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_provider_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update replication protected item provider specific input. + # + class UpdateReplicationProtectedItemProviderInput + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["HyperVReplicaAzure"] = "HyperVReplicaAzureUpdateReplicationProtectedItemInput" + @@discriminatorMap["InMageAzureV2"] = "InMageAzureV2UpdateReplicationProtectedItemInput" + @@discriminatorMap["A2A"] = "A2AUpdateReplicationProtectedItemInput" + + def initialize + @instanceType = "UpdateReplicationProtectedItemProviderInput" + end + + attr_accessor :instanceType + + + # + # Mapper for UpdateReplicationProtectedItemProviderInput class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateReplicationProtectedItemProviderInput', + type: { + name: 'Composite', + polymorphic_discriminator: 'instanceType', + uber_parent: 'UpdateReplicationProtectedItemProviderInput', + class_name: 'UpdateReplicationProtectedItemProviderInput', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request.rb new file mode 100644 index 0000000000..cb15a28d8c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Input required to update vCenter. + # + class UpdateVCenterRequest + + include MsRestAzure + + # @return [UpdateVCenterRequestProperties] The update VCenter Request + # Properties. + attr_accessor :properties + + + # + # Mapper for UpdateVCenterRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateVCenterRequest', + type: { + name: 'Composite', + class_name: 'UpdateVCenterRequest', + model_properties: { + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'UpdateVCenterRequestProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request_properties.rb new file mode 100644 index 0000000000..6f1db70d5c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request_properties.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # The properties of an update vCenter request. + # + class UpdateVCenterRequestProperties + + include MsRestAzure + + # @return [String] The friendly name of the vCenter. + attr_accessor :friendly_name + + # @return [String] The IP address of the vCenter to be discovered. + attr_accessor :ip_address + + # @return [String] The process server Id from where the update can be + # orchestrated. + attr_accessor :process_server_id + + # @return [String] The port number for discovery. + attr_accessor :port + + # @return [String] The CS account Id which has priviliges to update the + # vCenter. + attr_accessor :run_as_account_id + + + # + # Mapper for UpdateVCenterRequestProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateVCenterRequestProperties', + type: { + name: 'Composite', + class_name: 'UpdateVCenterRequestProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + process_server_id: { + required: false, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + port: { + required: false, + serialized_name: 'port', + type: { + name: 'String' + } + }, + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_details.rb new file mode 100644 index 0000000000..4ebb645ca2 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_details.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Vault health details definition. + # + class VaultHealthDetails < Resource + + include MsRestAzure + + # @return [VaultHealthProperties] The vault health related data. + attr_accessor :properties + + + # + # Mapper for VaultHealthDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VaultHealthDetails', + type: { + name: 'Composite', + class_name: 'VaultHealthDetails', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'VaultHealthProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_properties.rb new file mode 100644 index 0000000000..dda67dbdbc --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_properties.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # class to define the health summary of the Vault. + # + class VaultHealthProperties + + include MsRestAzure + + # @return [Array] The list of errors on the vault. + attr_accessor :vault_errors + + # @return [ResourceHealthSummary] The list of the health detail of the + # protected items in the vault. + attr_accessor :protected_items_health + + # @return [ResourceHealthSummary] The list of the health detail of the + # fabrics in the vault. + attr_accessor :fabrics_health + + + # + # Mapper for VaultHealthProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VaultHealthProperties', + type: { + name: 'Composite', + class_name: 'VaultHealthProperties', + model_properties: { + vault_errors: { + required: false, + serialized_name: 'vaultErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + }, + protected_items_health: { + required: false, + serialized_name: 'protectedItemsHealth', + type: { + name: 'Composite', + class_name: 'ResourceHealthSummary' + } + }, + fabrics_health: { + required: false, + serialized_name: 'fabricsHealth', + type: { + name: 'Composite', + class_name: 'ResourceHealthSummary' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter.rb new file mode 100644 index 0000000000..d4c1b8af20 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # vCenter definition. + # + class VCenter < Resource + + include MsRestAzure + + # @return [VCenterProperties] VCenter related data. + attr_accessor :properties + + + # + # Mapper for VCenter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VCenter', + type: { + name: 'Composite', + class_name: 'VCenter', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'VCenterProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_collection.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_collection.rb new file mode 100644 index 0000000000..42e050d0ae --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Collection of vCenter details. + # + class VCenterCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The vCenter details. + attr_accessor :value + + # @return [String] The value of next link. + 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 [VCenterCollection] 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 VCenterCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VCenterCollection', + type: { + name: 'Composite', + class_name: 'VCenterCollection', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VCenterElementType', + type: { + name: 'Composite', + class_name: 'VCenter' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_properties.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_properties.rb new file mode 100644 index 0000000000..d74b5a4d42 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_properties.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # vCenter properties. + # + class VCenterProperties + + include MsRestAzure + + # @return [String] Friendly name of the vCenter. + attr_accessor :friendly_name + + # @return [String] VCenter internal ID. + attr_accessor :internal_id + + # @return [DateTime] The time when the last heartbeat was reveived by + # vCenter. + attr_accessor :last_heartbeat + + # @return [String] The VCenter discovery status. + attr_accessor :discovery_status + + # @return [String] The process server Id. + attr_accessor :process_server_id + + # @return [String] The IP address of the vCenter. + attr_accessor :ip_address + + # @return [String] The infrastructure Id of vCenter. + attr_accessor :infrastructure_id + + # @return [String] The port number for discovery. + attr_accessor :port + + # @return [String] The account Id which has privileges to discover the + # vCenter. + attr_accessor :run_as_account_id + + # @return [String] The ARM resource name of the fabric containing this + # VCenter. + attr_accessor :fabric_arm_resource_name + + + # + # Mapper for VCenterProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VCenterProperties', + type: { + name: 'Composite', + class_name: 'VCenterProperties', + model_properties: { + friendly_name: { + required: false, + serialized_name: 'friendlyName', + type: { + name: 'String' + } + }, + internal_id: { + required: false, + serialized_name: 'internalId', + type: { + name: 'String' + } + }, + last_heartbeat: { + required: false, + serialized_name: 'lastHeartbeat', + type: { + name: 'DateTime' + } + }, + discovery_status: { + required: false, + serialized_name: 'discoveryStatus', + type: { + name: 'String' + } + }, + process_server_id: { + required: false, + serialized_name: 'processServerId', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + infrastructure_id: { + required: false, + serialized_name: 'infrastructureId', + type: { + name: 'String' + } + }, + port: { + required: false, + serialized_name: 'port', + type: { + name: 'String' + } + }, + run_as_account_id: { + required: false, + serialized_name: 'runAsAccountId', + type: { + name: 'String' + } + }, + fabric_arm_resource_name: { + required: false, + serialized_name: 'fabricArmResourceName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/virtual_machine_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/virtual_machine_task_details.rb new file mode 100644 index 0000000000..2cda604b55 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/virtual_machine_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the virtual machine task details. + # + class VirtualMachineTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "VirtualMachineTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] The skipped reason. + attr_accessor :skipped_reason + + # @return [String] The skipped reason string. + attr_accessor :skipped_reason_string + + # @return [JobEntity] The job entity. + attr_accessor :job_task + + + # + # Mapper for VirtualMachineTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualMachineTaskDetails', + type: { + name: 'Composite', + class_name: 'VirtualMachineTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + skipped_reason: { + required: false, + serialized_name: 'skippedReason', + type: { + name: 'String' + } + }, + skipped_reason_string: { + required: false, + serialized_name: 'skippedReasonString', + type: { + name: 'String' + } + }, + job_task: { + required: false, + serialized_name: 'jobTask', + type: { + name: 'Composite', + class_name: 'JobEntity' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vm_nic_updates_task_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vm_nic_updates_task_details.rb new file mode 100644 index 0000000000..bbd65d3326 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vm_nic_updates_task_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # This class represents the vm NicUpdates task details. + # + class VmNicUpdatesTaskDetails < TaskTypeDetails + + include MsRestAzure + + + def initialize + @instanceType = "VmNicUpdatesTaskDetails" + end + + attr_accessor :instanceType + + # @return [String] Virtual machine Id. + attr_accessor :vm_id + + # @return [String] Nic Id. + attr_accessor :nic_id + + # @return [String] Name of the Nic. + attr_accessor :name + + + # + # Mapper for VmNicUpdatesTaskDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmNicUpdatesTaskDetails', + type: { + name: 'Composite', + class_name: 'VmNicUpdatesTaskDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + vm_id: { + required: false, + serialized_name: 'vmId', + type: { + name: 'String' + } + }, + nic_id: { + required: false, + serialized_name: 'nicId', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_details.rb new file mode 100644 index 0000000000..6c5403cde3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMM fabric specific details. + # + class VmmDetails < FabricSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "VMM" + end + + attr_accessor :instanceType + + + # + # Mapper for VmmDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMM', + type: { + name: 'Composite', + class_name: 'VmmDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_create_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_create_network_mapping_input.rb new file mode 100644 index 0000000000..bb3bce3656 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_create_network_mapping_input.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Create network mappings input properties/behaviour specific to Vmm to + # Azure Network mapping. + # + class VmmToAzureCreateNetworkMappingInput < FabricSpecificCreateNetworkMappingInput + + include MsRestAzure + + + def initialize + @instanceType = "VmmToAzure" + end + + attr_accessor :instanceType + + + # + # Mapper for VmmToAzureCreateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmmToAzure', + type: { + name: 'Composite', + class_name: 'VmmToAzureCreateNetworkMappingInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_network_mapping_settings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_network_mapping_settings.rb new file mode 100644 index 0000000000..54722104d8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_network_mapping_settings.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # E2A Network Mapping fabric specific settings. + # + class VmmToAzureNetworkMappingSettings < NetworkMappingFabricSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "VmmToAzure" + end + + attr_accessor :instanceType + + + # + # Mapper for VmmToAzureNetworkMappingSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmmToAzure', + type: { + name: 'Composite', + class_name: 'VmmToAzureNetworkMappingSettings', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_update_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_update_network_mapping_input.rb new file mode 100644 index 0000000000..ac8d9627e4 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_update_network_mapping_input.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update network mappings input properties/behaviour specific to vmm to + # azure. + # + class VmmToAzureUpdateNetworkMappingInput < FabricSpecificUpdateNetworkMappingInput + + include MsRestAzure + + + def initialize + @instanceType = "VmmToAzure" + end + + attr_accessor :instanceType + + + # + # Mapper for VmmToAzureUpdateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmmToAzure', + type: { + name: 'Composite', + class_name: 'VmmToAzureUpdateNetworkMappingInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_create_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_create_network_mapping_input.rb new file mode 100644 index 0000000000..6418c68b9b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_create_network_mapping_input.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Create network mappings input properties/behaviour specific to vmm to vmm + # Network mapping. + # + class VmmToVmmCreateNetworkMappingInput < FabricSpecificCreateNetworkMappingInput + + include MsRestAzure + + + def initialize + @instanceType = "VmmToVmm" + end + + attr_accessor :instanceType + + + # + # Mapper for VmmToVmmCreateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmmToVmm', + type: { + name: 'Composite', + class_name: 'VmmToVmmCreateNetworkMappingInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_network_mapping_settings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_network_mapping_settings.rb new file mode 100644 index 0000000000..0278c47218 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_network_mapping_settings.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # E2E Network Mapping fabric specific settings. + # + class VmmToVmmNetworkMappingSettings < NetworkMappingFabricSpecificSettings + + include MsRestAzure + + + def initialize + @instanceType = "VmmToVmm" + end + + attr_accessor :instanceType + + + # + # Mapper for VmmToVmmNetworkMappingSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmmToVmm', + type: { + name: 'Composite', + class_name: 'VmmToVmmNetworkMappingSettings', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_update_network_mapping_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_update_network_mapping_input.rb new file mode 100644 index 0000000000..ad6de0b34b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_update_network_mapping_input.rb @@ -0,0 +1,49 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Update network mappings input properties/behaviour specific to vmm to + # vmm. + # + class VmmToVmmUpdateNetworkMappingInput < FabricSpecificUpdateNetworkMappingInput + + include MsRestAzure + + + def initialize + @instanceType = "VmmToVmm" + end + + attr_accessor :instanceType + + + # + # Mapper for VmmToVmmUpdateNetworkMappingInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmmToVmm', + type: { + name: 'Composite', + class_name: 'VmmToVmmUpdateNetworkMappingInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_details.rb new file mode 100644 index 0000000000..2b6ed15cdd --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper V VM network details. + # + class VMNicDetails + + include MsRestAzure + + # @return [String] The nic Id. + attr_accessor :nic_id + + # @return [String] The replica nic Id. + attr_accessor :replica_nic_id + + # @return [String] The source nic ARM Id. + attr_accessor :source_nic_arm_id + + # @return [String] VM subnet name. + attr_accessor :v_msubnet_name + + # @return [String] VM network name. + attr_accessor :v_mnetwork_name + + # @return [String] Recovery VM network Id. + attr_accessor :recovery_vmnetwork_id + + # @return [String] Recovery VM subnet name. + attr_accessor :recovery_vmsubnet_name + + # @return [String] Ip address type. + attr_accessor :ip_address_type + + # @return [String] Primary nic static IP address. + attr_accessor :primary_nic_static_ipaddress + + # @return [String] Replica nic static IP address. + attr_accessor :replica_nic_static_ipaddress + + # @return [String] Selection type for failover. + attr_accessor :selection_type + + # @return [String] IP allocation type for recovery VM. + attr_accessor :recovery_nic_ip_address_type + + + # + # Mapper for VMNicDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMNicDetails', + type: { + name: 'Composite', + class_name: 'VMNicDetails', + model_properties: { + nic_id: { + required: false, + serialized_name: 'nicId', + type: { + name: 'String' + } + }, + replica_nic_id: { + required: false, + serialized_name: 'replicaNicId', + type: { + name: 'String' + } + }, + source_nic_arm_id: { + required: false, + serialized_name: 'sourceNicArmId', + type: { + name: 'String' + } + }, + v_msubnet_name: { + required: false, + serialized_name: 'vMSubnetName', + type: { + name: 'String' + } + }, + v_mnetwork_name: { + required: false, + serialized_name: 'vMNetworkName', + type: { + name: 'String' + } + }, + recovery_vmnetwork_id: { + required: false, + serialized_name: 'recoveryVMNetworkId', + type: { + name: 'String' + } + }, + recovery_vmsubnet_name: { + required: false, + serialized_name: 'recoveryVMSubnetName', + type: { + name: 'String' + } + }, + ip_address_type: { + required: false, + serialized_name: 'ipAddressType', + type: { + name: 'String' + } + }, + primary_nic_static_ipaddress: { + required: false, + serialized_name: 'primaryNicStaticIPAddress', + type: { + name: 'String' + } + }, + replica_nic_static_ipaddress: { + required: false, + serialized_name: 'replicaNicStaticIPAddress', + type: { + name: 'String' + } + }, + selection_type: { + required: false, + serialized_name: 'selectionType', + type: { + name: 'String' + } + }, + recovery_nic_ip_address_type: { + required: false, + serialized_name: 'recoveryNicIpAddressType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_input_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_input_details.rb new file mode 100644 index 0000000000..2d9c496804 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_input_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Hyper V VM network input details. + # + class VMNicInputDetails + + include MsRestAzure + + # @return [String] The nic Id. + attr_accessor :nic_id + + # @return [String] Recovery VM subnet name. + attr_accessor :recovery_vmsubnet_name + + # @return [String] Replica nic static IP address. + attr_accessor :replica_nic_static_ipaddress + + # @return [String] Selection type for failover. + attr_accessor :selection_type + + + # + # Mapper for VMNicInputDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMNicInputDetails', + type: { + name: 'Composite', + class_name: 'VMNicInputDetails', + model_properties: { + nic_id: { + required: false, + serialized_name: 'nicId', + type: { + name: 'String' + } + }, + recovery_vmsubnet_name: { + required: false, + serialized_name: 'recoveryVMSubnetName', + type: { + name: 'String' + } + }, + replica_nic_static_ipaddress: { + required: false, + serialized_name: 'replicaNicStaticIPAddress', + type: { + name: 'String' + } + }, + selection_type: { + required: false, + serialized_name: 'selectionType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_creation_input.rb new file mode 100644 index 0000000000..24c6bddc42 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMware Cbt Policy creation input. + # + class VMwareCbtPolicyCreationInput < PolicyProviderSpecificInput + + include MsRestAzure + + + def initialize + @instanceType = "VMwareCbt" + end + + attr_accessor :instanceType + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The crash consistent snapshot frequency (in minutes). + attr_accessor :crash_consistent_frequency_in_minutes + + # @return [Integer] The app consistent snapshot frequency (in minutes). + attr_accessor :app_consistent_frequency_in_minutes + + + # + # Mapper for VMwareCbtPolicyCreationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMwareCbt', + type: { + name: 'Composite', + class_name: 'VMwareCbtPolicyCreationInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + crash_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'crashConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_details.rb new file mode 100644 index 0000000000..83dd16e1a9 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMware Cbt specific policy details. + # + class VmwareCbtPolicyDetails < PolicyProviderSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "VMwareCbt" + end + + attr_accessor :instanceType + + # @return [Integer] The recovery point threshold in minutes. + attr_accessor :recovery_point_threshold_in_minutes + + # @return [Integer] The duration in minutes until which the recovery + # points need to be stored. + attr_accessor :recovery_point_history + + # @return [Integer] The app consistent snapshot frequency in minutes. + attr_accessor :app_consistent_frequency_in_minutes + + # @return [Integer] The crash consistent snapshot frequency in minutes. + attr_accessor :crash_consistent_frequency_in_minutes + + + # + # Mapper for VmwareCbtPolicyDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMwareCbt', + type: { + name: 'Composite', + class_name: 'VmwareCbtPolicyDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + recovery_point_threshold_in_minutes: { + required: false, + serialized_name: 'recoveryPointThresholdInMinutes', + type: { + name: 'Number' + } + }, + recovery_point_history: { + required: false, + serialized_name: 'recoveryPointHistory', + type: { + name: 'Number' + } + }, + app_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'appConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + }, + crash_consistent_frequency_in_minutes: { + required: false, + serialized_name: 'crashConsistentFrequencyInMinutes', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_details.rb new file mode 100644 index 0000000000..5ed682b6e8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_details.rb @@ -0,0 +1,376 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # Store the fabric details specific to the VMware fabric. + # + class VMwareDetails < FabricSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "VMware" + end + + attr_accessor :instanceType + + # @return [Array] The list of Process Servers associated + # with the fabric. + attr_accessor :process_servers + + # @return [Array] The list of Master Target servers + # associated with the fabric. + attr_accessor :master_target_servers + + # @return [Array] The list of run as accounts created on + # the server. + attr_accessor :run_as_accounts + + # @return [String] The number of replication pairs configured in this CS. + attr_accessor :replication_pair_count + + # @return [String] The number of process servers. + attr_accessor :process_server_count + + # @return [String] The number of source and target servers configured to + # talk to this CS. + attr_accessor :agent_count + + # @return [String] The number of protected servers. + attr_accessor :protected_servers + + # @return [String] The percentage of the system load. + attr_accessor :system_load + + # @return [String] The system load status. + attr_accessor :system_load_status + + # @return [String] The percentage of the CPU load. + attr_accessor :cpu_load + + # @return [String] The CPU load status. + attr_accessor :cpu_load_status + + # @return [Integer] The total memory. + attr_accessor :total_memory_in_bytes + + # @return [Integer] The available memory. + attr_accessor :available_memory_in_bytes + + # @return [String] The memory usage status. + attr_accessor :memory_usage_status + + # @return [Integer] The total space. + attr_accessor :total_space_in_bytes + + # @return [Integer] The available space. + attr_accessor :available_space_in_bytes + + # @return [String] The space usage status. + attr_accessor :space_usage_status + + # @return [String] The web load. + attr_accessor :web_load + + # @return [String] The web load status. + attr_accessor :web_load_status + + # @return [String] The database server load. + attr_accessor :database_server_load + + # @return [String] The database server load status. + attr_accessor :database_server_load_status + + # @return [String] The CS service status. + attr_accessor :cs_service_status + + # @return [String] The IP address. + attr_accessor :ip_address + + # @return [String] The agent Version. + attr_accessor :agent_version + + # @return [String] The host name. + attr_accessor :host_name + + # @return [DateTime] The last heartbeat received from CS server. + attr_accessor :last_heartbeat + + # @return [String] Version status + attr_accessor :version_status + + # @return [DateTime] CS SSL cert expiry date. + attr_accessor :ssl_cert_expiry_date + + # @return [Integer] CS SSL cert expiry date. + attr_accessor :ssl_cert_expiry_remaining_days + + # @return [String] PS template version. + attr_accessor :ps_template_version + + + # + # Mapper for VMwareDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMware', + type: { + name: 'Composite', + class_name: 'VMwareDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + process_servers: { + required: false, + serialized_name: 'processServers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProcessServerElementType', + type: { + name: 'Composite', + class_name: 'ProcessServer' + } + } + } + }, + master_target_servers: { + required: false, + serialized_name: 'masterTargetServers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MasterTargetServerElementType', + type: { + name: 'Composite', + class_name: 'MasterTargetServer' + } + } + } + }, + run_as_accounts: { + required: false, + serialized_name: 'runAsAccounts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RunAsAccountElementType', + type: { + name: 'Composite', + class_name: 'RunAsAccount' + } + } + } + }, + replication_pair_count: { + required: false, + serialized_name: 'replicationPairCount', + type: { + name: 'String' + } + }, + process_server_count: { + required: false, + serialized_name: 'processServerCount', + type: { + name: 'String' + } + }, + agent_count: { + required: false, + serialized_name: 'agentCount', + type: { + name: 'String' + } + }, + protected_servers: { + required: false, + serialized_name: 'protectedServers', + type: { + name: 'String' + } + }, + system_load: { + required: false, + serialized_name: 'systemLoad', + type: { + name: 'String' + } + }, + system_load_status: { + required: false, + serialized_name: 'systemLoadStatus', + type: { + name: 'String' + } + }, + cpu_load: { + required: false, + serialized_name: 'cpuLoad', + type: { + name: 'String' + } + }, + cpu_load_status: { + required: false, + serialized_name: 'cpuLoadStatus', + type: { + name: 'String' + } + }, + total_memory_in_bytes: { + required: false, + serialized_name: 'totalMemoryInBytes', + type: { + name: 'Number' + } + }, + available_memory_in_bytes: { + required: false, + serialized_name: 'availableMemoryInBytes', + type: { + name: 'Number' + } + }, + memory_usage_status: { + required: false, + serialized_name: 'memoryUsageStatus', + type: { + name: 'String' + } + }, + total_space_in_bytes: { + required: false, + serialized_name: 'totalSpaceInBytes', + type: { + name: 'Number' + } + }, + available_space_in_bytes: { + required: false, + serialized_name: 'availableSpaceInBytes', + type: { + name: 'Number' + } + }, + space_usage_status: { + required: false, + serialized_name: 'spaceUsageStatus', + type: { + name: 'String' + } + }, + web_load: { + required: false, + serialized_name: 'webLoad', + type: { + name: 'String' + } + }, + web_load_status: { + required: false, + serialized_name: 'webLoadStatus', + type: { + name: 'String' + } + }, + database_server_load: { + required: false, + serialized_name: 'databaseServerLoad', + type: { + name: 'String' + } + }, + database_server_load_status: { + required: false, + serialized_name: 'databaseServerLoadStatus', + type: { + name: 'String' + } + }, + cs_service_status: { + required: false, + serialized_name: 'csServiceStatus', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + agent_version: { + required: false, + serialized_name: 'agentVersion', + type: { + name: 'String' + } + }, + host_name: { + required: false, + serialized_name: 'hostName', + type: { + name: 'String' + } + }, + last_heartbeat: { + required: false, + serialized_name: 'lastHeartbeat', + type: { + name: 'DateTime' + } + }, + version_status: { + required: false, + serialized_name: 'versionStatus', + type: { + name: 'String' + } + }, + ssl_cert_expiry_date: { + required: false, + serialized_name: 'sslCertExpiryDate', + type: { + name: 'DateTime' + } + }, + ssl_cert_expiry_remaining_days: { + required: false, + serialized_name: 'sslCertExpiryRemainingDays', + type: { + name: 'Number' + } + }, + ps_template_version: { + required: false, + serialized_name: 'psTemplateVersion', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_creation_input.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_creation_input.rb new file mode 100644 index 0000000000..a46ae937bd --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_creation_input.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # Fabric provider specific settings. + # + class VMwareV2FabricCreationInput < FabricSpecificCreationInput + + include MsRestAzure + + + def initialize + @instanceType = "VMwareV2" + end + + attr_accessor :instanceType + + + # + # Mapper for VMwareV2FabricCreationInput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMwareV2', + type: { + name: 'Composite', + class_name: 'VMwareV2FabricCreationInput', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_specific_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_specific_details.rb new file mode 100644 index 0000000000..5b43b68e1b --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_specific_details.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::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMwareV2 fabric Specific Details. + # + class VMwareV2FabricSpecificDetails < FabricSpecificDetails + + include MsRestAzure + + + def initialize + @instanceType = "VMwareV2" + end + + attr_accessor :instanceType + + # @return [String] The endpoint for making requests to the SRS Service. + attr_accessor :srs_service_endpoint + + # @return [String] The endpoint for making requests to the RCM Service. + attr_accessor :rcm_service_endpoint + + + # + # Mapper for VMwareV2FabricSpecificDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMwareV2', + type: { + name: 'Composite', + class_name: 'VMwareV2FabricSpecificDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + srs_service_endpoint: { + required: false, + serialized_name: 'srsServiceEndpoint', + type: { + name: 'String' + } + }, + rcm_service_endpoint: { + required: false, + serialized_name: 'rcmServiceEndpoint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_virtual_machine_details.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_virtual_machine_details.rb new file mode 100644 index 0000000000..b49ab8e2b6 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_virtual_machine_details.rb @@ -0,0 +1,168 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + module Models + # + # VMware provider specific settings + # + class VMwareVirtualMachineDetails < ConfigurationSettings + + include MsRestAzure + + + def initialize + @instanceType = "VMwareVirtualMachine" + end + + attr_accessor :instanceType + + # @return [String] The ID generated by the InMage agent after it gets + # installed on guest. This is the ID to be used during InMage + # CreateProtection. + attr_accessor :agent_generated_id + + # @return [String] The value indicating if InMage scout agent is + # installed on guest. + attr_accessor :agent_installed + + # @return [String] The OsType installed on VM. + attr_accessor :os_type + + # @return [String] The agent version. + attr_accessor :agent_version + + # @return [String] The IP address. + attr_accessor :ip_address + + # @return [String] The value indicating whether VM is powered on. + attr_accessor :powered_on + + # @return [String] The VCenter infrastructure Id. + attr_accessor :v_center_infrastructure_id + + # @return [String] A value inidicating the discovery type of the machine. + # Value can be vCenter or physical. + attr_accessor :discovery_type + + # @return [Array] The disk details. + attr_accessor :disk_details + + # @return [Array] The validation errors. + attr_accessor :validation_errors + + + # + # Mapper for VMwareVirtualMachineDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VMwareVirtualMachine', + type: { + name: 'Composite', + class_name: 'VMwareVirtualMachineDetails', + model_properties: { + instanceType: { + required: true, + serialized_name: 'instanceType', + type: { + name: 'String' + } + }, + agent_generated_id: { + required: false, + serialized_name: 'agentGeneratedId', + type: { + name: 'String' + } + }, + agent_installed: { + required: false, + serialized_name: 'agentInstalled', + type: { + name: 'String' + } + }, + os_type: { + required: false, + serialized_name: 'osType', + type: { + name: 'String' + } + }, + agent_version: { + required: false, + serialized_name: 'agentVersion', + type: { + name: 'String' + } + }, + ip_address: { + required: false, + serialized_name: 'ipAddress', + type: { + name: 'String' + } + }, + powered_on: { + required: false, + serialized_name: 'poweredOn', + type: { + name: 'String' + } + }, + v_center_infrastructure_id: { + required: false, + serialized_name: 'vCenterInfrastructureId', + type: { + name: 'String' + } + }, + discovery_type: { + required: false, + serialized_name: 'discoveryType', + type: { + name: 'String' + } + }, + disk_details: { + required: false, + serialized_name: 'diskDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InMageDiskDetailsElementType', + type: { + name: 'Composite', + class_name: 'InMageDiskDetails' + } + } + } + }, + validation_errors: { + required: false, + serialized_name: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HealthErrorElementType', + type: { + name: 'Composite', + class_name: 'HealthError' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/module_definition.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/module_definition.rb new file mode 100644 index 0000000000..44b56a8184 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/module_definition.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 end +module Azure::ARM end +module Azure::ARM::RecoveryServicesSiteRecovery end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/operations.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/operations.rb new file mode 100644 index 0000000000..40e04340db --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/operations.rb @@ -0,0 +1,230 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # Operations + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Returns the list of available operations. + # + # Operation to return the list of available operations. + # + # @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 + + # + # Returns the list of available operations. + # + # Operation to return the list of available operations. + # + # @param custom_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 + + # + # Returns the list of available operations. + # + # Operation to return the list of available operations. + # + # @param [Hash{String => String}] 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.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::OperationsDiscoveryCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of available operations. + # + # Operation to return the list of available 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 [OperationsDiscoveryCollection] 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 + + # + # Returns the list of available operations. + # + # Operation to return the list of available 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_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Returns the list of available operations. + # + # Operation to return the list of available 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_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::OperationsDiscoveryCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of available operations. + # + # Operation to return the list of available operations. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationsDiscoveryCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb new file mode 100644 index 0000000000..9856a3555f --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb @@ -0,0 +1,360 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # RecoveryPoints + # + class RecoveryPoints + include MsRestAzure + + # + # Creates and initializes a new instance of the RecoveryPoints class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Get a recovery point. + # + # Get the details of specified recovery point. + # + # @param fabric_name [String] The fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replication protected + # item's name. + # @param recovery_point_name [String] The recovery point name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPoint] operation results. + # + def get(fabric_name, protection_container_name, replicated_protected_item_name, recovery_point_name, custom_headers = nil) + response = get_async(fabric_name, protection_container_name, replicated_protected_item_name, recovery_point_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get a recovery point. + # + # Get the details of specified recovery point. + # + # @param fabric_name [String] The fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replication protected + # item's name. + # @param recovery_point_name [String] The recovery point name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, recovery_point_name, custom_headers = nil) + get_async(fabric_name, protection_container_name, replicated_protected_item_name, recovery_point_name, custom_headers).value! + end + + # + # Get a recovery point. + # + # Get the details of specified recovery point. + # + # @param fabric_name [String] The fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replication protected + # item's name. + # @param recovery_point_name [String] The recovery point name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, protection_container_name, replicated_protected_item_name, recovery_point_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'recovery_point_name is nil' if recovery_point_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name,'recoveryPointName' => recovery_point_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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPoint.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recovery points for a replication protected item. + # + # Lists the available recovery points for a replication protected item. + # + # @param fabric_name [String] The fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replication protected + # item's name. + # @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_replication_protected_items(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + first_page = list_by_replication_protected_items_as_lazy(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers) + first_page.get_all_items + end + + # + # Get recovery points for a replication protected item. + # + # Lists the available recovery points for a replication protected item. + # + # @param fabric_name [String] The fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replication protected + # item's name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_protected_items_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + list_by_replication_protected_items_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + end + + # + # Get recovery points for a replication protected item. + # + # Lists the available recovery points for a replication protected item. + # + # @param fabric_name [String] The fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replication protected + # item's name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_protected_items_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPointCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recovery points for a replication protected item. + # + # Lists the available recovery points for a replication protected item. + # + # @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 [RecoveryPointCollection] operation results. + # + def list_by_replication_protected_items_next(next_page_link, custom_headers = nil) + response = list_by_replication_protected_items_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get recovery points for a replication protected item. + # + # Lists the available recovery points for a replication protected item. + # + # @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_replication_protected_items_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_protected_items_next_async(next_page_link, custom_headers).value! + end + + # + # Get recovery points for a replication protected item. + # + # Lists the available recovery points for a replication protected item. + # + # @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_replication_protected_items_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPointCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recovery points for a replication protected item. + # + # Lists the available recovery points for a replication protected item. + # + # @param fabric_name [String] The fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replication protected + # item's name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPointCollection] which provide lazy access to pages of the + # response. + # + def list_by_replication_protected_items_as_lazy(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = list_by_replication_protected_items_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_protected_items_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_alert_settings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_alert_settings.rb new file mode 100644 index 0000000000..ea4a20b3d8 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_alert_settings.rb @@ -0,0 +1,442 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationAlertSettings + # + class ReplicationAlertSettings + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationAlertSettings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets an email notification(alert) configuration. + # + # Gets the details of the specified email notification(alert) configuration. + # + # @param alert_setting_name [String] The name of the email notification + # configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Alert] operation results. + # + def get(alert_setting_name, custom_headers = nil) + response = get_async(alert_setting_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an email notification(alert) configuration. + # + # Gets the details of the specified email notification(alert) configuration. + # + # @param alert_setting_name [String] The name of the email notification + # configuration. + # @param custom_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(alert_setting_name, custom_headers = nil) + get_async(alert_setting_name, custom_headers).value! + end + + # + # Gets an email notification(alert) configuration. + # + # Gets the details of the specified email notification(alert) configuration. + # + # @param alert_setting_name [String] The name of the email notification + # configuration. + # @param [Hash{String => String}] 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(alert_setting_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'alert_setting_name is nil' if alert_setting_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'alertSettingName' => alert_setting_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::ARM::RecoveryServicesSiteRecovery::Models::Alert.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Configures email notifications for this vault. + # + # Create or update an email notification(alert) configuration. + # + # @param alert_setting_name [String] The name of the email notification(alert) + # configuration. + # @param request [ConfigureAlertRequest] The input to configure the email + # notification(alert). + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Alert] operation results. + # + def create(alert_setting_name, request, custom_headers = nil) + response = create_async(alert_setting_name, request, custom_headers).value! + response.body unless response.nil? + end + + # + # Configures email notifications for this vault. + # + # Create or update an email notification(alert) configuration. + # + # @param alert_setting_name [String] The name of the email notification(alert) + # configuration. + # @param request [ConfigureAlertRequest] The input to configure the email + # notification(alert). + # @param custom_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(alert_setting_name, request, custom_headers = nil) + create_async(alert_setting_name, request, custom_headers).value! + end + + # + # Configures email notifications for this vault. + # + # Create or update an email notification(alert) configuration. + # + # @param alert_setting_name [String] The name of the email notification(alert) + # configuration. + # @param request [ConfigureAlertRequest] The input to configure the email + # notification(alert). + # @param [Hash{String => String}] 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(alert_setting_name, request, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'alert_setting_name is nil' if alert_setting_name.nil? + fail ArgumentError, 'request is nil' if request.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ConfigureAlertRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'alertSettingName' => alert_setting_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Alert.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of configured email notification(alert) configurations. + # + # Gets the list of email notification(alert) configurations for the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of configured email notification(alert) configurations. + # + # Gets the list of email notification(alert) configurations for the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of configured email notification(alert) configurations. + # + # Gets the list of email notification(alert) configurations for the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationAlertSettings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::AlertCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of configured email notification(alert) configurations. + # + # Gets the list of email notification(alert) configurations for the vault. + # + # @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 [AlertCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of configured email notification(alert) configurations. + # + # Gets the list of email notification(alert) configurations for the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of configured email notification(alert) configurations. + # + # Gets the list of email notification(alert) configurations for the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::AlertCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of configured email notification(alert) configurations. + # + # Gets the list of email notification(alert) configurations for the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AlertCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_events.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_events.rb new file mode 100644 index 0000000000..99328e9668 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_events.rb @@ -0,0 +1,329 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationEvents + # + class ReplicationEvents + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationEvents class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Get the details of an Azure Site recovery event. + # + # The operation to get the details of an Azure Site recovery event. + # + # @param event_name [String] The name of the Azure Site Recovery event. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Event] operation results. + # + def get(event_name, custom_headers = nil) + response = get_async(event_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the details of an Azure Site recovery event. + # + # The operation to get the details of an Azure Site recovery event. + # + # @param event_name [String] The name of the Azure Site Recovery event. + # @param custom_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(event_name, custom_headers = nil) + get_async(event_name, custom_headers).value! + end + + # + # Get the details of an Azure Site recovery event. + # + # The operation to get the details of an Azure Site recovery event. + # + # @param event_name [String] The name of the Azure Site Recovery event. + # @param [Hash{String => String}] 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(event_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'event_name is nil' if event_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'eventName' => event_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::ARM::RecoveryServicesSiteRecovery::Models::Event.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of Azure Site Recovery events. + # + # Gets the list of Azure Site Recovery events for the vault. + # + # @param filter [String] OData filter options. + # @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(filter = nil, custom_headers = nil) + first_page = list_as_lazy(filter, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of Azure Site Recovery events. + # + # Gets the list of Azure Site Recovery events for the vault. + # + # @param filter [String] OData filter options. + # @param custom_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(filter = nil, custom_headers = nil) + list_async(filter, custom_headers).value! + end + + # + # Gets the list of Azure Site Recovery events. + # + # Gets the list of Azure Site Recovery events for the vault. + # + # @param filter [String] OData filter options. + # @param [Hash{String => String}] 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(filter = nil, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationEvents' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::EventCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of Azure Site Recovery events. + # + # Gets the list of Azure Site Recovery events for the vault. + # + # @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 [EventCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of Azure Site Recovery events. + # + # Gets the list of Azure Site Recovery events for the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of Azure Site Recovery events. + # + # Gets the list of Azure Site Recovery events for the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::EventCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of Azure Site Recovery events. + # + # Gets the list of Azure Site Recovery events for the vault. + # + # @param filter [String] OData filter options. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventCollection] which provide lazy access to pages of the response. + # + def list_as_lazy(filter = nil, custom_headers = nil) + response = list_async(filter, 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_fabrics.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_fabrics.rb new file mode 100644 index 0000000000..b740ec73a0 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_fabrics.rb @@ -0,0 +1,1299 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationFabrics + # + class ReplicationFabrics + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationFabrics class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Migrates the site to AAD. + # + # The operation to migrate an Azure Site Recovery fabric to AAD. + # + # @param fabric_name [String] ASR fabric to migrate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def migrate_to_aad(fabric_name, custom_headers = nil) + response = migrate_to_aad_async(fabric_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] ASR fabric to migrate. + # @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 migrate_to_aad_async(fabric_name, custom_headers = nil) + # Send request + promise = begin_migrate_to_aad_async(fabric_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Renews certificate for the fabric. + # + # Renews the connection certificate for the ASR replication fabric. + # + # @param fabric_name [String] fabric name to renew certs for. + # @param renew_certificate [RenewCertificateInput] Renew certificate input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def renew_certificate(fabric_name, renew_certificate, custom_headers = nil) + response = renew_certificate_async(fabric_name, renew_certificate, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] fabric name to renew certs for. + # @param renew_certificate [RenewCertificateInput] Renew certificate input. + # @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 renew_certificate_async(fabric_name, renew_certificate, custom_headers = nil) + # Send request + promise = begin_renew_certificate_async(fabric_name, renew_certificate, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.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 + + # + # Perform failover of the process server. + # + # The operation to move replications from a process server to another process + # server. + # + # @param fabric_name [String] The name of the fabric containing the process + # server. + # @param failover_process_server_request [FailoverProcessServerRequest] The + # input to the failover process server operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def reassociate_gateway(fabric_name, failover_process_server_request, custom_headers = nil) + response = reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] The name of the fabric containing the process + # server. + # @param failover_process_server_request [FailoverProcessServerRequest] The + # input to the failover process server 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 reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers = nil) + # Send request + promise = begin_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.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 + + # + # Checks the consistency of the ASR fabric. + # + # The operation to perform a consistency check on the fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def check_consistency(fabric_name, custom_headers = nil) + response = check_consistency_async(fabric_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def check_consistency_async(fabric_name, custom_headers = nil) + # Send request + promise = begin_check_consistency_async(fabric_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the site. + # + # The operation to delete or remove an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to delete + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, custom_headers = nil) + response = delete_async(fabric_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] ASR fabric to delete + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the details of an ASR fabric. + # + # Gets the details of an Azure Site Recovery fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def get(fabric_name, custom_headers = nil) + response = get_async(fabric_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of an ASR fabric. + # + # Gets the details of an Azure Site Recovery fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, custom_headers = nil) + get_async(fabric_name, custom_headers).value! + end + + # + # Gets the details of an ASR fabric. + # + # Gets the details of an Azure Site Recovery fabric. + # + # @param fabric_name [String] Fabric name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an Azure Site Recoery fabric. + # + # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site) + # + # @param fabric_name [String] Name of the ASR fabric. + # @param input [FabricCreationInput] Fabric creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def create(fabric_name, input, custom_headers = nil) + response = create_async(fabric_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Name of the ASR fabric. + # @param input [FabricCreationInput] Fabric creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(fabric_name, input, custom_headers = nil) + # Send request + promise = begin_create_async(fabric_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.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 + + # + # Purges the site. + # + # The operation to purge(force delete) an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to purge. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def purge(fabric_name, custom_headers = nil) + response = purge_async(fabric_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] ASR fabric to purge. + # @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 purge_async(fabric_name, custom_headers = nil) + # Send request + promise = begin_purge_async(fabric_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the list of ASR fabrics + # + # Gets a list of the Azure Site Recovery fabrics in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of ASR fabrics + # + # Gets a list of the Azure Site Recovery fabrics in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of ASR fabrics + # + # Gets a list of the Azure Site Recovery fabrics in the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationFabrics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::FabricCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Migrates the site to AAD. + # + # The operation to migrate an Azure Site Recovery fabric to AAD. + # + # @param fabric_name [String] ASR fabric to migrate. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_migrate_to_aad(fabric_name, custom_headers = nil) + response = begin_migrate_to_aad_async(fabric_name, custom_headers).value! + nil + end + + # + # Migrates the site to AAD. + # + # The operation to migrate an Azure Site Recovery fabric to AAD. + # + # @param fabric_name [String] ASR fabric to migrate. + # @param custom_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_migrate_to_aad_with_http_info(fabric_name, custom_headers = nil) + begin_migrate_to_aad_async(fabric_name, custom_headers).value! + end + + # + # Migrates the site to AAD. + # + # The operation to migrate an Azure Site Recovery fabric to AAD. + # + # @param fabric_name [String] ASR fabric to migrate. + # @param [Hash{String => String}] 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_migrate_to_aad_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Renews certificate for the fabric. + # + # Renews the connection certificate for the ASR replication fabric. + # + # @param fabric_name [String] fabric name to renew certs for. + # @param renew_certificate [RenewCertificateInput] Renew certificate input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def begin_renew_certificate(fabric_name, renew_certificate, custom_headers = nil) + response = begin_renew_certificate_async(fabric_name, renew_certificate, custom_headers).value! + response.body unless response.nil? + end + + # + # Renews certificate for the fabric. + # + # Renews the connection certificate for the ASR replication fabric. + # + # @param fabric_name [String] fabric name to renew certs for. + # @param renew_certificate [RenewCertificateInput] Renew certificate input. + # @param custom_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_renew_certificate_with_http_info(fabric_name, renew_certificate, custom_headers = nil) + begin_renew_certificate_async(fabric_name, renew_certificate, custom_headers).value! + end + + # + # Renews certificate for the fabric. + # + # Renews the connection certificate for the ASR replication fabric. + # + # @param fabric_name [String] fabric name to renew certs for. + # @param renew_certificate [RenewCertificateInput] Renew certificate input. + # @param [Hash{String => String}] 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_renew_certificate_async(fabric_name, renew_certificate, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'renew_certificate is nil' if renew_certificate.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RenewCertificateInput.mapper() + request_content = @client.serialize(request_mapper, renew_certificate) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Perform failover of the process server. + # + # The operation to move replications from a process server to another process + # server. + # + # @param fabric_name [String] The name of the fabric containing the process + # server. + # @param failover_process_server_request [FailoverProcessServerRequest] The + # input to the failover process server operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def begin_reassociate_gateway(fabric_name, failover_process_server_request, custom_headers = nil) + response = begin_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Perform failover of the process server. + # + # The operation to move replications from a process server to another process + # server. + # + # @param fabric_name [String] The name of the fabric containing the process + # server. + # @param failover_process_server_request [FailoverProcessServerRequest] The + # input to the failover process server 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_reassociate_gateway_with_http_info(fabric_name, failover_process_server_request, custom_headers = nil) + begin_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers).value! + end + + # + # Perform failover of the process server. + # + # The operation to move replications from a process server to another process + # server. + # + # @param fabric_name [String] The name of the fabric containing the process + # server. + # @param failover_process_server_request [FailoverProcessServerRequest] The + # input to the failover process server 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_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'failover_process_server_request is nil' if failover_process_server_request.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::FailoverProcessServerRequest.mapper() + request_content = @client.serialize(request_mapper, failover_process_server_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the consistency of the ASR fabric. + # + # The operation to perform a consistency check on the fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def begin_check_consistency(fabric_name, custom_headers = nil) + response = begin_check_consistency_async(fabric_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Checks the consistency of the ASR fabric. + # + # The operation to perform a consistency check on the fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_check_consistency_with_http_info(fabric_name, custom_headers = nil) + begin_check_consistency_async(fabric_name, custom_headers).value! + end + + # + # Checks the consistency of the ASR fabric. + # + # The operation to perform a consistency check on the fabric. + # + # @param fabric_name [String] Fabric name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_check_consistency_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 site. + # + # The operation to delete or remove an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to delete + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, custom_headers = nil) + response = begin_delete_async(fabric_name, custom_headers).value! + nil + end + + # + # Deletes the site. + # + # The operation to delete or remove an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to delete + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, custom_headers = nil) + begin_delete_async(fabric_name, custom_headers).value! + end + + # + # Deletes the site. + # + # The operation to delete or remove an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to delete + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates an Azure Site Recoery fabric. + # + # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site) + # + # @param fabric_name [String] Name of the ASR fabric. + # @param input [FabricCreationInput] Fabric creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Fabric] operation results. + # + def begin_create(fabric_name, input, custom_headers = nil) + response = begin_create_async(fabric_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates an Azure Site Recoery fabric. + # + # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site) + # + # @param fabric_name [String] Name of the ASR fabric. + # @param input [FabricCreationInput] Fabric creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(fabric_name, input, custom_headers = nil) + begin_create_async(fabric_name, input, custom_headers).value! + end + + # + # Creates an Azure Site Recoery fabric. + # + # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site) + # + # @param fabric_name [String] Name of the ASR fabric. + # @param input [FabricCreationInput] Fabric creation input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(fabric_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::FabricCreationInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Purges the site. + # + # The operation to purge(force delete) an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to purge. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_purge(fabric_name, custom_headers = nil) + response = begin_purge_async(fabric_name, custom_headers).value! + nil + end + + # + # Purges the site. + # + # The operation to purge(force delete) an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to purge. + # @param custom_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_purge_with_http_info(fabric_name, custom_headers = nil) + begin_purge_async(fabric_name, custom_headers).value! + end + + # + # Purges the site. + # + # The operation to purge(force delete) an Azure Site Recovery fabric. + # + # @param fabric_name [String] ASR fabric to purge. + # @param [Hash{String => String}] 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_purge_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the list of ASR fabrics + # + # Gets a list of the Azure Site Recovery fabrics in the vault. + # + # @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 [FabricCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of ASR fabrics + # + # Gets a list of the Azure Site Recovery fabrics in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of ASR fabrics + # + # Gets a list of the Azure Site Recovery fabrics in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::FabricCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of ASR fabrics + # + # Gets a list of the Azure Site Recovery fabrics in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FabricCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb new file mode 100644 index 0000000000..9b6bdbfad6 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb @@ -0,0 +1,905 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationJobs + # + class ReplicationJobs + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationJobs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Resumes the specified job. + # + # The operation to resume an Azure Site Recovery job + # + # @param job_name [String] Job identifier. + # @param resume_job_params [ResumeJobParams] Resume rob comments. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def resume(job_name, resume_job_params, custom_headers = nil) + response = resume_async(job_name, resume_job_params, custom_headers).value! + response.body unless response.nil? + end + + # + # @param job_name [String] Job identifier. + # @param resume_job_params [ResumeJobParams] Resume rob comments. + # @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 resume_async(job_name, resume_job_params, custom_headers = nil) + # Send request + promise = begin_resume_async(job_name, resume_job_params, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Job.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 + + # + # Restarts the specified job. + # + # The operation to restart an Azure Site Recovery job. + # + # @param job_name [String] Job identifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def restart(job_name, custom_headers = nil) + response = restart_async(job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param job_name [String] Job identifier. + # @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 restart_async(job_name, custom_headers = nil) + # Send request + promise = begin_restart_async(job_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Job.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 + + # + # Cancels the specified job. + # + # The operation to cancel an Azure Site Recovery job. + # + # @param job_name [String] Job indentifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def cancel(job_name, custom_headers = nil) + response = cancel_async(job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param job_name [String] Job indentifier. + # @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 cancel_async(job_name, custom_headers = nil) + # Send request + promise = begin_cancel_async(job_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Job.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 job details. + # + # Get the details of an Azure Site Recovery job. + # + # @param job_name [String] Job identifier + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def get(job_name, custom_headers = nil) + response = get_async(job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the job details. + # + # Get the details of an Azure Site Recovery job. + # + # @param job_name [String] Job 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(job_name, custom_headers = nil) + get_async(job_name, custom_headers).value! + end + + # + # Gets the job details. + # + # Get the details of an Azure Site Recovery job. + # + # @param job_name [String] Job 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(job_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'jobName' => job_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::ARM::RecoveryServicesSiteRecovery::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Exports the details of the Azure Site Recovery jobs of the vault. + # + # The operation to export the details of the Azure Site Recovery jobs of the + # vault. + # + # @param job_query_parameter [JobQueryParameter] job query filter. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def export(job_query_parameter, custom_headers = nil) + response = export_async(job_query_parameter, custom_headers).value! + response.body unless response.nil? + end + + # + # @param job_query_parameter [JobQueryParameter] job query filter. + # @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 export_async(job_query_parameter, custom_headers = nil) + # Send request + promise = begin_export_async(job_query_parameter, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Job.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 list of jobs. + # + # Gets the list of Azure Site Recovery Jobs for the vault. + # + # @param filter [String] OData filter options. + # @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(filter = nil, custom_headers = nil) + first_page = list_as_lazy(filter, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of jobs. + # + # Gets the list of Azure Site Recovery Jobs for the vault. + # + # @param filter [String] OData filter options. + # @param custom_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(filter = nil, custom_headers = nil) + list_async(filter, custom_headers).value! + end + + # + # Gets the list of jobs. + # + # Gets the list of Azure Site Recovery Jobs for the vault. + # + # @param filter [String] OData filter options. + # @param [Hash{String => String}] 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(filter = nil, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationJobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'$filter' => filter}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::JobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Resumes the specified job. + # + # The operation to resume an Azure Site Recovery job + # + # @param job_name [String] Job identifier. + # @param resume_job_params [ResumeJobParams] Resume rob comments. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def begin_resume(job_name, resume_job_params, custom_headers = nil) + response = begin_resume_async(job_name, resume_job_params, custom_headers).value! + response.body unless response.nil? + end + + # + # Resumes the specified job. + # + # The operation to resume an Azure Site Recovery job + # + # @param job_name [String] Job identifier. + # @param resume_job_params [ResumeJobParams] Resume rob comments. + # @param custom_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_resume_with_http_info(job_name, resume_job_params, custom_headers = nil) + begin_resume_async(job_name, resume_job_params, custom_headers).value! + end + + # + # Resumes the specified job. + # + # The operation to resume an Azure Site Recovery job + # + # @param job_name [String] Job identifier. + # @param resume_job_params [ResumeJobParams] Resume rob comments. + # @param [Hash{String => String}] 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_resume_async(job_name, resume_job_params, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, 'resume_job_params is nil' if resume_job_params.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ResumeJobParams.mapper() + request_content = @client.serialize(request_mapper, resume_job_params) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'jobName' => job_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Restarts the specified job. + # + # The operation to restart an Azure Site Recovery job. + # + # @param job_name [String] Job identifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def begin_restart(job_name, custom_headers = nil) + response = begin_restart_async(job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Restarts the specified job. + # + # The operation to restart an Azure Site Recovery job. + # + # @param job_name [String] Job 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 begin_restart_with_http_info(job_name, custom_headers = nil) + begin_restart_async(job_name, custom_headers).value! + end + + # + # Restarts the specified job. + # + # The operation to restart an Azure Site Recovery job. + # + # @param job_name [String] Job 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 begin_restart_async(job_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'jobName' => job_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Cancels the specified job. + # + # The operation to cancel an Azure Site Recovery job. + # + # @param job_name [String] Job indentifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def begin_cancel(job_name, custom_headers = nil) + response = begin_cancel_async(job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Cancels the specified job. + # + # The operation to cancel an Azure Site Recovery job. + # + # @param job_name [String] Job indentifier. + # @param custom_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_cancel_with_http_info(job_name, custom_headers = nil) + begin_cancel_async(job_name, custom_headers).value! + end + + # + # Cancels the specified job. + # + # The operation to cancel an Azure Site Recovery job. + # + # @param job_name [String] Job indentifier. + # @param [Hash{String => String}] 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_cancel_async(job_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'jobName' => job_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Exports the details of the Azure Site Recovery jobs of the vault. + # + # The operation to export the details of the Azure Site Recovery jobs of the + # vault. + # + # @param job_query_parameter [JobQueryParameter] job query filter. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def begin_export(job_query_parameter, custom_headers = nil) + response = begin_export_async(job_query_parameter, custom_headers).value! + response.body unless response.nil? + end + + # + # Exports the details of the Azure Site Recovery jobs of the vault. + # + # The operation to export the details of the Azure Site Recovery jobs of the + # vault. + # + # @param job_query_parameter [JobQueryParameter] job query filter. + # @param custom_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_export_with_http_info(job_query_parameter, custom_headers = nil) + begin_export_async(job_query_parameter, custom_headers).value! + end + + # + # Exports the details of the Azure Site Recovery jobs of the vault. + # + # The operation to export the details of the Azure Site Recovery jobs of the + # vault. + # + # @param job_query_parameter [JobQueryParameter] job query filter. + # @param [Hash{String => String}] 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_export_async(job_query_parameter, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'job_query_parameter is nil' if job_query_parameter.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::JobQueryParameter.mapper() + request_content = @client.serialize(request_mapper, job_query_parameter) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::RecoveryServicesSiteRecovery::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the list of jobs. + # + # Gets the list of Azure Site Recovery Jobs for the vault. + # + # @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 [JobCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of jobs. + # + # Gets the list of Azure Site Recovery Jobs for the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of jobs. + # + # Gets the list of Azure Site Recovery Jobs for the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::JobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of jobs. + # + # Gets the list of Azure Site Recovery Jobs for the vault. + # + # @param filter [String] OData filter options. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobCollection] which provide lazy access to pages of the response. + # + def list_as_lazy(filter = nil, custom_headers = nil) + response = list_async(filter, 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_logical_networks.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_logical_networks.rb new file mode 100644 index 0000000000..bf11717797 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_logical_networks.rb @@ -0,0 +1,335 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationLogicalNetworks + # + class ReplicationLogicalNetworks + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationLogicalNetworks class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the list of logical networks under a fabric. + # + # Lists all the logical networks of the Azure Site Recovery fabric + # + # @param fabric_name [String] Server Id. + # @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_replication_fabrics(fabric_name, custom_headers = nil) + first_page = list_by_replication_fabrics_as_lazy(fabric_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of logical networks under a fabric. + # + # Lists all the logical networks of the Azure Site Recovery fabric + # + # @param fabric_name [String] Server Id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_fabrics_with_http_info(fabric_name, custom_headers = nil) + list_by_replication_fabrics_async(fabric_name, custom_headers).value! + end + + # + # Gets the list of logical networks under a fabric. + # + # Lists all the logical networks of the Azure Site Recovery fabric + # + # @param fabric_name [String] Server Id. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_fabrics_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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::ARM::RecoveryServicesSiteRecovery::Models::LogicalNetworkCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a logical network with specified server id and logical network name. + # + # Gets the details of a logical network. + # + # @param fabric_name [String] Server Id. + # @param logical_network_name [String] Logical network name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LogicalNetwork] operation results. + # + def get(fabric_name, logical_network_name, custom_headers = nil) + response = get_async(fabric_name, logical_network_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a logical network with specified server id and logical network name. + # + # Gets the details of a logical network. + # + # @param fabric_name [String] Server Id. + # @param logical_network_name [String] Logical network name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, logical_network_name, custom_headers = nil) + get_async(fabric_name, logical_network_name, custom_headers).value! + end + + # + # Gets a logical network with specified server id and logical network name. + # + # Gets the details of a logical network. + # + # @param fabric_name [String] Server Id. + # @param logical_network_name [String] Logical network name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, logical_network_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'logical_network_name is nil' if logical_network_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'logicalNetworkName' => logical_network_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::ARM::RecoveryServicesSiteRecovery::Models::LogicalNetwork.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of logical networks under a fabric. + # + # Lists all the logical networks of the Azure Site Recovery fabric + # + # @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 [LogicalNetworkCollection] operation results. + # + def list_by_replication_fabrics_next(next_page_link, custom_headers = nil) + response = list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of logical networks under a fabric. + # + # Lists all the logical networks of the Azure Site Recovery fabric + # + # @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_replication_fabrics_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of logical networks under a fabric. + # + # Lists all the logical networks of the Azure Site Recovery fabric + # + # @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_replication_fabrics_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::LogicalNetworkCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of logical networks under a fabric. + # + # Lists all the logical networks of the Azure Site Recovery fabric + # + # @param fabric_name [String] Server Id. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LogicalNetworkCollection] which provide lazy access to pages of the + # response. + # + def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers = nil) + response = list_by_replication_fabrics_async(fabric_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_fabrics_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb new file mode 100644 index 0000000000..343375a9ca --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb @@ -0,0 +1,1012 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationNetworkMappings + # + class ReplicationNetworkMappings + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationNetworkMappings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets all the network mappings under a vault. + # + # Lists all ASR network mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets all the network mappings under a vault. + # + # Lists all ASR network mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets all the network mappings under a vault. + # + # Lists all ASR network mappings in the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::NetworkMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the network mappings under a network. + # + # Lists all ASR network mappings for the specified network. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @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_replication_networks(fabric_name, network_name, custom_headers = nil) + first_page = list_by_replication_networks_as_lazy(fabric_name, network_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the network mappings under a network. + # + # Lists all ASR network mappings for the specified network. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_networks_with_http_info(fabric_name, network_name, custom_headers = nil) + list_by_replication_networks_async(fabric_name, network_name, custom_headers).value! + end + + # + # Gets all the network mappings under a network. + # + # Lists all ASR network mappings for the specified network. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_networks_async(fabric_name, network_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'network_name is nil' if network_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'networkName' => network_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::ARM::RecoveryServicesSiteRecovery::Models::NetworkMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 network mapping by name. + # + # Gets the details of an ASR network mapping + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkMapping] operation results. + # + def get(fabric_name, network_name, network_mapping_name, custom_headers = nil) + response = get_async(fabric_name, network_name, network_mapping_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets network mapping by name. + # + # Gets the details of an ASR network mapping + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, network_name, network_mapping_name, custom_headers = nil) + get_async(fabric_name, network_name, network_mapping_name, custom_headers).value! + end + + # + # Gets network mapping by name. + # + # Gets the details of an ASR network mapping + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, network_name, network_mapping_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'network_name is nil' if network_name.nil? + fail ArgumentError, 'network_mapping_name is nil' if network_mapping_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'networkName' => network_name,'networkMappingName' => network_mapping_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::ARM::RecoveryServicesSiteRecovery::Models::NetworkMapping.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 network mapping. + # + # The operation to create an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [CreateNetworkMappingInput] Create network mapping input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkMapping] operation results. + # + def create(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + response = create_async(fabric_name, network_name, network_mapping_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [CreateNetworkMappingInput] Create network mapping input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + # Send request + promise = begin_create_async(fabric_name, network_name, network_mapping_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::NetworkMapping.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 + + # + # Delete network mapping. + # + # The operation to delete a network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] ARM Resource Name for network mapping. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, network_name, network_mapping_name, custom_headers = nil) + response = delete_async(fabric_name, network_name, network_mapping_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] ARM Resource Name for network mapping. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, network_name, network_mapping_name, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, network_name, network_mapping_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates network mapping. + # + # The operation to update an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [UpdateNetworkMappingInput] Update network mapping input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkMapping] operation results. + # + def update(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + response = update_async(fabric_name, network_name, network_mapping_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [UpdateNetworkMappingInput] Update network mapping input. + # @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(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + # Send request + promise = begin_update_async(fabric_name, network_name, network_mapping_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::NetworkMapping.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 network mapping. + # + # The operation to create an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [CreateNetworkMappingInput] Create network mapping input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkMapping] operation results. + # + def begin_create(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + response = begin_create_async(fabric_name, network_name, network_mapping_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates network mapping. + # + # The operation to create an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [CreateNetworkMappingInput] Create network mapping input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + begin_create_async(fabric_name, network_name, network_mapping_name, input, custom_headers).value! + end + + # + # Creates network mapping. + # + # The operation to create an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [CreateNetworkMappingInput] Create network mapping input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'network_name is nil' if network_name.nil? + fail ArgumentError, 'network_mapping_name is nil' if network_mapping_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::CreateNetworkMappingInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'networkName' => network_name,'networkMappingName' => network_mapping_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::NetworkMapping.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 network mapping. + # + # The operation to delete a network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] ARM Resource Name for network mapping. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, network_name, network_mapping_name, custom_headers = nil) + response = begin_delete_async(fabric_name, network_name, network_mapping_name, custom_headers).value! + nil + end + + # + # Delete network mapping. + # + # The operation to delete a network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] ARM Resource Name for network mapping. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, network_name, network_mapping_name, custom_headers = nil) + begin_delete_async(fabric_name, network_name, network_mapping_name, custom_headers).value! + end + + # + # Delete network mapping. + # + # The operation to delete a network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] ARM Resource Name for network mapping. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, network_name, network_mapping_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'network_name is nil' if network_name.nil? + fail ArgumentError, 'network_mapping_name is nil' if network_mapping_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'networkName' => network_name,'networkMappingName' => network_mapping_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates network mapping. + # + # The operation to update an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [UpdateNetworkMappingInput] Update network mapping input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkMapping] operation results. + # + def begin_update(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + response = begin_update_async(fabric_name, network_name, network_mapping_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates network mapping. + # + # The operation to update an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [UpdateNetworkMappingInput] Update network mapping input. + # @param custom_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(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + begin_update_async(fabric_name, network_name, network_mapping_name, input, custom_headers).value! + end + + # + # Updates network mapping. + # + # The operation to update an ASR network mapping. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param network_mapping_name [String] Network mapping name. + # @param input [UpdateNetworkMappingInput] Update network mapping input. + # @param [Hash{String => String}] 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(fabric_name, network_name, network_mapping_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'network_name is nil' if network_name.nil? + fail ArgumentError, 'network_mapping_name is nil' if network_mapping_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UpdateNetworkMappingInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'networkName' => network_name,'networkMappingName' => network_mapping_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(: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::ARM::RecoveryServicesSiteRecovery::Models::NetworkMapping.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the network mappings under a vault. + # + # Lists all ASR network mappings in the vault. + # + # @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 [NetworkMappingCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the network mappings under a vault. + # + # Lists all ASR network mappings in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the network mappings under a vault. + # + # Lists all ASR network mappings in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::NetworkMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the network mappings under a network. + # + # Lists all ASR network mappings for the specified network. + # + # @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 [NetworkMappingCollection] operation results. + # + def list_by_replication_networks_next(next_page_link, custom_headers = nil) + response = list_by_replication_networks_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the network mappings under a network. + # + # Lists all ASR network mappings for the specified network. + # + # @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_replication_networks_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_networks_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the network mappings under a network. + # + # Lists all ASR network mappings for the specified network. + # + # @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_replication_networks_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::NetworkMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the network mappings under a vault. + # + # Lists all ASR network mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkMappingCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(custom_headers = nil) + response = list_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all the network mappings under a network. + # + # Lists all ASR network mappings for the specified network. + # + # @param fabric_name [String] Primary fabric name. + # @param network_name [String] Primary network name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkMappingCollection] which provide lazy access to pages of the + # response. + # + def list_by_replication_networks_as_lazy(fabric_name, network_name, custom_headers = nil) + response = list_by_replication_networks_async(fabric_name, network_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_networks_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_networks.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_networks.rb new file mode 100644 index 0000000000..24f13bc811 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_networks.rb @@ -0,0 +1,541 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationNetworks + # + class ReplicationNetworks + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationNetworks class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the list of networks. View-only API. + # + # Lists the networks available in a vault + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of networks. View-only API. + # + # Lists the networks available in a vault + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of networks. View-only API. + # + # Lists the networks available in a vault + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationNetworks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::NetworkCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of networks under a fabric. + # + # Lists the networks available for a fabric. + # + # @param fabric_name [String] Fabric name + # @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_replication_fabrics(fabric_name, custom_headers = nil) + first_page = list_by_replication_fabrics_as_lazy(fabric_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of networks under a fabric. + # + # Lists the networks available for a fabric. + # + # @param fabric_name [String] Fabric name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_fabrics_with_http_info(fabric_name, custom_headers = nil) + list_by_replication_fabrics_async(fabric_name, custom_headers).value! + end + + # + # Gets the list of networks under a fabric. + # + # Lists the networks available for a fabric. + # + # @param fabric_name [String] Fabric name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_fabrics_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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::ARM::RecoveryServicesSiteRecovery::Models::NetworkCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a network with specified server id and network name. + # + # Gets the details of a network. + # + # @param fabric_name [String] Server Id. + # @param network_name [String] Primary network name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Network] operation results. + # + def get(fabric_name, network_name, custom_headers = nil) + response = get_async(fabric_name, network_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a network with specified server id and network name. + # + # Gets the details of a network. + # + # @param fabric_name [String] Server Id. + # @param network_name [String] Primary network name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, network_name, custom_headers = nil) + get_async(fabric_name, network_name, custom_headers).value! + end + + # + # Gets a network with specified server id and network name. + # + # Gets the details of a network. + # + # @param fabric_name [String] Server Id. + # @param network_name [String] Primary network name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, network_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'network_name is nil' if network_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'networkName' => network_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::ARM::RecoveryServicesSiteRecovery::Models::Network.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of networks. View-only API. + # + # Lists the networks available in a vault + # + # @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 [NetworkCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of networks. View-only API. + # + # Lists the networks available in a vault + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of networks. View-only API. + # + # Lists the networks available in a vault + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::NetworkCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of networks under a fabric. + # + # Lists the networks available for a fabric. + # + # @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 [NetworkCollection] operation results. + # + def list_by_replication_fabrics_next(next_page_link, custom_headers = nil) + response = list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of networks under a fabric. + # + # Lists the networks available for a fabric. + # + # @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_replication_fabrics_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of networks under a fabric. + # + # Lists the networks available for a fabric. + # + # @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_replication_fabrics_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::NetworkCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of networks. View-only API. + # + # Lists the networks available in a vault + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(custom_headers = nil) + response = list_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of networks under a fabric. + # + # Lists the networks available for a fabric. + # + # @param fabric_name [String] Fabric name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkCollection] which provide lazy access to pages of the + # response. + # + def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers = nil) + response = list_by_replication_fabrics_async(fabric_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_fabrics_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_policies.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_policies.rb new file mode 100644 index 0000000000..399b5515ce --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_policies.rb @@ -0,0 +1,752 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationPolicies + # + class ReplicationPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the requested policy. + # + # Gets the details of a replication policy. + # + # @param policy_name [String] Replication policy name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Policy] operation results. + # + def get(policy_name, custom_headers = nil) + response = get_async(policy_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the requested policy. + # + # Gets the details of a replication policy. + # + # @param policy_name [String] Replication policy name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(policy_name, custom_headers = nil) + get_async(policy_name, custom_headers).value! + end + + # + # Gets the requested policy. + # + # Gets the details of a replication policy. + # + # @param policy_name [String] Replication policy name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(policy_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'policy_name is nil' if policy_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'policyName' => policy_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::ARM::RecoveryServicesSiteRecovery::Models::Policy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates the policy. + # + # The operation to create a replication policy + # + # @param policy_name [String] Replication policy name + # @param input [CreatePolicyInput] Create policy input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Policy] operation results. + # + def create(policy_name, input, custom_headers = nil) + response = create_async(policy_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param policy_name [String] Replication policy name + # @param input [CreatePolicyInput] Create policy input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(policy_name, input, custom_headers = nil) + # Send request + promise = begin_create_async(policy_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Policy.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 + + # + # Delete the policy. + # + # The operation to delete a replication policy. + # + # @param policy_name [String] Replication policy name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(policy_name, custom_headers = nil) + response = delete_async(policy_name, custom_headers).value! + nil + end + + # + # @param policy_name [String] Replication policy name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(policy_name, custom_headers = nil) + # Send request + promise = begin_delete_async(policy_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates the protection profile. + # + # The operation to update a replication policy. + # + # @param policy_name [String] Protection profile Id. + # @param input [UpdatePolicyInput] Update Protection Profile Input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Policy] operation results. + # + def update(policy_name, input, custom_headers = nil) + response = update_async(policy_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param policy_name [String] Protection profile Id. + # @param input [UpdatePolicyInput] Update Protection Profile Input + # @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(policy_name, input, custom_headers = nil) + # Send request + promise = begin_update_async(policy_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Policy.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 list of replication policies + # + # Lists the replication policies for a vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of replication policies + # + # Lists the replication policies for a vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of replication policies + # + # Lists the replication policies for a vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationPolicies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::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 + + # + # Creates the policy. + # + # The operation to create a replication policy + # + # @param policy_name [String] Replication policy name + # @param input [CreatePolicyInput] Create policy input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Policy] operation results. + # + def begin_create(policy_name, input, custom_headers = nil) + response = begin_create_async(policy_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates the policy. + # + # The operation to create a replication policy + # + # @param policy_name [String] Replication policy name + # @param input [CreatePolicyInput] Create policy input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(policy_name, input, custom_headers = nil) + begin_create_async(policy_name, input, custom_headers).value! + end + + # + # Creates the policy. + # + # The operation to create a replication policy + # + # @param policy_name [String] Replication policy name + # @param input [CreatePolicyInput] Create policy input + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(policy_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'policy_name is nil' if policy_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::CreatePolicyInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'policyName' => policy_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Policy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the policy. + # + # The operation to delete a replication policy. + # + # @param policy_name [String] Replication policy name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(policy_name, custom_headers = nil) + response = begin_delete_async(policy_name, custom_headers).value! + nil + end + + # + # Delete the policy. + # + # The operation to delete a replication policy. + # + # @param policy_name [String] Replication policy name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(policy_name, custom_headers = nil) + begin_delete_async(policy_name, custom_headers).value! + end + + # + # Delete the policy. + # + # The operation to delete a replication policy. + # + # @param policy_name [String] Replication policy name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(policy_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'policy_name is nil' if policy_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'policyName' => policy_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates the protection profile. + # + # The operation to update a replication policy. + # + # @param policy_name [String] Protection profile Id. + # @param input [UpdatePolicyInput] Update Protection Profile Input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Policy] operation results. + # + def begin_update(policy_name, input, custom_headers = nil) + response = begin_update_async(policy_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the protection profile. + # + # The operation to update a replication policy. + # + # @param policy_name [String] Protection profile Id. + # @param input [UpdatePolicyInput] Update Protection Profile Input + # @param custom_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(policy_name, input, custom_headers = nil) + begin_update_async(policy_name, input, custom_headers).value! + end + + # + # Updates the protection profile. + # + # The operation to update a replication policy. + # + # @param policy_name [String] Protection profile Id. + # @param input [UpdatePolicyInput] Update Protection Profile Input + # @param [Hash{String => String}] 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(policy_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'policy_name is nil' if policy_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UpdatePolicyInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'policyName' => policy_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(: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::ARM::RecoveryServicesSiteRecovery::Models::Policy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of replication policies + # + # Lists the replication policies for a vault. + # + # @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 [PolicyCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of replication policies + # + # Lists the replication policies for a vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of replication policies + # + # Lists the replication policies for a vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::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 list of replication policies + # + # Lists the replication policies for a vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PolicyCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb new file mode 100644 index 0000000000..68c0eef708 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb @@ -0,0 +1,344 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationProtectableItems + # + class ReplicationProtectableItems + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationProtectableItems class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the details of a protectable item. + # + # The operation to get the details of a protectable item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param protectable_item_name [String] Protectable item name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectableItem] operation results. + # + def get(fabric_name, protection_container_name, protectable_item_name, custom_headers = nil) + response = get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of a protectable item. + # + # The operation to get the details of a protectable item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param protectable_item_name [String] Protectable item name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, protection_container_name, protectable_item_name, custom_headers = nil) + get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers).value! + end + + # + # Gets the details of a protectable item. + # + # The operation to get the details of a protectable item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param protectable_item_name [String] Protectable item name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'protectable_item_name is nil' if protectable_item_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'protectableItemName' => protectable_item_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::ARM::RecoveryServicesSiteRecovery::Models::ProtectableItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of protectable items. + # + # Lists the protectable items in a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @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_replication_protection_containers(fabric_name, protection_container_name, custom_headers = nil) + first_page = list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of protectable items. + # + # Lists the protectable items in a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_protection_containers_with_http_info(fabric_name, protection_container_name, custom_headers = nil) + list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers).value! + end + + # + # Gets the list of protectable items. + # + # Lists the protectable items in a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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::ARM::RecoveryServicesSiteRecovery::Models::ProtectableItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of protectable items. + # + # Lists the protectable items in a protection container. + # + # @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 [ProtectableItemCollection] operation results. + # + def list_by_replication_protection_containers_next(next_page_link, custom_headers = nil) + response = list_by_replication_protection_containers_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of protectable items. + # + # Lists the protectable items in a protection container. + # + # @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_replication_protection_containers_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_protection_containers_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of protectable items. + # + # Lists the protectable items in a protection container. + # + # @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_replication_protection_containers_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectableItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of protectable items. + # + # Lists the protectable items in a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectableItemCollection] which provide lazy access to pages of the + # response. + # + def list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers = nil) + response = list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_protection_containers_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protected_items.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protected_items.rb new file mode 100644 index 0000000000..ea8f2c0416 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protected_items.rb @@ -0,0 +1,2757 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationProtectedItems + # + class ReplicationProtectedItems + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationProtectedItems class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the list of Replication protected items. + # + # Gets the list of ASR replication protected items in the protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @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_replication_protection_containers(fabric_name, protection_container_name, custom_headers = nil) + first_page = list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of Replication protected items. + # + # Gets the list of ASR replication protected items in the protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_protection_containers_with_http_info(fabric_name, protection_container_name, custom_headers = nil) + list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers).value! + end + + # + # Gets the list of Replication protected items. + # + # Gets the list of ASR replication protected items in the protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of replication protected items. + # + # Gets the list of ASR replication protected items in the vault. + # + # @param skip_token [String] The pagination token. Possible values: "FabricId" + # or "FabricId_CloudId" or null + # @param filter [String] OData filter options. + # @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(skip_token = nil, filter = nil, custom_headers = nil) + first_page = list_as_lazy(skip_token, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of replication protected items. + # + # Gets the list of ASR replication protected items in the vault. + # + # @param skip_token [String] The pagination token. Possible values: "FabricId" + # or "FabricId_CloudId" or null + # @param filter [String] OData filter options. + # @param custom_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(skip_token = nil, filter = nil, custom_headers = nil) + list_async(skip_token, filter, custom_headers).value! + end + + # + # Gets the list of replication protected items. + # + # Gets the list of ASR replication protected items in the vault. + # + # @param skip_token [String] The pagination token. Possible values: "FabricId" + # or "FabricId_CloudId" or null + # @param filter [String] OData filter options. + # @param [Hash{String => String}] 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(skip_token = nil, filter = nil, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationProtectedItems' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version,'skipToken' => skip_token,'$filter' => filter}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Change or apply recovery point. + # + # The operation to change the recovery point of a failed over replication + # protected item. + # + # @param fabric_name [String] The ARM fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replicated protected + # item's name. + # @param apply_recovery_point_input [ApplyRecoveryPointInput] The + # ApplyRecoveryPointInput. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def apply_recovery_point(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers = nil) + response = apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] The ARM fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replicated protected + # item's name. + # @param apply_recovery_point_input [ApplyRecoveryPointInput] The + # ApplyRecoveryPointInput. + # @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_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers = nil) + # Send request + promise = begin_apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Resynchronize or repair replication. + # + # The operation to start resynchronize/repair replication for a replication + # protected item requiring resynchronization. + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the container. + # @param replicated_protected_item_name [String] The name of the replication + # protected item. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def repair_replication(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the container. + # @param replicated_protected_item_name [String] The name of the replication + # protected item. + # @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 repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + # Send request + promise = begin_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Update the mobility service on a protected item. + # + # The operation to update(push update) the installed mobility service software + # on a replication protected item to the latest available version. + # + # @param fabric_name [String] The name of the fabric containing the protected + # item. + # @param protection_container_name [String] The name of the container + # containing the protected item. + # @param replication_protected_item_name [String] The name of the protected + # item on which the agent is to be updated. + # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request + # to update the mobility service on the protected item. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def update_mobility_service(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers = nil) + response = update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] The name of the fabric containing the protected + # item. + # @param protection_container_name [String] The name of the container + # containing the protected item. + # @param replication_protected_item_name [String] The name of the protected + # item on which the agent is to be updated. + # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request + # to update the mobility service on the protected item. + # @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_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers = nil) + # Send request + promise = begin_update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Execute Reverse Replication\Reprotect + # + # Operation to reprotect or reverse replicate a failed over replication + # protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param rr_input [ReverseReplicationInput] Disable protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def reprotect(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers = nil) + response = reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param rr_input [ReverseReplicationInput] Disable protection input. + # @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 reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers = nil) + # Send request + promise = begin_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Execute commit failover + # + # Operation to commit the failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def failover_commit(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + # Send request + promise = begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Execute test failover cleanup. + # + # Operation to clean up the test failover of a replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def test_failover_cleanup(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers = nil) + response = test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input. + # @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 test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers = nil) + # Send request + promise = begin_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Execute test failover + # + # Operation to perform a test failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [TestFailoverInput] Test failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def test_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + response = test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [TestFailoverInput] Test failover input. + # @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 test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + # Send request + promise = begin_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Execute unplanned failover + # + # Operation to initiate a failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [UnplannedFailoverInput] Disable protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def unplanned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + response = unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [UnplannedFailoverInput] Disable protection input. + # @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 unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + # Send request + promise = begin_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Execute planned failover + # + # Operation to initiate a planned failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [PlannedFailoverInput] Disable protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def planned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + response = planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [PlannedFailoverInput] Disable protection input. + # @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 planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + # Send request + promise = begin_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Disables protection. + # + # The operation to disable replication on a replication protected item. This + # will also remove the item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param disable_protection_input [DisableProtectionInput] Disable protection + # input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers = nil) + response = delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param disable_protection_input [DisableProtectionInput] Disable protection + # input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the details of a Replication protected item. + # + # Gets the details of an ASR replication protected item. + # + # @param fabric_name [String] Fabric unique name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def get(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = get_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of a Replication protected item. + # + # Gets the details of an ASR replication protected item. + # + # @param fabric_name [String] Fabric unique name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + get_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + end + + # + # Gets the details of a Replication protected item. + # + # Gets the details of an ASR replication protected item. + # + # @param fabric_name [String] Fabric unique name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Enables protection. + # + # The operation to create an ASR replication protected item (Enable + # replication). + # + # @param fabric_name [String] Name of the fabric. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] A name for the replication + # protected item. + # @param input [EnableProtectionInput] Enable Protection Input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def create(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers = nil) + response = create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Name of the fabric. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] A name for the replication + # protected item. + # @param input [EnableProtectionInput] Enable Protection Input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers = nil) + # Send request + promise = begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Purges protection. + # + # The operation to delete or purge a replication protected item. This operation + # will force delete the replication protected item. Use the remove operation on + # replication protected item to perform a clean disable replication for the + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def purge(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + # Send request + promise = begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates protection. + # + # The operation to update the recovery settings of an ASR replication protected + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param update_protection_input [UpdateReplicationProtectedItemInput] Update + # protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def update(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers = nil) + response = update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param update_protection_input [UpdateReplicationProtectedItemInput] Update + # protection input. + # @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(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers = nil) + # Send request + promise = begin_update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.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 + + # + # Change or apply recovery point. + # + # The operation to change the recovery point of a failed over replication + # protected item. + # + # @param fabric_name [String] The ARM fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replicated protected + # item's name. + # @param apply_recovery_point_input [ApplyRecoveryPointInput] The + # ApplyRecoveryPointInput. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_apply_recovery_point(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers = nil) + response = begin_apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Change or apply recovery point. + # + # The operation to change the recovery point of a failed over replication + # protected item. + # + # @param fabric_name [String] The ARM fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replicated protected + # item's name. + # @param apply_recovery_point_input [ApplyRecoveryPointInput] The + # ApplyRecoveryPointInput. + # @param custom_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_recovery_point_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers = nil) + begin_apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers).value! + end + + # + # Change or apply recovery point. + # + # The operation to change the recovery point of a failed over replication + # protected item. + # + # @param fabric_name [String] The ARM fabric name. + # @param protection_container_name [String] The protection container name. + # @param replicated_protected_item_name [String] The replicated protected + # item's name. + # @param apply_recovery_point_input [ApplyRecoveryPointInput] The + # ApplyRecoveryPointInput. + # @param [Hash{String => String}] 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_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'apply_recovery_point_input is nil' if apply_recovery_point_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ApplyRecoveryPointInput.mapper() + request_content = @client.serialize(request_mapper, apply_recovery_point_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Resynchronize or repair replication. + # + # The operation to start resynchronize/repair replication for a replication + # protected item requiring resynchronization. + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the container. + # @param replicated_protected_item_name [String] The name of the replication + # protected item. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_repair_replication(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = begin_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Resynchronize or repair replication. + # + # The operation to start resynchronize/repair replication for a replication + # protected item requiring resynchronization. + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the container. + # @param replicated_protected_item_name [String] The name of the replication + # protected item. + # @param custom_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_repair_replication_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + begin_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + end + + # + # Resynchronize or repair replication. + # + # The operation to start resynchronize/repair replication for a replication + # protected item requiring resynchronization. + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the container. + # @param replicated_protected_item_name [String] The name of the replication + # protected item. + # @param [Hash{String => String}] 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_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the mobility service on a protected item. + # + # The operation to update(push update) the installed mobility service software + # on a replication protected item to the latest available version. + # + # @param fabric_name [String] The name of the fabric containing the protected + # item. + # @param protection_container_name [String] The name of the container + # containing the protected item. + # @param replication_protected_item_name [String] The name of the protected + # item on which the agent is to be updated. + # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request + # to update the mobility service on the protected item. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_update_mobility_service(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers = nil) + response = begin_update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Update the mobility service on a protected item. + # + # The operation to update(push update) the installed mobility service software + # on a replication protected item to the latest available version. + # + # @param fabric_name [String] The name of the fabric containing the protected + # item. + # @param protection_container_name [String] The name of the container + # containing the protected item. + # @param replication_protected_item_name [String] The name of the protected + # item on which the agent is to be updated. + # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request + # to update the mobility service on the protected item. + # @param custom_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_mobility_service_with_http_info(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers = nil) + begin_update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers).value! + end + + # + # Update the mobility service on a protected item. + # + # The operation to update(push update) the installed mobility service software + # on a replication protected item to the latest available version. + # + # @param fabric_name [String] The name of the fabric containing the protected + # item. + # @param protection_container_name [String] The name of the container + # containing the protected item. + # @param replication_protected_item_name [String] The name of the protected + # item on which the agent is to be updated. + # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request + # to update the mobility service on the protected item. + # @param [Hash{String => String}] 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_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replication_protected_item_name is nil' if replication_protected_item_name.nil? + fail ArgumentError, 'update_mobility_service_request is nil' if update_mobility_service_request.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UpdateMobilityServiceRequest.mapper() + request_content = @client.serialize(request_mapper, update_mobility_service_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicationProtectedItemName}/updateMobilityService' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicationProtectedItemName' => replication_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute Reverse Replication\Reprotect + # + # Operation to reprotect or reverse replicate a failed over replication + # protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param rr_input [ReverseReplicationInput] Disable protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_reprotect(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers = nil) + response = begin_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute Reverse Replication\Reprotect + # + # Operation to reprotect or reverse replicate a failed over replication + # protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param rr_input [ReverseReplicationInput] Disable protection input. + # @param custom_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_reprotect_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers = nil) + begin_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers).value! + end + + # + # Execute Reverse Replication\Reprotect + # + # Operation to reprotect or reverse replicate a failed over replication + # protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param rr_input [ReverseReplicationInput] Disable protection input. + # @param [Hash{String => String}] 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_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'rr_input is nil' if rr_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReverseReplicationInput.mapper() + request_content = @client.serialize(request_mapper, rr_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute commit failover + # + # Operation to commit the failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_failover_commit(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute commit failover + # + # Operation to commit the failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_failover_commit_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + end + + # + # Execute commit failover + # + # Operation to commit the failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute test failover cleanup. + # + # Operation to clean up the test failover of a replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_test_failover_cleanup(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers = nil) + response = begin_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute test failover cleanup. + # + # Operation to clean up the test failover of a replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input. + # @param custom_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_test_failover_cleanup_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers = nil) + begin_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers).value! + end + + # + # Execute test failover cleanup. + # + # Operation to clean up the test failover of a replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input. + # @param [Hash{String => String}] 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_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'cleanup_input is nil' if cleanup_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::TestFailoverCleanupInput.mapper() + request_content = @client.serialize(request_mapper, cleanup_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute test failover + # + # Operation to perform a test failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [TestFailoverInput] Test failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_test_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + response = begin_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute test failover + # + # Operation to perform a test failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [TestFailoverInput] Test failover input. + # @param custom_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_test_failover_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + begin_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + end + + # + # Execute test failover + # + # Operation to perform a test failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [TestFailoverInput] Test failover input. + # @param [Hash{String => String}] 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_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'failover_input is nil' if failover_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::TestFailoverInput.mapper() + request_content = @client.serialize(request_mapper, failover_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute unplanned failover + # + # Operation to initiate a failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [UnplannedFailoverInput] Disable protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_unplanned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + response = begin_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute unplanned failover + # + # Operation to initiate a failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [UnplannedFailoverInput] Disable protection input. + # @param custom_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_unplanned_failover_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + begin_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + end + + # + # Execute unplanned failover + # + # Operation to initiate a failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [UnplannedFailoverInput] Disable protection input. + # @param [Hash{String => String}] 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_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'failover_input is nil' if failover_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UnplannedFailoverInput.mapper() + request_content = @client.serialize(request_mapper, failover_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute planned failover + # + # Operation to initiate a planned failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [PlannedFailoverInput] Disable protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_planned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + response = begin_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute planned failover + # + # Operation to initiate a planned failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [PlannedFailoverInput] Disable protection input. + # @param custom_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_planned_failover_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + begin_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers).value! + end + + # + # Execute planned failover + # + # Operation to initiate a planned failover of the replication protected item. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param failover_input [PlannedFailoverInput] Disable protection input. + # @param [Hash{String => String}] 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_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'failover_input is nil' if failover_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::PlannedFailoverInput.mapper() + request_content = @client.serialize(request_mapper, failover_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Disables protection. + # + # The operation to disable replication on a replication protected item. This + # will also remove the item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param disable_protection_input [DisableProtectionInput] Disable protection + # input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers = nil) + response = begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers).value! + nil + end + + # + # Disables protection. + # + # The operation to disable replication on a replication protected item. This + # will also remove the item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param disable_protection_input [DisableProtectionInput] Disable protection + # input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers = nil) + begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers).value! + end + + # + # Disables protection. + # + # The operation to disable replication on a replication protected item. This + # will also remove the item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param disable_protection_input [DisableProtectionInput] Disable protection + # input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'disable_protection_input is nil' if disable_protection_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::DisableProtectionInput.mapper() + request_content = @client.serialize(request_mapper, disable_protection_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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 == 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 + + # + # Enables protection. + # + # The operation to create an ASR replication protected item (Enable + # replication). + # + # @param fabric_name [String] Name of the fabric. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] A name for the replication + # protected item. + # @param input [EnableProtectionInput] Enable Protection Input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_create(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers = nil) + response = begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Enables protection. + # + # The operation to create an ASR replication protected item (Enable + # replication). + # + # @param fabric_name [String] Name of the fabric. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] A name for the replication + # protected item. + # @param input [EnableProtectionInput] Enable Protection Input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers = nil) + begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers).value! + end + + # + # Enables protection. + # + # The operation to create an ASR replication protected item (Enable + # replication). + # + # @param fabric_name [String] Name of the fabric. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] A name for the replication + # protected item. + # @param input [EnableProtectionInput] Enable Protection Input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::EnableProtectionInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Purges protection. + # + # The operation to delete or purge a replication protected item. This operation + # will force delete the replication protected item. Use the remove operation on + # replication protected item to perform a clean disable replication for the + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_purge(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + response = begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + nil + end + + # + # Purges protection. + # + # The operation to delete or purge a replication protected item. This operation + # will force delete the replication protected item. Use the remove operation on + # replication protected item to perform a clean disable replication for the + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_purge_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers).value! + end + + # + # Purges protection. + # + # The operation to delete or purge a replication protected item. This operation + # will force delete the replication protected item. Use the remove operation on + # replication protected item to perform a clean disable replication for the + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates protection. + # + # The operation to update the recovery settings of an ASR replication protected + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param update_protection_input [UpdateReplicationProtectedItemInput] Update + # protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItem] operation results. + # + def begin_update(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers = nil) + response = begin_update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates protection. + # + # The operation to update the recovery settings of an ASR replication protected + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param update_protection_input [UpdateReplicationProtectedItemInput] Update + # protection input. + # @param custom_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(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers = nil) + begin_update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers).value! + end + + # + # Updates protection. + # + # The operation to update the recovery settings of an ASR replication protected + # item. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param replicated_protected_item_name [String] Replication protected item + # name. + # @param update_protection_input [UpdateReplicationProtectedItemInput] Update + # protection input. + # @param [Hash{String => String}] 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(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil? + fail ArgumentError, 'update_protection_input is nil' if update_protection_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UpdateReplicationProtectedItemInput.mapper() + request_content = @client.serialize(request_mapper, update_protection_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_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(: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::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of Replication protected items. + # + # Gets the list of ASR replication protected items in the protection container. + # + # @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 [ReplicationProtectedItemCollection] operation results. + # + def list_by_replication_protection_containers_next(next_page_link, custom_headers = nil) + response = list_by_replication_protection_containers_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of Replication protected items. + # + # Gets the list of ASR replication protected items in the protection container. + # + # @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_replication_protection_containers_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_protection_containers_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of Replication protected items. + # + # Gets the list of ASR replication protected items in the protection container. + # + # @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_replication_protection_containers_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of replication protected items. + # + # Gets the list of ASR replication protected items in the vault. + # + # @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 [ReplicationProtectedItemCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of replication protected items. + # + # Gets the list of ASR replication protected items in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of replication protected items. + # + # Gets the list of ASR replication protected items in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ReplicationProtectedItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of Replication protected items. + # + # Gets the list of ASR replication protected items in the protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItemCollection] which provide lazy access to + # pages of the response. + # + def list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers = nil) + response = list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_protection_containers_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of replication protected items. + # + # Gets the list of ASR replication protected items in the vault. + # + # @param skip_token [String] The pagination token. Possible values: "FabricId" + # or "FabricId_CloudId" or null + # @param filter [String] OData filter options. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationProtectedItemCollection] which provide lazy access to + # pages of the response. + # + def list_as_lazy(skip_token = nil, filter = nil, custom_headers = nil) + response = list_async(skip_token, filter, 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb new file mode 100644 index 0000000000..8d16e5a809 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb @@ -0,0 +1,1002 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationProtectionContainerMappings + # + class ReplicationProtectionContainerMappings + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationProtectionContainerMappings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Remove protection container mapping. + # + # The operation to delete or remove a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param removal_input [RemoveProtectionContainerMappingInput] Removal input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers = nil) + response = delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param removal_input [RemoveProtectionContainerMappingInput] Removal input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a protection container mapping/ + # + # Gets the details of a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection Container mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainerMapping] operation results. + # + def get(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + response = get_async(fabric_name, protection_container_name, mapping_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a protection container mapping/ + # + # Gets the details of a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection Container mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + get_async(fabric_name, protection_container_name, mapping_name, custom_headers).value! + end + + # + # Gets a protection container mapping/ + # + # Gets the details of a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection Container mapping name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'mapping_name is nil' if mapping_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'mappingName' => mapping_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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerMapping.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 protection container mapping. + # + # The operation to create a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param creation_input [CreateProtectionContainerMappingInput] Mapping + # creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainerMapping] operation results. + # + def create(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers = nil) + response = create_async(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param creation_input [CreateProtectionContainerMappingInput] Mapping + # creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers = nil) + # Send request + promise = begin_create_async(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerMapping.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 + + # + # Purge protection container mapping. + # + # The operation to purge(force delete) a protection container mapping + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def purge(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + response = purge_async(fabric_name, protection_container_name, mapping_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def purge_async(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + # Send request + promise = begin_purge_async(fabric_name, protection_container_name, mapping_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the list of protection container mappings for a protection container. + # + # Lists the protection container mappings for a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @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_replication_protection_containers(fabric_name, protection_container_name, custom_headers = nil) + first_page = list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of protection container mappings for a protection container. + # + # Lists the protection container mappings for a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_protection_containers_with_http_info(fabric_name, protection_container_name, custom_headers = nil) + list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers).value! + end + + # + # Gets the list of protection container mappings for a protection container. + # + # Lists the protection container mappings for a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of all protection container mappings in a vault. + # + # Lists the protection container mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of all protection container mappings in a vault. + # + # Lists the protection container mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of all protection container mappings in a vault. + # + # Lists the protection container mappings in the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 protection container mapping. + # + # The operation to delete or remove a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param removal_input [RemoveProtectionContainerMappingInput] Removal input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers = nil) + response = begin_delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers).value! + nil + end + + # + # Remove protection container mapping. + # + # The operation to delete or remove a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param removal_input [RemoveProtectionContainerMappingInput] Removal input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers = nil) + begin_delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers).value! + end + + # + # Remove protection container mapping. + # + # The operation to delete or remove a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param removal_input [RemoveProtectionContainerMappingInput] Removal input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, protection_container_name, mapping_name, removal_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'mapping_name is nil' if mapping_name.nil? + fail ArgumentError, 'removal_input is nil' if removal_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RemoveProtectionContainerMappingInput.mapper() + request_content = @client.serialize(request_mapper, removal_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'mappingName' => mapping_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 == 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 + + # + # Create protection container mapping. + # + # The operation to create a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param creation_input [CreateProtectionContainerMappingInput] Mapping + # creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainerMapping] operation results. + # + def begin_create(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers = nil) + response = begin_create_async(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Create protection container mapping. + # + # The operation to create a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param creation_input [CreateProtectionContainerMappingInput] Mapping + # creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers = nil) + begin_create_async(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers).value! + end + + # + # Create protection container mapping. + # + # The operation to create a protection container mapping. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param creation_input [CreateProtectionContainerMappingInput] Mapping + # creation input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(fabric_name, protection_container_name, mapping_name, creation_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'mapping_name is nil' if mapping_name.nil? + fail ArgumentError, 'creation_input is nil' if creation_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::CreateProtectionContainerMappingInput.mapper() + request_content = @client.serialize(request_mapper, creation_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'mappingName' => mapping_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerMapping.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Purge protection container mapping. + # + # The operation to purge(force delete) a protection container mapping + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_purge(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + response = begin_purge_async(fabric_name, protection_container_name, mapping_name, custom_headers).value! + nil + end + + # + # Purge protection container mapping. + # + # The operation to purge(force delete) a protection container mapping + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_purge_with_http_info(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + begin_purge_async(fabric_name, protection_container_name, mapping_name, custom_headers).value! + end + + # + # Purge protection container mapping. + # + # The operation to purge(force delete) a protection container mapping + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param mapping_name [String] Protection container mapping name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_purge_async(fabric_name, protection_container_name, mapping_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'mapping_name is nil' if mapping_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'mappingName' => mapping_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the list of protection container mappings for a protection container. + # + # Lists the protection container mappings for a protection container. + # + # @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 [ProtectionContainerMappingCollection] operation results. + # + def list_by_replication_protection_containers_next(next_page_link, custom_headers = nil) + response = list_by_replication_protection_containers_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of protection container mappings for a protection container. + # + # Lists the protection container mappings for a protection container. + # + # @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_replication_protection_containers_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_protection_containers_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of protection container mappings for a protection container. + # + # Lists the protection container mappings for a protection container. + # + # @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_replication_protection_containers_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of all protection container mappings in a vault. + # + # Lists the protection container mappings in the vault. + # + # @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 [ProtectionContainerMappingCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of all protection container mappings in a vault. + # + # Lists the protection container mappings in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of all protection container mappings in a vault. + # + # Lists the protection container mappings in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of protection container mappings for a protection container. + # + # Lists the protection container mappings for a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainerMappingCollection] which provide lazy access to + # pages of the response. + # + def list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers = nil) + response = list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_protection_containers_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of all protection container mappings in a vault. + # + # Lists the protection container mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainerMappingCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb new file mode 100644 index 0000000000..3f0ebc4679 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb @@ -0,0 +1,1175 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationProtectionContainers + # + class ReplicationProtectionContainers + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationProtectionContainers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Switches protection from one container to another or one replication provider + # to another. + # + # Operation to switch protection from one container to another or one + # replication provider to another. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param switch_input [SwitchProtectionInput] Switch protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainer] operation results. + # + def switch_protection(fabric_name, protection_container_name, switch_input, custom_headers = nil) + response = switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param switch_input [SwitchProtectionInput] Switch protection input. + # @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 switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers = nil) + # Send request + promise = begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.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 + + # + # Removes a protection container. + # + # Operation to remove a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, protection_container_name, custom_headers = nil) + response = delete_async(fabric_name, protection_container_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, protection_container_name, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, protection_container_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Adds a protectable item to the replication protection container. + # + # The operation to a add a protectable item to a protection container(Add + # physical server.) + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the protection + # container. + # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The + # request object to add a protectable item. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainer] operation results. + # + def discover_protectable_item(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil) + response = discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the protection + # container. + # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The + # request object to add a protectable item. + # @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 discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil) + # Send request + promise = begin_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.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 protection container details. + # + # Gets the details of a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainer] operation results. + # + def get(fabric_name, protection_container_name, custom_headers = nil) + response = get_async(fabric_name, protection_container_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the protection container details. + # + # Gets the details of a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, protection_container_name, custom_headers = nil) + get_async(fabric_name, protection_container_name, custom_headers).value! + end + + # + # Gets the protection container details. + # + # Gets the details of a protection container. + # + # @param fabric_name [String] Fabric name. + # @param protection_container_name [String] Protection container name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, protection_container_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a protection container. + # + # Operation to create a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param creation_input [CreateProtectionContainerInput] Creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainer] operation results. + # + def create(fabric_name, protection_container_name, creation_input, custom_headers = nil) + response = create_async(fabric_name, protection_container_name, creation_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param creation_input [CreateProtectionContainerInput] Creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(fabric_name, protection_container_name, creation_input, custom_headers = nil) + # Send request + promise = begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.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 list of protection container for a fabric. + # + # Lists the protection containers in the specified fabric. + # + # @param fabric_name [String] Fabric name. + # @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_replication_fabrics(fabric_name, custom_headers = nil) + first_page = list_by_replication_fabrics_as_lazy(fabric_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of protection container for a fabric. + # + # Lists the protection containers in the specified fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_fabrics_with_http_info(fabric_name, custom_headers = nil) + list_by_replication_fabrics_async(fabric_name, custom_headers).value! + end + + # + # Gets the list of protection container for a fabric. + # + # Lists the protection containers in the specified fabric. + # + # @param fabric_name [String] Fabric name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_fabrics_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of all protection containers in a vault. + # + # Lists the protection containers in a vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of all protection containers in a vault. + # + # Lists the protection containers in a vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of all protection containers in a vault. + # + # Lists the protection containers in a vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Switches protection from one container to another or one replication provider + # to another. + # + # Operation to switch protection from one container to another or one + # replication provider to another. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param switch_input [SwitchProtectionInput] Switch protection input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainer] operation results. + # + def begin_switch_protection(fabric_name, protection_container_name, switch_input, custom_headers = nil) + response = begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Switches protection from one container to another or one replication provider + # to another. + # + # Operation to switch protection from one container to another or one + # replication provider to another. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param switch_input [SwitchProtectionInput] Switch protection input. + # @param custom_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_switch_protection_with_http_info(fabric_name, protection_container_name, switch_input, custom_headers = nil) + begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers).value! + end + + # + # Switches protection from one container to another or one replication provider + # to another. + # + # Operation to switch protection from one container to another or one + # replication provider to another. + # + # @param fabric_name [String] Unique fabric name. + # @param protection_container_name [String] Protection container name. + # @param switch_input [SwitchProtectionInput] Switch protection input. + # @param [Hash{String => String}] 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_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'switch_input is nil' if switch_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::SwitchProtectionInput.mapper() + request_content = @client.serialize(request_mapper, switch_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a protection container. + # + # Operation to remove a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, protection_container_name, custom_headers = nil) + response = begin_delete_async(fabric_name, protection_container_name, custom_headers).value! + nil + end + + # + # Removes a protection container. + # + # Operation to remove a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, protection_container_name, custom_headers = nil) + begin_delete_async(fabric_name, protection_container_name, custom_headers).value! + end + + # + # Removes a protection container. + # + # Operation to remove a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, protection_container_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Adds a protectable item to the replication protection container. + # + # The operation to a add a protectable item to a protection container(Add + # physical server.) + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the protection + # container. + # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The + # request object to add a protectable item. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainer] operation results. + # + def begin_discover_protectable_item(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil) + response = begin_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a protectable item to the replication protection container. + # + # The operation to a add a protectable item to a protection container(Add + # physical server.) + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the protection + # container. + # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The + # request object to add a protectable item. + # @param custom_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_discover_protectable_item_with_http_info(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil) + begin_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers).value! + end + + # + # Adds a protectable item to the replication protection container. + # + # The operation to a add a protectable item to a protection container(Add + # physical server.) + # + # @param fabric_name [String] The name of the fabric. + # @param protection_container_name [String] The name of the protection + # container. + # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The + # request object to add a protectable item. + # @param [Hash{String => String}] 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_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'discover_protectable_item_request is nil' if discover_protectable_item_request.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::DiscoverProtectableItemRequest.mapper() + request_content = @client.serialize(request_mapper, discover_protectable_item_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a protection container. + # + # Operation to create a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param creation_input [CreateProtectionContainerInput] Creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainer] operation results. + # + def begin_create(fabric_name, protection_container_name, creation_input, custom_headers = nil) + response = begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Create a protection container. + # + # Operation to create a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param creation_input [CreateProtectionContainerInput] Creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(fabric_name, protection_container_name, creation_input, custom_headers = nil) + begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers).value! + end + + # + # Create a protection container. + # + # Operation to create a protection container. + # + # @param fabric_name [String] Unique fabric ARM name. + # @param protection_container_name [String] Unique protection container ARM + # name. + # @param creation_input [CreateProtectionContainerInput] Creation input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil? + fail ArgumentError, 'creation_input is nil' if creation_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::CreateProtectionContainerInput.mapper() + request_content = @client.serialize(request_mapper, creation_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of protection container for a fabric. + # + # Lists the protection containers in the specified fabric. + # + # @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 [ProtectionContainerCollection] operation results. + # + def list_by_replication_fabrics_next(next_page_link, custom_headers = nil) + response = list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of protection container for a fabric. + # + # Lists the protection containers in the specified fabric. + # + # @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_replication_fabrics_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of protection container for a fabric. + # + # Lists the protection containers in the specified fabric. + # + # @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_replication_fabrics_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of all protection containers in a vault. + # + # Lists the protection containers in a vault. + # + # @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 [ProtectionContainerCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of all protection containers in a vault. + # + # Lists the protection containers in a vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of all protection containers in a vault. + # + # Lists the protection containers in a vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of protection container for a fabric. + # + # Lists the protection containers in the specified fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainerCollection] which provide lazy access to pages of + # the response. + # + def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers = nil) + response = list_by_replication_fabrics_async(fabric_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_fabrics_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of all protection containers in a vault. + # + # Lists the protection containers in a vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProtectionContainerCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb new file mode 100644 index 0000000000..97d05ca2ba --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb @@ -0,0 +1,1639 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationRecoveryPlans + # + class ReplicationRecoveryPlans + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationRecoveryPlans class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Execute reprotect of the recovery plan. + # + # The operation to reprotect(reverse replicate) a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def reprotect(recovery_plan_name, custom_headers = nil) + response = reprotect_async(recovery_plan_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def reprotect_async(recovery_plan_name, custom_headers = nil) + # Send request + promise = begin_reprotect_async(recovery_plan_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.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 + + # + # Execute commit failover of the recovery plan. + # + # The operation to commit the fail over of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def failover_commit(recovery_plan_name, custom_headers = nil) + response = failover_commit_async(recovery_plan_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def failover_commit_async(recovery_plan_name, custom_headers = nil) + # Send request + promise = begin_failover_commit_async(recovery_plan_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.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 + + # + # Execute test failover cleanup of the recovery plan. + # + # The operation to cleanup test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup + # input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def test_failover_cleanup(recovery_plan_name, input, custom_headers = nil) + response = test_failover_cleanup_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup + # input. + # @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 test_failover_cleanup_async(recovery_plan_name, input, custom_headers = nil) + # Send request + promise = begin_test_failover_cleanup_async(recovery_plan_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.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 + + # + # Execute test failover of the recovery plan. + # + # The operation to start the test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverInput] Failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def test_failover(recovery_plan_name, input, custom_headers = nil) + response = test_failover_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverInput] Failover input. + # @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 test_failover_async(recovery_plan_name, input, custom_headers = nil) + # Send request + promise = begin_test_failover_async(recovery_plan_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.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 + + # + # Execute unplanned failover of the recovery plan. + # + # The operation to start the failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanUnplannedFailoverInput] Failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def unplanned_failover(recovery_plan_name, input, custom_headers = nil) + response = unplanned_failover_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanUnplannedFailoverInput] Failover input. + # @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 unplanned_failover_async(recovery_plan_name, input, custom_headers = nil) + # Send request + promise = begin_unplanned_failover_async(recovery_plan_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.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 + + # + # Execute planned failover of the recovery plan. + # + # The operation to start the planned failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanPlannedFailoverInput] Failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def planned_failover(recovery_plan_name, input, custom_headers = nil) + response = planned_failover_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanPlannedFailoverInput] Failover input. + # @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 planned_failover_async(recovery_plan_name, input, custom_headers = nil) + # Send request + promise = begin_planned_failover_async(recovery_plan_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.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 requested recovery plan. + # + # Gets the details of the recovery plan. + # + # @param recovery_plan_name [String] Name of the recovery plan. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def get(recovery_plan_name, custom_headers = nil) + response = get_async(recovery_plan_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the requested recovery plan. + # + # Gets the details of the recovery plan. + # + # @param recovery_plan_name [String] Name of the recovery plan. + # @param custom_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(recovery_plan_name, custom_headers = nil) + get_async(recovery_plan_name, custom_headers).value! + end + + # + # Gets the requested recovery plan. + # + # Gets the details of the recovery plan. + # + # @param recovery_plan_name [String] Name of the recovery plan. + # @param [Hash{String => String}] 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(recovery_plan_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recovery plan with the given details. + # + # The operation to create a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [CreateRecoveryPlanInput] Recovery Plan creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def create(recovery_plan_name, input, custom_headers = nil) + response = create_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [CreateRecoveryPlanInput] Recovery Plan creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(recovery_plan_name, input, custom_headers = nil) + # Send request + promise = begin_create_async(recovery_plan_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the specified recovery plan. + # + # Delete a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(recovery_plan_name, custom_headers = nil) + response = delete_async(recovery_plan_name, custom_headers).value! + nil + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(recovery_plan_name, custom_headers = nil) + # Send request + promise = begin_delete_async(recovery_plan_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates the given recovery plan. + # + # The operation to update a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [UpdateRecoveryPlanInput] Update recovery plan input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def update(recovery_plan_name, input, custom_headers = nil) + response = update_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [UpdateRecoveryPlanInput] Update recovery plan input + # @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(recovery_plan_name, input, custom_headers = nil) + # Send request + promise = begin_update_async(recovery_plan_name, input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.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 list of recovery plans. + # + # Lists the recovery plans in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of recovery plans. + # + # Lists the recovery plans in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of recovery plans. + # + # Lists the recovery plans in the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute reprotect of the recovery plan. + # + # The operation to reprotect(reverse replicate) a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_reprotect(recovery_plan_name, custom_headers = nil) + response = begin_reprotect_async(recovery_plan_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute reprotect of the recovery plan. + # + # The operation to reprotect(reverse replicate) a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_reprotect_with_http_info(recovery_plan_name, custom_headers = nil) + begin_reprotect_async(recovery_plan_name, custom_headers).value! + end + + # + # Execute reprotect of the recovery plan. + # + # The operation to reprotect(reverse replicate) a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_reprotect_async(recovery_plan_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute commit failover of the recovery plan. + # + # The operation to commit the fail over of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_failover_commit(recovery_plan_name, custom_headers = nil) + response = begin_failover_commit_async(recovery_plan_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute commit failover of the recovery plan. + # + # The operation to commit the fail over of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_failover_commit_with_http_info(recovery_plan_name, custom_headers = nil) + begin_failover_commit_async(recovery_plan_name, custom_headers).value! + end + + # + # Execute commit failover of the recovery plan. + # + # The operation to commit the fail over of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_failover_commit_async(recovery_plan_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute test failover cleanup of the recovery plan. + # + # The operation to cleanup test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup + # input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_test_failover_cleanup(recovery_plan_name, input, custom_headers = nil) + response = begin_test_failover_cleanup_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute test failover cleanup of the recovery plan. + # + # The operation to cleanup test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup + # input. + # @param custom_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_test_failover_cleanup_with_http_info(recovery_plan_name, input, custom_headers = nil) + begin_test_failover_cleanup_async(recovery_plan_name, input, custom_headers).value! + end + + # + # Execute test failover cleanup of the recovery plan. + # + # The operation to cleanup test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup + # input. + # @param [Hash{String => String}] 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_test_failover_cleanup_async(recovery_plan_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanTestFailoverCleanupInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute test failover of the recovery plan. + # + # The operation to start the test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverInput] Failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_test_failover(recovery_plan_name, input, custom_headers = nil) + response = begin_test_failover_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute test failover of the recovery plan. + # + # The operation to start the test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverInput] Failover input. + # @param custom_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_test_failover_with_http_info(recovery_plan_name, input, custom_headers = nil) + begin_test_failover_async(recovery_plan_name, input, custom_headers).value! + end + + # + # Execute test failover of the recovery plan. + # + # The operation to start the test failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanTestFailoverInput] Failover input. + # @param [Hash{String => String}] 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_test_failover_async(recovery_plan_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanTestFailoverInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute unplanned failover of the recovery plan. + # + # The operation to start the failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanUnplannedFailoverInput] Failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_unplanned_failover(recovery_plan_name, input, custom_headers = nil) + response = begin_unplanned_failover_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute unplanned failover of the recovery plan. + # + # The operation to start the failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanUnplannedFailoverInput] Failover input. + # @param custom_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_unplanned_failover_with_http_info(recovery_plan_name, input, custom_headers = nil) + begin_unplanned_failover_async(recovery_plan_name, input, custom_headers).value! + end + + # + # Execute unplanned failover of the recovery plan. + # + # The operation to start the failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanUnplannedFailoverInput] Failover input. + # @param [Hash{String => String}] 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_unplanned_failover_async(recovery_plan_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanUnplannedFailoverInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Execute planned failover of the recovery plan. + # + # The operation to start the planned failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanPlannedFailoverInput] Failover input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_planned_failover(recovery_plan_name, input, custom_headers = nil) + response = begin_planned_failover_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Execute planned failover of the recovery plan. + # + # The operation to start the planned failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanPlannedFailoverInput] Failover input. + # @param custom_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_planned_failover_with_http_info(recovery_plan_name, input, custom_headers = nil) + begin_planned_failover_async(recovery_plan_name, input, custom_headers).value! + end + + # + # Execute planned failover of the recovery plan. + # + # The operation to start the planned failover of a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [RecoveryPlanPlannedFailoverInput] Failover input. + # @param [Hash{String => String}] 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_planned_failover_async(recovery_plan_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanPlannedFailoverInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recovery plan with the given details. + # + # The operation to create a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [CreateRecoveryPlanInput] Recovery Plan creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_create(recovery_plan_name, input, custom_headers = nil) + response = begin_create_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a recovery plan with the given details. + # + # The operation to create a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [CreateRecoveryPlanInput] Recovery Plan creation input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(recovery_plan_name, input, custom_headers = nil) + begin_create_async(recovery_plan_name, input, custom_headers).value! + end + + # + # Creates a recovery plan with the given details. + # + # The operation to create a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [CreateRecoveryPlanInput] Recovery Plan creation input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(recovery_plan_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::CreateRecoveryPlanInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 recovery plan. + # + # Delete a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(recovery_plan_name, custom_headers = nil) + response = begin_delete_async(recovery_plan_name, custom_headers).value! + nil + end + + # + # Deletes the specified recovery plan. + # + # Delete a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(recovery_plan_name, custom_headers = nil) + begin_delete_async(recovery_plan_name, custom_headers).value! + end + + # + # Deletes the specified recovery plan. + # + # Delete a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(recovery_plan_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates the given recovery plan. + # + # The operation to update a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [UpdateRecoveryPlanInput] Update recovery plan input + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlan] operation results. + # + def begin_update(recovery_plan_name, input, custom_headers = nil) + response = begin_update_async(recovery_plan_name, input, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the given recovery plan. + # + # The operation to update a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [UpdateRecoveryPlanInput] Update recovery plan input + # @param custom_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(recovery_plan_name, input, custom_headers = nil) + begin_update_async(recovery_plan_name, input, custom_headers).value! + end + + # + # Updates the given recovery plan. + # + # The operation to update a recovery plan. + # + # @param recovery_plan_name [String] Recovery plan name. + # @param input [UpdateRecoveryPlanInput] Update recovery plan input + # @param [Hash{String => String}] 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(recovery_plan_name, input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil? + fail ArgumentError, 'input is nil' if input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UpdateRecoveryPlanInput.mapper() + request_content = @client.serialize(request_mapper, input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_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(: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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of recovery plans. + # + # Lists the recovery plans in the vault. + # + # @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 [RecoveryPlanCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of recovery plans. + # + # Lists the recovery plans in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of recovery plans. + # + # Lists the recovery plans in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of recovery plans. + # + # Lists the recovery plans in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryPlanCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_services_providers.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_services_providers.rb new file mode 100644 index 0000000000..cda405fa94 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_services_providers.rb @@ -0,0 +1,967 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationRecoveryServicesProviders + # + class ReplicationRecoveryServicesProviders + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationRecoveryServicesProviders class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Refresh details from the recovery services provider. + # + # The operation to refresh the information from the recovery services provider. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryServicesProvider] operation results. + # + def refresh_provider(fabric_name, provider_name, custom_headers = nil) + response = refresh_provider_async(fabric_name, provider_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def refresh_provider_async(fabric_name, provider_name, custom_headers = nil) + # Send request + promise = begin_refresh_provider_async(fabric_name, provider_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryServicesProvider.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes provider from fabric. Note: Deleting provider for any fabric other + # than SingleHost is unsupported. To maintain backward compatibility for + # released clients the object "deleteRspInput" is used (if the object is empty + # we assume that it is old client and continue the old behavior). + # + # The operation to removes/delete(unregister) a recovery services provider from + # the vault + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, provider_name, custom_headers = nil) + response = delete_async(fabric_name, provider_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, provider_name, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, provider_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the details of a recovery services provider. + # + # Gets the details of registered recovery services provider. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryServicesProvider] operation results. + # + def get(fabric_name, provider_name, custom_headers = nil) + response = get_async(fabric_name, provider_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of a recovery services provider. + # + # Gets the details of registered recovery services provider. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, provider_name, custom_headers = nil) + get_async(fabric_name, provider_name, custom_headers).value! + end + + # + # Gets the details of a recovery services provider. + # + # Gets the details of registered recovery services provider. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, provider_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'provider_name is nil' if provider_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'providerName' => 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryServicesProvider.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Purges recovery service provider from fabric + # + # The operation to purge(force delete) a recovery services provider from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def purge(fabric_name, provider_name, custom_headers = nil) + response = purge_async(fabric_name, provider_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def purge_async(fabric_name, provider_name, custom_headers = nil) + # Send request + promise = begin_purge_async(fabric_name, provider_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the list of registered recovery services providers for the fabric. + # + # Lists the registered recovery services providers for the specified fabric. + # + # @param fabric_name [String] Fabric name + # @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_replication_fabrics(fabric_name, custom_headers = nil) + first_page = list_by_replication_fabrics_as_lazy(fabric_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of registered recovery services providers for the fabric. + # + # Lists the registered recovery services providers for the specified fabric. + # + # @param fabric_name [String] Fabric name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_fabrics_with_http_info(fabric_name, custom_headers = nil) + list_by_replication_fabrics_async(fabric_name, custom_headers).value! + end + + # + # Gets the list of registered recovery services providers for the fabric. + # + # Lists the registered recovery services providers for the specified fabric. + # + # @param fabric_name [String] Fabric name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_fabrics_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryServicesProviderCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of registered recovery services providers in the vault. This is + # a view only api. + # + # Lists the registered recovery services providers in the vault + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of registered recovery services providers in the vault. This is + # a view only api. + # + # Lists the registered recovery services providers in the vault + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of registered recovery services providers in the vault. This is + # a view only api. + # + # Lists the registered recovery services providers in the vault + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryServicesProviderCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Refresh details from the recovery services provider. + # + # The operation to refresh the information from the recovery services provider. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryServicesProvider] operation results. + # + def begin_refresh_provider(fabric_name, provider_name, custom_headers = nil) + response = begin_refresh_provider_async(fabric_name, provider_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Refresh details from the recovery services provider. + # + # The operation to refresh the information from the recovery services provider. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_refresh_provider_with_http_info(fabric_name, provider_name, custom_headers = nil) + begin_refresh_provider_async(fabric_name, provider_name, custom_headers).value! + end + + # + # Refresh details from the recovery services provider. + # + # The operation to refresh the information from the recovery services provider. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_refresh_provider_async(fabric_name, provider_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'provider_name is nil' if provider_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'providerName' => provider_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 == 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::ARM::RecoveryServicesSiteRecovery::Models::RecoveryServicesProvider.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 provider from fabric. Note: Deleting provider for any fabric other + # than SingleHost is unsupported. To maintain backward compatibility for + # released clients the object "deleteRspInput" is used (if the object is empty + # we assume that it is old client and continue the old behavior). + # + # The operation to removes/delete(unregister) a recovery services provider from + # the vault + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, provider_name, custom_headers = nil) + response = begin_delete_async(fabric_name, provider_name, custom_headers).value! + nil + end + + # + # Deletes provider from fabric. Note: Deleting provider for any fabric other + # than SingleHost is unsupported. To maintain backward compatibility for + # released clients the object "deleteRspInput" is used (if the object is empty + # we assume that it is old client and continue the old behavior). + # + # The operation to removes/delete(unregister) a recovery services provider from + # the vault + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, provider_name, custom_headers = nil) + begin_delete_async(fabric_name, provider_name, custom_headers).value! + end + + # + # Deletes provider from fabric. Note: Deleting provider for any fabric other + # than SingleHost is unsupported. To maintain backward compatibility for + # released clients the object "deleteRspInput" is used (if the object is empty + # we assume that it is old client and continue the old behavior). + # + # The operation to removes/delete(unregister) a recovery services provider from + # the vault + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, provider_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'provider_name is nil' if provider_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'providerName' => provider_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Purges recovery service provider from fabric + # + # The operation to purge(force delete) a recovery services provider from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_purge(fabric_name, provider_name, custom_headers = nil) + response = begin_purge_async(fabric_name, provider_name, custom_headers).value! + nil + end + + # + # Purges recovery service provider from fabric + # + # The operation to purge(force delete) a recovery services provider from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_purge_with_http_info(fabric_name, provider_name, custom_headers = nil) + begin_purge_async(fabric_name, provider_name, custom_headers).value! + end + + # + # Purges recovery service provider from fabric + # + # The operation to purge(force delete) a recovery services provider from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param provider_name [String] Recovery services provider name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_purge_async(fabric_name, provider_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'provider_name is nil' if provider_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'providerName' => provider_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the list of registered recovery services providers for the fabric. + # + # Lists the registered recovery services providers for the specified fabric. + # + # @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 [RecoveryServicesProviderCollection] operation results. + # + def list_by_replication_fabrics_next(next_page_link, custom_headers = nil) + response = list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of registered recovery services providers for the fabric. + # + # Lists the registered recovery services providers for the specified fabric. + # + # @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_replication_fabrics_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of registered recovery services providers for the fabric. + # + # Lists the registered recovery services providers for the specified fabric. + # + # @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_replication_fabrics_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryServicesProviderCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of registered recovery services providers in the vault. This is + # a view only api. + # + # Lists the registered recovery services providers in the vault + # + # @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 [RecoveryServicesProviderCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of registered recovery services providers in the vault. This is + # a view only api. + # + # Lists the registered recovery services providers in the vault + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of registered recovery services providers in the vault. This is + # a view only api. + # + # Lists the registered recovery services providers in the vault + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryServicesProviderCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of registered recovery services providers for the fabric. + # + # Lists the registered recovery services providers for the specified fabric. + # + # @param fabric_name [String] Fabric name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryServicesProviderCollection] which provide lazy access to + # pages of the response. + # + def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers = nil) + response = list_by_replication_fabrics_async(fabric_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_fabrics_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of registered recovery services providers in the vault. This is + # a view only api. + # + # Lists the registered recovery services providers in the vault + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoveryServicesProviderCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb new file mode 100644 index 0000000000..5d25121023 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb @@ -0,0 +1,861 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationStorageClassificationMappings + # + class ReplicationStorageClassificationMappings + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationStorageClassificationMappings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the details of a storage classification mapping. + # + # Gets the details of the specified storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassificationMapping] operation results. + # + def get(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + response = get_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of a storage classification mapping. + # + # Gets the details of the specified storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + get_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers).value! + end + + # + # Gets the details of a storage classification mapping. + # + # Gets the details of the specified storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'storage_classification_name is nil' if storage_classification_name.nil? + fail ArgumentError, 'storage_classification_mapping_name is nil' if storage_classification_mapping_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'storageClassificationName' => storage_classification_name,'storageClassificationMappingName' => storage_classification_mapping_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::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMapping.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 storage classification mapping. + # + # The operation to create a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param pairing_input [StorageClassificationMappingInput] Pairing input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassificationMapping] operation results. + # + def create(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers = nil) + response = create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param pairing_input [StorageClassificationMappingInput] Pairing input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers = nil) + # Send request + promise = begin_create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMapping.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 + + # + # Delete a storage classification mapping. + # + # The operation to delete a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + response = delete_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the list of storage classification mappings objects under a storage. + # + # Lists the storage classification mappings for the fabric. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classfication name. + # @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_replication_storage_classifications(fabric_name, storage_classification_name, custom_headers = nil) + first_page = list_by_replication_storage_classifications_as_lazy(fabric_name, storage_classification_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of storage classification mappings objects under a storage. + # + # Lists the storage classification mappings for the fabric. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classfication name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_storage_classifications_with_http_info(fabric_name, storage_classification_name, custom_headers = nil) + list_by_replication_storage_classifications_async(fabric_name, storage_classification_name, custom_headers).value! + end + + # + # Gets the list of storage classification mappings objects under a storage. + # + # Lists the storage classification mappings for the fabric. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classfication name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_storage_classifications_async(fabric_name, storage_classification_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'storage_classification_name is nil' if storage_classification_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'storageClassificationName' => storage_classification_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::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification mappings objects under a vault. + # + # Lists the storage classification mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of storage classification mappings objects under a vault. + # + # Lists the storage classification mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of storage classification mappings objects under a vault. + # + # Lists the storage classification mappings in the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 storage classification mapping. + # + # The operation to create a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param pairing_input [StorageClassificationMappingInput] Pairing input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassificationMapping] operation results. + # + def begin_create(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers = nil) + response = begin_create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers).value! + response.body unless response.nil? + end + + # + # Create storage classification mapping. + # + # The operation to create a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param pairing_input [StorageClassificationMappingInput] Pairing input. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers = nil) + begin_create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers).value! + end + + # + # Create storage classification mapping. + # + # The operation to create a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param pairing_input [StorageClassificationMappingInput] Pairing input. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(fabric_name, storage_classification_name, storage_classification_mapping_name, pairing_input, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'storage_classification_name is nil' if storage_classification_name.nil? + fail ArgumentError, 'storage_classification_mapping_name is nil' if storage_classification_mapping_name.nil? + fail ArgumentError, 'pairing_input is nil' if pairing_input.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMappingInput.mapper() + request_content = @client.serialize(request_mapper, pairing_input) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'storageClassificationName' => storage_classification_name,'storageClassificationMappingName' => storage_classification_mapping_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMapping.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a storage classification mapping. + # + # The operation to delete a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + response = begin_delete_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers).value! + nil + end + + # + # Delete a storage classification mapping. + # + # The operation to delete a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + begin_delete_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers).value! + end + + # + # Delete a storage classification mapping. + # + # The operation to delete a storage classification mapping. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param storage_classification_mapping_name [String] Storage classification + # mapping name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, storage_classification_name, storage_classification_mapping_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'storage_classification_name is nil' if storage_classification_name.nil? + fail ArgumentError, 'storage_classification_mapping_name is nil' if storage_classification_mapping_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'storageClassificationName' => storage_classification_name,'storageClassificationMappingName' => storage_classification_mapping_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the list of storage classification mappings objects under a storage. + # + # Lists the storage classification mappings for the fabric. + # + # @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 [StorageClassificationMappingCollection] operation results. + # + def list_by_replication_storage_classifications_next(next_page_link, custom_headers = nil) + response = list_by_replication_storage_classifications_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of storage classification mappings objects under a storage. + # + # Lists the storage classification mappings for the fabric. + # + # @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_replication_storage_classifications_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_storage_classifications_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of storage classification mappings objects under a storage. + # + # Lists the storage classification mappings for the fabric. + # + # @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_replication_storage_classifications_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification mappings objects under a vault. + # + # Lists the storage classification mappings in the vault. + # + # @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 [StorageClassificationMappingCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of storage classification mappings objects under a vault. + # + # Lists the storage classification mappings in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of storage classification mappings objects under a vault. + # + # Lists the storage classification mappings in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationMappingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification mappings objects under a storage. + # + # Lists the storage classification mappings for the fabric. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classfication name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassificationMappingCollection] which provide lazy access to + # pages of the response. + # + def list_by_replication_storage_classifications_as_lazy(fabric_name, storage_classification_name, custom_headers = nil) + response = list_by_replication_storage_classifications_async(fabric_name, storage_classification_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_storage_classifications_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of storage classification mappings objects under a vault. + # + # Lists the storage classification mappings in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassificationMappingCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classifications.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classifications.rb new file mode 100644 index 0000000000..2915af151e --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classifications.rb @@ -0,0 +1,541 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationStorageClassifications + # + class ReplicationStorageClassifications + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationStorageClassifications class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the details of a storage classification. + # + # Gets the details of the specified storage classification. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassification] operation results. + # + def get(fabric_name, storage_classification_name, custom_headers = nil) + response = get_async(fabric_name, storage_classification_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of a storage classification. + # + # Gets the details of the specified storage classification. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, storage_classification_name, custom_headers = nil) + get_async(fabric_name, storage_classification_name, custom_headers).value! + end + + # + # Gets the details of a storage classification. + # + # Gets the details of the specified storage classification. + # + # @param fabric_name [String] Fabric name. + # @param storage_classification_name [String] Storage classification name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, storage_classification_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'storage_classification_name is nil' if storage_classification_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'storageClassificationName' => storage_classification_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::ARM::RecoveryServicesSiteRecovery::Models::StorageClassification.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification objects under a fabric. + # + # Lists the storage classifications available in the specified fabric. + # + # @param fabric_name [String] Site name of interest. + # @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_replication_fabrics(fabric_name, custom_headers = nil) + first_page = list_by_replication_fabrics_as_lazy(fabric_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of storage classification objects under a fabric. + # + # Lists the storage classifications available in the specified fabric. + # + # @param fabric_name [String] Site name of interest. + # @param custom_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_replication_fabrics_with_http_info(fabric_name, custom_headers = nil) + list_by_replication_fabrics_async(fabric_name, custom_headers).value! + end + + # + # Gets the list of storage classification objects under a fabric. + # + # Lists the storage classifications available in the specified fabric. + # + # @param fabric_name [String] Site name of interest. + # @param [Hash{String => String}] 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_replication_fabrics_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification objects under a vault. + # + # Lists the storage classifications in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of storage classification objects under a vault. + # + # Lists the storage classifications in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of storage classification objects under a vault. + # + # Lists the storage classifications in the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification objects under a fabric. + # + # Lists the storage classifications available in the specified fabric. + # + # @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 [StorageClassificationCollection] operation results. + # + def list_by_replication_fabrics_next(next_page_link, custom_headers = nil) + response = list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of storage classification objects under a fabric. + # + # Lists the storage classifications available in the specified fabric. + # + # @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_replication_fabrics_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of storage classification objects under a fabric. + # + # Lists the storage classifications available in the specified fabric. + # + # @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_replication_fabrics_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification objects under a vault. + # + # Lists the storage classifications in the vault. + # + # @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 [StorageClassificationCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of storage classification objects under a vault. + # + # Lists the storage classifications in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of storage classification objects under a vault. + # + # Lists the storage classifications in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::StorageClassificationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of storage classification objects under a fabric. + # + # Lists the storage classifications available in the specified fabric. + # + # @param fabric_name [String] Site name of interest. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassificationCollection] which provide lazy access to pages + # of the response. + # + def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers = nil) + response = list_by_replication_fabrics_async(fabric_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_fabrics_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of storage classification objects under a vault. + # + # Lists the storage classifications in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageClassificationCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_vault_health.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_vault_health.rb new file mode 100644 index 0000000000..d92ab96d2a --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_vault_health.rb @@ -0,0 +1,116 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationVaultHealth + # + class ReplicationVaultHealth + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationVaultHealth class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the health summary for the vault. + # + # Gets the health details of the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VaultHealthDetails] operation results. + # + def get(custom_headers = nil) + response = get_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the health summary for the vault. + # + # Gets the health details of the vault. + # + # @param custom_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(custom_headers = nil) + get_async(custom_headers).value! + end + + # + # Gets the health summary for the vault. + # + # Gets the health details of the vault. + # + # @param [Hash{String => String}] 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(custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationVaultHealth' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::VaultHealthDetails.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb new file mode 100644 index 0000000000..0fdf035bd3 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb @@ -0,0 +1,999 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # ReplicationvCenters + # + class ReplicationvCenters + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationvCenters class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient + attr_reader :client + + # + # Gets the details of a vCenter. + # + # Gets the details of a registered vCenter server(Add vCenter server.) + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VCenter] operation results. + # + def get(fabric_name, v_center_name, custom_headers = nil) + response = get_async(fabric_name, v_center_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of a vCenter. + # + # Gets the details of a registered vCenter server(Add vCenter server.) + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(fabric_name, v_center_name, custom_headers = nil) + get_async(fabric_name, v_center_name, custom_headers).value! + end + + # + # Gets the details of a vCenter. + # + # Gets the details of a registered vCenter server(Add vCenter server.) + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(fabric_name, v_center_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'v_center_name is nil' if v_center_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'vCenterName' => v_center_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::ARM::RecoveryServicesSiteRecovery::Models::VCenter.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Add vCenter. + # + # The operation to create a vCenter object.. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param add_vcenter_request [AddVCenterRequest] The input to the add vCenter + # operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VCenter] operation results. + # + def create(fabric_name, v_center_name, add_vcenter_request, custom_headers = nil) + response = create_async(fabric_name, v_center_name, add_vcenter_request, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param add_vcenter_request [AddVCenterRequest] The input to the add vCenter + # operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(fabric_name, v_center_name, add_vcenter_request, custom_headers = nil) + # Send request + promise = begin_create_async(fabric_name, v_center_name, add_vcenter_request, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::VCenter.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 + + # + # Remove vCenter operation. + # + # The operation to remove(unregister) a registered vCenter server from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(fabric_name, v_center_name, custom_headers = nil) + response = delete_async(fabric_name, v_center_name, custom_headers).value! + nil + end + + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(fabric_name, v_center_name, custom_headers = nil) + # Send request + promise = begin_delete_async(fabric_name, v_center_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Update vCenter operation. + # + # The operation to update a registered vCenter. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCeneter name + # @param update_vcenter_request [UpdateVCenterRequest] The input to the update + # vCenter operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VCenter] operation results. + # + def update(fabric_name, v_center_name, update_vcenter_request, custom_headers = nil) + response = update_async(fabric_name, v_center_name, update_vcenter_request, custom_headers).value! + response.body unless response.nil? + end + + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCeneter name + # @param update_vcenter_request [UpdateVCenterRequest] The input to the update + # vCenter 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(fabric_name, v_center_name, update_vcenter_request, custom_headers = nil) + # Send request + promise = begin_update_async(fabric_name, v_center_name, update_vcenter_request, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::VCenter.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 list of vCenter registered under a fabric. + # + # Lists the vCenter servers registered in a fabric. + # + # @param fabric_name [String] Fabric name. + # @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_replication_fabrics(fabric_name, custom_headers = nil) + first_page = list_by_replication_fabrics_as_lazy(fabric_name, custom_headers) + first_page.get_all_items + end + + # + # Gets the list of vCenter registered under a fabric. + # + # Lists the vCenter servers registered in a fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_replication_fabrics_with_http_info(fabric_name, custom_headers = nil) + list_by_replication_fabrics_async(fabric_name, custom_headers).value! + end + + # + # Gets the list of vCenter registered under a fabric. + # + # Lists the vCenter servers registered in a fabric. + # + # @param fabric_name [String] Fabric name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_replication_fabrics_async(fabric_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_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::ARM::RecoveryServicesSiteRecovery::Models::VCenterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of vCenter registered under the vault. + # + # Lists the vCenter servers registered in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the list of vCenter registered under the vault. + # + # Lists the vCenter servers registered in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the list of vCenter registered under the vault. + # + # Lists the vCenter servers registered in the vault. + # + # @param [Hash{String => String}] 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.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.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.RecoveryServices/vaults/{resourceName}/replicationvCenters' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.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::ARM::RecoveryServicesSiteRecovery::Models::VCenterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Add vCenter. + # + # The operation to create a vCenter object.. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param add_vcenter_request [AddVCenterRequest] The input to the add vCenter + # operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VCenter] operation results. + # + def begin_create(fabric_name, v_center_name, add_vcenter_request, custom_headers = nil) + response = begin_create_async(fabric_name, v_center_name, add_vcenter_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Add vCenter. + # + # The operation to create a vCenter object.. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param add_vcenter_request [AddVCenterRequest] The input to the add vCenter + # operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(fabric_name, v_center_name, add_vcenter_request, custom_headers = nil) + begin_create_async(fabric_name, v_center_name, add_vcenter_request, custom_headers).value! + end + + # + # Add vCenter. + # + # The operation to create a vCenter object.. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param add_vcenter_request [AddVCenterRequest] The input to the add vCenter + # 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_async(fabric_name, v_center_name, add_vcenter_request, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'v_center_name is nil' if v_center_name.nil? + fail ArgumentError, 'add_vcenter_request is nil' if add_vcenter_request.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::AddVCenterRequest.mapper() + request_content = @client.serialize(request_mapper, add_vcenter_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'vCenterName' => v_center_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(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::VCenter.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 vCenter operation. + # + # The operation to remove(unregister) a registered vCenter server from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(fabric_name, v_center_name, custom_headers = nil) + response = begin_delete_async(fabric_name, v_center_name, custom_headers).value! + nil + end + + # + # Remove vCenter operation. + # + # The operation to remove(unregister) a registered vCenter server from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(fabric_name, v_center_name, custom_headers = nil) + begin_delete_async(fabric_name, v_center_name, custom_headers).value! + end + + # + # Remove vCenter operation. + # + # The operation to remove(unregister) a registered vCenter server from the + # vault. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCenter name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(fabric_name, v_center_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'v_center_name is nil' if v_center_name.nil? + + + request_headers = {} + + # Set Headers + request_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.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'vCenterName' => v_center_name}, + 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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Update vCenter operation. + # + # The operation to update a registered vCenter. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCeneter name + # @param update_vcenter_request [UpdateVCenterRequest] The input to the update + # vCenter operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VCenter] operation results. + # + def begin_update(fabric_name, v_center_name, update_vcenter_request, custom_headers = nil) + response = begin_update_async(fabric_name, v_center_name, update_vcenter_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Update vCenter operation. + # + # The operation to update a registered vCenter. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCeneter name + # @param update_vcenter_request [UpdateVCenterRequest] The input to the update + # vCenter 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(fabric_name, v_center_name, update_vcenter_request, custom_headers = nil) + begin_update_async(fabric_name, v_center_name, update_vcenter_request, custom_headers).value! + end + + # + # Update vCenter operation. + # + # The operation to update a registered vCenter. + # + # @param fabric_name [String] Fabric name. + # @param v_center_name [String] vCeneter name + # @param update_vcenter_request [UpdateVCenterRequest] The input to the update + # vCenter 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(fabric_name, v_center_name, update_vcenter_request, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil? + fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'fabric_name is nil' if fabric_name.nil? + fail ArgumentError, 'v_center_name is nil' if v_center_name.nil? + fail ArgumentError, 'update_vcenter_request is nil' if update_vcenter_request.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UpdateVCenterRequest.mapper() + request_content = @client.serialize(request_mapper, update_vcenter_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'vCenterName' => v_center_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(: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::ARM::RecoveryServicesSiteRecovery::Models::VCenter.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of vCenter registered under a fabric. + # + # Lists the vCenter servers registered in a fabric. + # + # @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 [VCenterCollection] operation results. + # + def list_by_replication_fabrics_next(next_page_link, custom_headers = nil) + response = list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of vCenter registered under a fabric. + # + # Lists the vCenter servers registered in a fabric. + # + # @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_replication_fabrics_next_with_http_info(next_page_link, custom_headers = nil) + list_by_replication_fabrics_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of vCenter registered under a fabric. + # + # Lists the vCenter servers registered in a fabric. + # + # @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_replication_fabrics_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::VCenterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of vCenter registered under the vault. + # + # Lists the vCenter servers registered in the vault. + # + # @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 [VCenterCollection] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the list of vCenter registered under the vault. + # + # Lists the vCenter servers registered in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the list of vCenter registered under the vault. + # + # Lists the vCenter servers registered in the vault. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::VCenterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of vCenter registered under a fabric. + # + # Lists the vCenter servers registered in a fabric. + # + # @param fabric_name [String] Fabric name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VCenterCollection] which provide lazy access to pages of the + # response. + # + def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers = nil) + response = list_by_replication_fabrics_async(fabric_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_replication_fabrics_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets the list of vCenter registered under the vault. + # + # Lists the vCenter servers registered in the vault. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VCenterCollection] 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_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb new file mode 100644 index 0000000000..7c4f468988 --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb @@ -0,0 +1,217 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::RecoveryServicesSiteRecovery + # + # A service client - single point of access to the REST API. + # + class SiteRecoveryManagementClient < 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] The subscription Id. + attr_accessor :subscription_id + + # @return [String] The name of the resource group where the recovery + # services vault is present. + attr_accessor :resource_group_name + + # @return [String] The name of the recovery services vault. + attr_accessor :resource_name + + # @return [String] Client Api Version. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [ReplicationVaultHealth] replication_vault_health + attr_reader :replication_vault_health + + # @return [ReplicationProtectedItems] replication_protected_items + attr_reader :replication_protected_items + + # @return [ReplicationNetworkMappings] replication_network_mappings + attr_reader :replication_network_mappings + + # @return [ReplicationFabrics] replication_fabrics + attr_reader :replication_fabrics + + # @return [ReplicationvCenters] replicationv_centers + attr_reader :replicationv_centers + + # @return [ReplicationStorageClassificationMappings] + # replication_storage_classification_mappings + attr_reader :replication_storage_classification_mappings + + # @return [ReplicationStorageClassifications] + # replication_storage_classifications + attr_reader :replication_storage_classifications + + # @return [ReplicationRecoveryServicesProviders] + # replication_recovery_services_providers + attr_reader :replication_recovery_services_providers + + # @return [RecoveryPoints] recovery_points + attr_reader :recovery_points + + # @return [ReplicationRecoveryPlans] replication_recovery_plans + attr_reader :replication_recovery_plans + + # @return [ReplicationProtectionContainers] + # replication_protection_containers + attr_reader :replication_protection_containers + + # @return [ReplicationProtectionContainerMappings] + # replication_protection_container_mappings + attr_reader :replication_protection_container_mappings + + # @return [ReplicationProtectableItems] replication_protectable_items + attr_reader :replication_protectable_items + + # @return [ReplicationPolicies] replication_policies + attr_reader :replication_policies + + # @return [Operations] operations + attr_reader :operations + + # @return [ReplicationNetworks] replication_networks + attr_reader :replication_networks + + # @return [ReplicationLogicalNetworks] replication_logical_networks + attr_reader :replication_logical_networks + + # @return [ReplicationJobs] replication_jobs + attr_reader :replication_jobs + + # @return [ReplicationEvents] replication_events + attr_reader :replication_events + + # @return [ReplicationAlertSettings] replication_alert_settings + attr_reader :replication_alert_settings + + # + # Creates initializes a new instance of the SiteRecoveryManagementClient 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 + + @replication_vault_health = ReplicationVaultHealth.new(self) + @replication_protected_items = ReplicationProtectedItems.new(self) + @replication_network_mappings = ReplicationNetworkMappings.new(self) + @replication_fabrics = ReplicationFabrics.new(self) + @replicationv_centers = ReplicationvCenters.new(self) + @replication_storage_classification_mappings = ReplicationStorageClassificationMappings.new(self) + @replication_storage_classifications = ReplicationStorageClassifications.new(self) + @replication_recovery_services_providers = ReplicationRecoveryServicesProviders.new(self) + @recovery_points = RecoveryPoints.new(self) + @replication_recovery_plans = ReplicationRecoveryPlans.new(self) + @replication_protection_containers = ReplicationProtectionContainers.new(self) + @replication_protection_container_mappings = ReplicationProtectionContainerMappings.new(self) + @replication_protectable_items = ReplicationProtectableItems.new(self) + @replication_policies = ReplicationPolicies.new(self) + @operations = Operations.new(self) + @replication_networks = ReplicationNetworks.new(self) + @replication_logical_networks = ReplicationLogicalNetworks.new(self) + @replication_jobs = ReplicationJobs.new(self) + @replication_events = ReplicationEvents.new(self) + @replication_alert_settings = ReplicationAlertSettings.new(self) + @api_version = '2016-08-10' + @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_recovery_services_site_recovery' + if defined? Azure::ARM::RecoveryServicesSiteRecovery::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::RecoveryServicesSiteRecovery::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/version.rb b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/version.rb new file mode 100644 index 0000000000..4405f9900c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/lib/generated/azure_mgmt_recovery_services_site_recovery/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::ARM::RecoveryServicesSiteRecovery + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_recovery_services_site_recovery/spec/spec_helper.rb b/management/azure_mgmt_recovery_services_site_recovery/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_recovery_services_site_recovery/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_redis/azure_mgmt_redis.gemspec b/management/azure_mgmt_redis/azure_mgmt_redis.gemspec index 93b12eee83..71b871afa4 100644 --- a/management/azure_mgmt_redis/azure_mgmt_redis.gemspec +++ b/management/azure_mgmt_redis/azure_mgmt_redis.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis.rb old mode 100755 new mode 100644 index feea129510..ee0fe85fd3 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -20,29 +20,39 @@ require 'ms_rest_azure' module Azure::ARM::Redis + autoload :Operations, 'generated/azure_mgmt_redis/operations.rb' autoload :Redis, 'generated/azure_mgmt_redis/redis.rb' + autoload :FirewallRules, 'generated/azure_mgmt_redis/firewall_rules.rb' autoload :PatchSchedules, 'generated/azure_mgmt_redis/patch_schedules.rb' autoload :RedisLinkedServerOperations, 'generated/azure_mgmt_redis/redis_linked_server_operations.rb' autoload :RedisManagementClient, 'generated/azure_mgmt_redis/redis_management_client.rb' module Models + autoload :RedisListResult, 'generated/azure_mgmt_redis/models/redis_list_result.rb' autoload :RedisRegenerateKeyParameters, 'generated/azure_mgmt_redis/models/redis_regenerate_key_parameters.rb' - autoload :Sku, 'generated/azure_mgmt_redis/models/sku.rb' autoload :RedisRebootParameters, 'generated/azure_mgmt_redis/models/redis_reboot_parameters.rb' - autoload :ExportRDBParameters, 'generated/azure_mgmt_redis/models/export_rdbparameters.rb' + autoload :Sku, 'generated/azure_mgmt_redis/models/sku.rb' + autoload :Resource, 'generated/azure_mgmt_redis/models/resource.rb' autoload :RedisUpdateParameters, 'generated/azure_mgmt_redis/models/redis_update_parameters.rb' - autoload :ImportRDBParameters, 'generated/azure_mgmt_redis/models/import_rdbparameters.rb' + autoload :RedisLinkedServerCreateParameters, 'generated/azure_mgmt_redis/models/redis_linked_server_create_parameters.rb' + autoload :Operation, 'generated/azure_mgmt_redis/models/operation.rb' + autoload :ExportRDBParameters, 'generated/azure_mgmt_redis/models/export_rdbparameters.rb' autoload :RedisLinkedServer, 'generated/azure_mgmt_redis/models/redis_linked_server.rb' + autoload :ImportRDBParameters, 'generated/azure_mgmt_redis/models/import_rdbparameters.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_redis/models/operation_display.rb' autoload :ScheduleEntry, 'generated/azure_mgmt_redis/models/schedule_entry.rb' - autoload :RedisListResult, 'generated/azure_mgmt_redis/models/redis_list_result.rb' - autoload :RedisPatchSchedule, 'generated/azure_mgmt_redis/models/redis_patch_schedule.rb' - autoload :RedisLinkedServerCreateParameters, 'generated/azure_mgmt_redis/models/redis_linked_server_create_parameters.rb' autoload :RedisAccessKeys, 'generated/azure_mgmt_redis/models/redis_access_keys.rb' + autoload :RedisPatchSchedule, 'generated/azure_mgmt_redis/models/redis_patch_schedule.rb' + autoload :RedisLinkedServerList, 'generated/azure_mgmt_redis/models/redis_linked_server_list.rb' autoload :RedisForceRebootResponse, 'generated/azure_mgmt_redis/models/redis_force_reboot_response.rb' + autoload :RedisFirewallRuleListResult, 'generated/azure_mgmt_redis/models/redis_firewall_rule_list_result.rb' autoload :RedisLinkedServerWithProperties, 'generated/azure_mgmt_redis/models/redis_linked_server_with_properties.rb' - autoload :RedisLinkedServerList, 'generated/azure_mgmt_redis/models/redis_linked_server_list.rb' + autoload :OperationListResult, 'generated/azure_mgmt_redis/models/operation_list_result.rb' autoload :RedisLinkedServerWithPropertiesList, 'generated/azure_mgmt_redis/models/redis_linked_server_with_properties_list.rb' + autoload :ProxyResource, 'generated/azure_mgmt_redis/models/proxy_resource.rb' + autoload :TrackedResource, 'generated/azure_mgmt_redis/models/tracked_resource.rb' autoload :RedisCreateParameters, 'generated/azure_mgmt_redis/models/redis_create_parameters.rb' + autoload :RedisFirewallRule, 'generated/azure_mgmt_redis/models/redis_firewall_rule.rb' autoload :RedisResource, 'generated/azure_mgmt_redis/models/redis_resource.rb' autoload :SkuName, 'generated/azure_mgmt_redis/models/sku_name.rb' autoload :SkuFamily, 'generated/azure_mgmt_redis/models/sku_family.rb' diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/firewall_rules.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/firewall_rules.rb new file mode 100644 index 0000000000..a4a2e75c3b --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/firewall_rules.rb @@ -0,0 +1,525 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Redis + # + # REST API for Azure Redis Cache Service. + # + class FirewallRules + include MsRestAzure + + # + # Creates and initializes a new instance of the FirewallRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [RedisManagementClient] reference to the RedisManagementClient + attr_reader :client + + # + # Gets all firewall rules in the specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @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_redis_resource(resource_group_name, cache_name, custom_headers = nil) + first_page = list_by_redis_resource_as_lazy(resource_group_name, cache_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all firewall rules in the specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param custom_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_redis_resource_with_http_info(resource_group_name, cache_name, custom_headers = nil) + list_by_redis_resource_async(resource_group_name, cache_name, custom_headers).value! + end + + # + # Gets all firewall rules in the specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param [Hash{String => String}] 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_redis_resource_async(resource_group_name, cache_name, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cache_name is nil' if cache_name.nil? + + + request_headers = {} + + # Set Headers + request_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.Cache/Redis/{cacheName}/firewallRules' + + 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,'cacheName' => cache_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::ARM::Redis::Models::RedisFirewallRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or update a redis cache firewall rule + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param parameters [RedisFirewallRule] Parameters supplied to the create or + # update redis firewall rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RedisFirewallRule] operation results. + # + def create_or_update(resource_group_name, cache_name, rule_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, cache_name, rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update a redis cache firewall rule + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param parameters [RedisFirewallRule] Parameters supplied to the create or + # update redis firewall rule 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 create_or_update_with_http_info(resource_group_name, cache_name, rule_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, cache_name, rule_name, parameters, custom_headers).value! + end + + # + # Create or update a redis cache firewall rule + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param parameters [RedisFirewallRule] Parameters supplied to the create or + # update redis firewall rule 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 create_or_update_async(resource_group_name, cache_name, rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cache_name is nil' if cache_name.nil? + fail ArgumentError, 'rule_name is nil' if rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Redis::Models::RedisFirewallRule.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.Cache/Redis/{cacheName}/firewallRules/{ruleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'cacheName' => cache_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Redis::Models::RedisFirewallRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Redis::Models::RedisFirewallRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a single firewall rule in a specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RedisFirewallRule] operation results. + # + def get(resource_group_name, cache_name, rule_name, custom_headers = nil) + response = get_async(resource_group_name, cache_name, rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a single firewall rule in a specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, cache_name, rule_name, custom_headers = nil) + get_async(resource_group_name, cache_name, rule_name, custom_headers).value! + end + + # + # Gets a single firewall rule in a specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, cache_name, rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cache_name is nil' if cache_name.nil? + fail ArgumentError, 'rule_name is nil' if rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'cacheName' => cache_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Redis::Models::RedisFirewallRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a single firewall rule in a specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, cache_name, rule_name, custom_headers = nil) + response = delete_async(resource_group_name, cache_name, rule_name, custom_headers).value! + nil + end + + # + # Deletes a single firewall rule in a specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, cache_name, rule_name, custom_headers = nil) + delete_async(resource_group_name, cache_name, rule_name, custom_headers).value! + end + + # + # Deletes a single firewall rule in a specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param rule_name [String] The name of the firewall rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, cache_name, rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cache_name is nil' if cache_name.nil? + fail ArgumentError, 'rule_name is nil' if rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'cacheName' => cache_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all firewall rules in the specified redis cache. + # + # @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 [RedisFirewallRuleListResult] operation results. + # + def list_by_redis_resource_next(next_page_link, custom_headers = nil) + response = list_by_redis_resource_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all firewall rules in the specified redis cache. + # + # @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_redis_resource_next_with_http_info(next_page_link, custom_headers = nil) + list_by_redis_resource_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all firewall rules in the specified redis cache. + # + # @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_redis_resource_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Redis::Models::RedisFirewallRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all firewall rules in the specified redis cache. + # + # @param resource_group_name [String] The name of the resource group. + # @param cache_name [String] The name of the Redis cache. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RedisFirewallRuleListResult] which provide lazy access to pages of + # the response. + # + def list_by_redis_resource_as_lazy(resource_group_name, cache_name, custom_headers = nil) + response = list_by_redis_resource_async(resource_group_name, cache_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_redis_resource_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/day_of_week.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/day_of_week.rb old mode 100755 new mode 100644 index 399ec98e20..6f32dd826a --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/day_of_week.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/day_of_week.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/export_rdbparameters.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/export_rdbparameters.rb old mode 100755 new mode 100644 index d0d0ad5216..84bf9f36bd --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/export_rdbparameters.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/export_rdbparameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExportRDBParameters include MsRestAzure - include MsRest::JSONable # @return [String] File format. attr_accessor :format diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/import_rdbparameters.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/import_rdbparameters.rb old mode 100755 new mode 100644 index c69816a4d9..c3ef8dc439 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/import_rdbparameters.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/import_rdbparameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ImportRDBParameters include MsRestAzure - include MsRest::JSONable # @return [String] File format. attr_accessor :format diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/operation.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/operation.rb new file mode 100644 index 0000000000..55556eb7bc --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/operation.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::ARM::Redis + 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 + + + # + # 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' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/operation_display.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/operation_display.rb new file mode 100644 index 0000000000..f6c74e9fe0 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/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::ARM::Redis + 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_redis/lib/generated/azure_mgmt_redis/models/operation_list_result.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/operation_list_result.rb new file mode 100644 index 0000000000..150e9ec216 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/operation_list_result.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::ARM::Redis + 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, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/proxy_resource.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/proxy_resource.rb new file mode 100644 index 0000000000..9a7b4bcbe5 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/proxy_resource.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Redis + module Models + # + # The resource model definition for a ARM proxy resource. It will have + # everything other than required location and tags + # + class ProxyResource < Resource + + include MsRestAzure + + + # + # Mapper for ProxyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProxyResource', + type: { + name: 'Composite', + class_name: 'ProxyResource', + 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_redis/lib/generated/azure_mgmt_redis/models/reboot_type.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/reboot_type.rb old mode 100755 new mode 100644 index f580eb2cbd..dd886691bc --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/reboot_type.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/reboot_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_access_keys.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_access_keys.rb old mode 100755 new mode 100644 index 6c7d707dbf..a514eb59e5 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_access_keys.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_access_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisAccessKeys include MsRestAzure - include MsRest::JSONable # @return [String] The current primary key that clients can use to # authenticate with Redis cache. attr_accessor :primary_key diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_create_parameters.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_create_parameters.rb old mode 100755 new mode 100644 index f58d75b747..dfc23fb1c4 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_create_parameters.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Parameters supplied to the Create Redis operation. # - class RedisCreateParameters < MsRestAzure::Resource + class RedisCreateParameters < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] All Redis Settings. Few possible keys: # rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value # etc. @@ -78,13 +77,6 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serialized_name: 'tags', @@ -99,6 +91,13 @@ def self.mapper() } } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, redis_configuration: { required: false, serialized_name: 'properties.redisConfiguration', diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_firewall_rule.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_firewall_rule.rb new file mode 100644 index 0000000000..1e05dd7174 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_firewall_rule.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::ARM::Redis + module Models + # + # A firewall rule on a redis cache has a name, and describes a contiguous + # range of IP addresses permitted to connect + # + class RedisFirewallRule < ProxyResource + + include MsRestAzure + + # @return [String] lowest IP address included in the range + attr_accessor :start_ip + + # @return [String] highest IP address included in the range + attr_accessor :end_ip + + + # + # Mapper for RedisFirewallRule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RedisFirewallRule', + type: { + name: 'Composite', + class_name: 'RedisFirewallRule', + 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' + } + }, + start_ip: { + required: true, + serialized_name: 'properties.startIP', + type: { + name: 'String' + } + }, + end_ip: { + required: true, + serialized_name: 'properties.endIP', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_firewall_rule_list_result.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_firewall_rule_list_result.rb new file mode 100644 index 0000000000..fe21753cb0 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_firewall_rule_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Redis + module Models + # + # The response of list firewall rules Redis operation. + # + class RedisFirewallRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Results of the list firewall rules + # operation. + attr_accessor :value + + # @return [String] Link for next set of locations. + 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 [RedisFirewallRuleListResult] 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 RedisFirewallRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RedisFirewallRuleListResult', + type: { + name: 'Composite', + class_name: 'RedisFirewallRuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RedisFirewallRuleElementType', + type: { + name: 'Composite', + class_name: 'RedisFirewallRule' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_force_reboot_response.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_force_reboot_response.rb old mode 100755 new mode 100644 index ea7223bea8..df5f13147e --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_force_reboot_response.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_force_reboot_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisForceRebootResponse include MsRestAzure - include MsRest::JSONable # @return [String] Status message attr_accessor :message diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_key_type.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_key_type.rb old mode 100755 new mode 100644 index 3caa2b134c..804bc630bc --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_key_type.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server.rb index 43e16da642..fb9097ea9a 100644 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisLinkedServer include MsRestAzure - include MsRest::JSONable # @return [String] Linked server Id. attr_accessor :id diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_create_parameters.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_create_parameters.rb index 1848b93b77..8ac04dd87c 100644 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_create_parameters.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisLinkedServerCreateParameters include MsRestAzure - include MsRest::JSONable # @return [String] Fully qualified resourceId of the linked redis cache. attr_accessor :linked_redis_cache_id diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_list.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_list.rb index 4f51524d3b..a0da25a2de 100644 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_list.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisLinkedServerList include MsRestAzure - include MsRest::JSONable # @return [Array] List of linked server Ids of a Redis # cache. attr_accessor :value diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties.rb index 3d3f8ba6f8..96c2a31add 100644 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisLinkedServerWithProperties include MsRestAzure - include MsRest::JSONable # @return [String] Resource ID. attr_accessor :id diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties_list.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties_list.rb index 11ebe54065..a45312683d 100644 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties_list.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties_list.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisLinkedServerWithPropertiesList include MsRestAzure - include MsRest::JSONable # @return [Array] List of linked servers # (with properites) of a Redis cache. attr_accessor :value diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_list_result.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_list_result.rb old mode 100755 new mode 100644 index 682d64c989..e11147bd31 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_list_result.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -80,6 +80,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_patch_schedule.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_patch_schedule.rb old mode 100755 new mode 100644 index 3eadce72b7..7871546b58 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_patch_schedule.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_patch_schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisPatchSchedule include MsRestAzure - include MsRest::JSONable # @return [String] Resource ID. attr_accessor :id diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_reboot_parameters.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_reboot_parameters.rb old mode 100755 new mode 100644 index 0a19c59efe..ceba78cbda --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_reboot_parameters.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_reboot_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisRebootParameters include MsRestAzure - include MsRest::JSONable # @return [RebootType] Which Redis node(s) to reboot. Depending on this # value data loss is possible. Possible values include: 'PrimaryNode', # 'SecondaryNode', 'AllNodes' diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_regenerate_key_parameters.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_regenerate_key_parameters.rb old mode 100755 new mode 100644 index 0d79f85fb3..ba13e8602a --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_regenerate_key_parameters.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_regenerate_key_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisRegenerateKeyParameters include MsRestAzure - include MsRest::JSONable # @return [RedisKeyType] The Redis access key to regenerate. Possible # values include: 'Primary', 'Secondary' attr_accessor :key_type diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_resource.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_resource.rb old mode 100755 new mode 100644 index d6911a6ea7..feb3a90e7f --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_resource.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A single Redis item in List or Get Operation. # - class RedisResource < MsRestAzure::Resource + class RedisResource < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] All Redis Settings. Few possible keys: # rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value # etc. @@ -101,13 +100,6 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serialized_name: 'tags', @@ -122,6 +114,13 @@ def self.mapper() } } }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, redis_configuration: { required: false, serialized_name: 'properties.redisConfiguration', diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_update_parameters.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_update_parameters.rb old mode 100755 new mode 100644 index 62d011c396..4794c21b30 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_update_parameters.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/redis_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RedisUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] All Redis Settings. Few possible keys: # rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value # etc. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/replication_role.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/replication_role.rb index ee2048115f..be311b7349 100644 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/replication_role.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/replication_role.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/resource.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/resource.rb new file mode 100644 index 0000000000..bb31912707 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/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::ARM::Redis + 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. + 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_redis/lib/generated/azure_mgmt_redis/models/schedule_entry.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/schedule_entry.rb old mode 100755 new mode 100644 index 950724ae43..f1498206e3 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/schedule_entry.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/schedule_entry.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ScheduleEntry include MsRestAzure - include MsRest::JSONable # @return [DayOfWeek] Day of the week when a cache can be patched. # Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', # 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend' diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku.rb old mode 100755 new mode 100644 index f6d6e0af9f..9a35c351c5 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] The type of Redis cache to deploy. Valid values: # (Basic, Standard, Premium). Possible values include: 'Basic', # 'Standard', 'Premium' diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_family.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_family.rb old mode 100755 new mode 100644 index 7b0ac4a092..99e5bd5b1a --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_family.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_family.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_name.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_name.rb old mode 100755 new mode 100644 index 1e3fd75cb5..56bc68c1b5 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_name.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/tracked_resource.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/tracked_resource.rb new file mode 100644 index 0000000000..d41504df31 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/models/tracked_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::ARM::Redis + module Models + # + # The resource model definition for a ARM tracked top level resource + # + class TrackedResource < Resource + + include MsRestAzure + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + # @return [String] The geo-location where the resource lives + attr_accessor :location + + + # + # Mapper for TrackedResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TrackedResource', + type: { + name: 'Composite', + class_name: 'TrackedResource', + 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' + } + } + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/module_definition.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/module_definition.rb old mode 100755 new mode 100644 index 060abe0236..55ef703970 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/module_definition.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/operations.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/operations.rb new file mode 100644 index 0000000000..ef7c7477b7 --- /dev/null +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/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::ARM::Redis + # + # REST API for Azure Redis Cache Service. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [RedisManagementClient] reference to the RedisManagementClient + attr_reader :client + + # + # Lists all of the available REST API operations of the Microsoft.Cache + # 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.Cache + # 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.Cache + # 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.Cache/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::ARM::Redis::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.Cache + # 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.Cache + # 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.Cache + # 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::ARM::Redis::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.Cache + # 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_redis/lib/generated/azure_mgmt_redis/patch_schedules.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/patch_schedules.rb old mode 100755 new mode 100644 index ccc8392f1d..38ac021d67 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/patch_schedules.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/patch_schedules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis.rb old mode 100755 new mode 100644 index be02d98aee..4a52a82b6a --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_linked_server_operations.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_linked_server_operations.rb index b9a09da77d..84d3d58762 100644 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_linked_server_operations.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_linked_server_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_management_client.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_management_client.rb old mode 100755 new mode 100644 index 2648c22329..c440a5b1ee --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_management_client.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/redis_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -36,9 +36,15 @@ class RedisManagementClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id + # @return [Operations] operations + attr_reader :operations + # @return [Redis] redis attr_reader :redis + # @return [FirewallRules] firewall_rules + attr_reader :firewall_rules + # @return [PatchSchedules] patch_schedules attr_reader :patch_schedules @@ -58,7 +64,9 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials + @operations = Operations.new(self) @redis = Redis.new(self) + @firewall_rules = FirewallRules.new(self) @patch_schedules = PatchSchedules.new(self) @redis_linked_server_operations = RedisLinkedServerOperations.new(self) @api_version = '2017-02-01' diff --git a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/version.rb b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/version.rb old mode 100755 new mode 100644 index ac910e470c..33c65f8757 --- a/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/version.rb +++ b/management/azure_mgmt_redis/lib/generated/azure_mgmt_redis/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Redis - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_relay/.rspec b/management/azure_mgmt_relay/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_relay/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_relay/LICENSE.txt b/management/azure_mgmt_relay/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_relay/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_relay/Rakefile b/management/azure_mgmt_relay/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_relay/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_relay/azure_mgmt_relay.gemspec b/management/azure_mgmt_relay/azure_mgmt_relay.gemspec new file mode 100644 index 0000000000..5e6c32a164 --- /dev/null +++ b/management/azure_mgmt_relay/azure_mgmt_relay.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_relay/module_definition' +require 'generated/azure_mgmt_relay/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_relay' + spec.version = Azure::ARM::Relay::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Relay Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Relay.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_relay/lib/azure_mgmt_relay.rb b/management/azure_mgmt_relay/lib/azure_mgmt_relay.rb new file mode 100644 index 0000000000..a0008d7b7e --- /dev/null +++ b/management/azure_mgmt_relay/lib/azure_mgmt_relay.rb @@ -0,0 +1,8 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_relay' + + + diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay.rb new file mode 100644 index 0000000000..0a9c33efe0 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay.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. + +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 'generated/azure_mgmt_relay/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::Relay + autoload :Operations, 'generated/azure_mgmt_relay/operations.rb' + autoload :Namespaces, 'generated/azure_mgmt_relay/namespaces.rb' + autoload :HybridConnections, 'generated/azure_mgmt_relay/hybrid_connections.rb' + autoload :WCFRelays, 'generated/azure_mgmt_relay/wcfrelays.rb' + autoload :RelayManagementClient, 'generated/azure_mgmt_relay/relay_management_client.rb' + + module Models + autoload :RelayNamespaceListResult, 'generated/azure_mgmt_relay/models/relay_namespace_list_result.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_relay/models/operation_display.rb' + autoload :Resource, 'generated/azure_mgmt_relay/models/resource.rb' + autoload :CheckNameAvailability, 'generated/azure_mgmt_relay/models/check_name_availability.rb' + autoload :HybridConnectionListResult, 'generated/azure_mgmt_relay/models/hybrid_connection_list_result.rb' + autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_relay/models/check_name_availability_result.rb' + autoload :WcfRelaysListResult, 'generated/azure_mgmt_relay/models/wcf_relays_list_result.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_relay/models/error_response.rb' + autoload :OperationListResult, 'generated/azure_mgmt_relay/models/operation_list_result.rb' + autoload :AuthorizationRuleListResult, 'generated/azure_mgmt_relay/models/authorization_rule_list_result.rb' + autoload :Sku, 'generated/azure_mgmt_relay/models/sku.rb' + autoload :AccessKeys, 'generated/azure_mgmt_relay/models/access_keys.rb' + autoload :Operation, 'generated/azure_mgmt_relay/models/operation.rb' + autoload :RegenerateAccessKeyParameters, 'generated/azure_mgmt_relay/models/regenerate_access_key_parameters.rb' + autoload :TrackedResource, 'generated/azure_mgmt_relay/models/tracked_resource.rb' + autoload :ResourceNamespacePatch, 'generated/azure_mgmt_relay/models/resource_namespace_patch.rb' + autoload :HybridConnection, 'generated/azure_mgmt_relay/models/hybrid_connection.rb' + autoload :WcfRelay, 'generated/azure_mgmt_relay/models/wcf_relay.rb' + autoload :RelayNamespace, 'generated/azure_mgmt_relay/models/relay_namespace.rb' + autoload :RelayUpdateParameters, 'generated/azure_mgmt_relay/models/relay_update_parameters.rb' + autoload :AuthorizationRule, 'generated/azure_mgmt_relay/models/authorization_rule.rb' + autoload :Relaytype, 'generated/azure_mgmt_relay/models/relaytype.rb' + autoload :SkuTier, 'generated/azure_mgmt_relay/models/sku_tier.rb' + autoload :ProvisioningStateEnum, 'generated/azure_mgmt_relay/models/provisioning_state_enum.rb' + autoload :AccessRights, 'generated/azure_mgmt_relay/models/access_rights.rb' + autoload :KeyType, 'generated/azure_mgmt_relay/models/key_type.rb' + autoload :UnavailableReason, 'generated/azure_mgmt_relay/models/unavailable_reason.rb' + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/hybrid_connections.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/hybrid_connections.rb new file mode 100644 index 0000000000..35cddc9af0 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/hybrid_connections.rb @@ -0,0 +1,1269 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + # + # Use these API to manage Azure Relay resources through Azure Resource + # Manager. + # + class HybridConnections + include MsRestAzure + + # + # Creates and initializes a new instance of the HybridConnections class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [RelayManagementClient] reference to the RelayManagementClient + attr_reader :client + + # + # Lists the hybrid connection within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_namespace(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers) + first_page.get_all_items + end + + # + # Lists the hybrid connection within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Lists the hybrid connection within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_namespace_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::HybridConnectionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 service hybrid connection. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param parameters [HybridConnection] Parameters supplied to create a hybrid + # connection. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HybridConnection] operation results. + # + def create_or_update(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a service hybrid connection. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param parameters [HybridConnection] Parameters supplied to create a hybrid + # connection. + # @param custom_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, namespace_name, hybrid_connection_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, hybrid_connection_name, parameters, custom_headers).value! + end + + # + # Creates or updates a service hybrid connection. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param parameters [HybridConnection] Parameters supplied to create a hybrid + # connection. + # @param [Hash{String => String}] 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, namespace_name, hybrid_connection_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::HybridConnection.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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_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::ARM::Relay::Models::HybridConnection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value! + nil + end + + # + # Deletes a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value! + end + + # + # Deletes a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_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 + + # + # Returns the description for the specified hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HybridConnection] operation results. + # + def get(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the description for the specified hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value! + end + + # + # Returns the description for the specified hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_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::ARM::Relay::Models::HybridConnection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Authorization rules for a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @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_authorization_rules(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers) + first_page.get_all_items + end + + # + # Authorization rules for a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value! + end + + # + # Authorization rules for a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_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::ARM::Relay::Models::AuthorizationRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 authorization rule for a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRule] operation results. + # + def create_or_update_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil) + response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an authorization rule for a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule 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_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil) + create_or_update_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Creates or updates an authorization rule for a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule 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_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::AuthorizationRule.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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AuthorizationRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a hybrid connection authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + response = delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value! + nil + end + + # + # Deletes a hybrid connection authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value! + end + + # + # Deletes a hybrid connection authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 + + # + # Hybrid connection authorization rule for a hybrid connection by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRule] operation results. + # + def get_authorization_rule(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Hybrid connection authorization rule for a hybrid connection by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value! + end + + # + # Hybrid connection authorization rule for a hybrid connection by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_authorization_rule_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::Relay::Models::AuthorizationRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Primary and secondary connection strings to the hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessKeys] operation results. + # + def list_keys(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Primary and secondary connection strings to the hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_keys_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers).value! + end + + # + # Primary and secondary connection strings to the hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/listKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates the primary or secondary connection strings to the hybrid + # connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessKeys] operation results. + # + def regenerate_keys(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the primary or secondary connection strings to the hybrid + # connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_keys_with_http_info(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Regenerates the primary or secondary connection strings to the hybrid + # connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_keys_async(resource_group_name, namespace_name, hybrid_connection_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'hybrid_connection_name is nil' if hybrid_connection_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::RegenerateAccessKeyParameters.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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'hybridConnectionName' => hybrid_connection_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::Relay::Models::AccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 hybrid connection within the namespace. + # + # @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 [HybridConnectionListResult] operation results. + # + def list_by_namespace_next(next_page_link, custom_headers = nil) + response = list_by_namespace_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the hybrid connection within the namespace. + # + # @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_namespace_next_with_http_info(next_page_link, custom_headers = nil) + list_by_namespace_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the hybrid connection within the namespace. + # + # @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_namespace_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::ARM::Relay::Models::HybridConnectionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Authorization rules for a hybrid connection. + # + # @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 [AuthorizationRuleListResult] operation results. + # + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Authorization rules for a hybrid connection. + # + # @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_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! + end + + # + # Authorization rules for a hybrid connection. + # + # @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_authorization_rules_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::ARM::Relay::Models::AuthorizationRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 hybrid connection within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HybridConnectionListResult] which provide lazy access to pages of + # the response. + # + def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_namespace_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Authorization rules for a hybrid connection. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param hybrid_connection_name [String] The hybrid connection name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRuleListResult] which provide lazy access to pages of + # the response. + # + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, hybrid_connection_name, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, hybrid_connection_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_authorization_rules_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/access_keys.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/access_keys.rb new file mode 100644 index 0000000000..cc83698a69 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/access_keys.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + module Models + # + # Namespace/Relay Connection String + # + class AccessKeys + + include MsRestAzure + + # @return [String] Primary connection string of the created namespace + # authorization rule. + attr_accessor :primary_connection_string + + # @return [String] Secondary connection string of the created namespace + # authorization rule. + attr_accessor :secondary_connection_string + + # @return [String] A base64-encoded 256-bit primary key for signing and + # validating the SAS token. + attr_accessor :primary_key + + # @return [String] A base64-encoded 256-bit secondary key for signing and + # validating the SAS token. + attr_accessor :secondary_key + + # @return [String] A string that describes the authorization rule. + attr_accessor :key_name + + + # + # Mapper for AccessKeys class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AccessKeys', + type: { + name: 'Composite', + class_name: 'AccessKeys', + model_properties: { + primary_connection_string: { + required: false, + serialized_name: 'primaryConnectionString', + type: { + name: 'String' + } + }, + secondary_connection_string: { + required: false, + serialized_name: 'secondaryConnectionString', + type: { + name: 'String' + } + }, + primary_key: { + required: false, + serialized_name: 'primaryKey', + type: { + name: 'String' + } + }, + secondary_key: { + required: false, + serialized_name: 'secondaryKey', + type: { + name: 'String' + } + }, + key_name: { + required: false, + serialized_name: 'keyName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/access_rights.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/access_rights.rb new file mode 100644 index 0000000000..f8f0c5d7f3 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/access_rights.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::ARM::Relay + module Models + # + # Defines values for AccessRights + # + module AccessRights + Manage = "Manage" + Send = "Send" + Listen = "Listen" + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/authorization_rule.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/authorization_rule.rb new file mode 100644 index 0000000000..43cd9fb022 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/authorization_rule.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::ARM::Relay + module Models + # + # Description of a namespace authorization rule. + # + class AuthorizationRule < Resource + + include MsRestAzure + + # @return [Array] The rights associated with the rule. + attr_accessor :rights + + + # + # Mapper for AuthorizationRule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationRule', + type: { + name: 'Composite', + class_name: 'AuthorizationRule', + 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' + } + }, + rights: { + required: false, + serialized_name: 'properties.rights', + constraints: { + UniqueItems: true + }, + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AccessRightsElementType', + type: { + name: 'Enum', + module: 'AccessRights' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/authorization_rule_list_result.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/authorization_rule_list_result.rb new file mode 100644 index 0000000000..0f93644561 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/authorization_rule_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + module Models + # + # The response from the list namespace operation. + # + class AuthorizationRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the list authorization + # rules operation. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if value + # contains incomplete list of authorization rules. + 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 [AuthorizationRuleListResult] 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 AuthorizationRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AuthorizationRuleListResult', + type: { + name: 'Composite', + class_name: 'AuthorizationRuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AuthorizationRuleElementType', + type: { + name: 'Composite', + class_name: 'AuthorizationRule' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/check_name_availability.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/check_name_availability.rb new file mode 100644 index 0000000000..2f9852e7bc --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/check_name_availability.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::ARM::Relay + module Models + # + # Description of the check name availability request properties. + # + class CheckNameAvailability + + include MsRestAzure + + # @return [String] The namespace name to check for availability. The + # namespace name can contain only letters, numbers, and hyphens. The + # namespace must start with a letter, and it must end with a letter or + # number. + attr_accessor :name + + + # + # Mapper for CheckNameAvailability class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CheckNameAvailability', + type: { + name: 'Composite', + class_name: 'CheckNameAvailability', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/check_name_availability_result.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/check_name_availability_result.rb new file mode 100644 index 0000000000..d2fd69af4a --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/check_name_availability_result.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::ARM::Relay + module Models + # + # Description of the check name availability request properties. + # + class CheckNameAvailabilityResult + + include MsRestAzure + + # @return [String] The detailed info regarding the reason associated with + # the namespace. + attr_accessor :message + + # @return [Boolean] Value indicating namespace is available. Returns true + # if the namespace is available; otherwise, false. + attr_accessor :name_available + + # @return [UnavailableReason] The reason for unavailability of a + # namespace. Possible values include: 'None', 'InvalidName', + # 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', + # 'TooManyNamespaceInCurrentSubscription' + attr_accessor :reason + + + # + # Mapper for CheckNameAvailabilityResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CheckNameAvailabilityResult', + type: { + name: 'Composite', + class_name: 'CheckNameAvailabilityResult', + model_properties: { + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + }, + name_available: { + required: false, + serialized_name: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + reason: { + required: false, + serialized_name: 'reason', + type: { + name: 'Enum', + module: 'UnavailableReason' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/error_response.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/error_response.rb new file mode 100644 index 0000000000..dd14721f93 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/error_response.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::ARM::Relay + module Models + # + # Error reponse indicates Relay service is not able to process the incoming + # request. The reason is provided in the error message. + # + class ErrorResponse + + include MsRestAzure + + # @return [String] Error code. + attr_accessor :code + + # @return [String] Error message indicating why the operation failed. + attr_accessor :message + + + # + # 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: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/hybrid_connection.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/hybrid_connection.rb new file mode 100644 index 0000000000..b21792c960 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/hybrid_connection.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::ARM::Relay + module Models + # + # Description of hybrid connection resource. + # + class HybridConnection < Resource + + include MsRestAzure + + # @return [DateTime] The time the hybrid connection was created. + attr_accessor :created_at + + # @return [DateTime] The time the namespace was updated. + attr_accessor :updated_at + + # @return [Integer] The number of listeners for this hybrid connection. + # Note that min : 1 and max:25 are supported. + attr_accessor :listener_count + + # @return [Boolean] Returns true if client authorization is needed for + # this hybrid connection; otherwise, false. + attr_accessor :requires_client_authorization + + # @return [String] The usermetadata is a placeholder to store + # user-defined string data for the hybrid connection endpoint. For + # example, it can be used to store descriptive data, such as a list of + # teams and their contact information. Also, user-defined configuration + # settings can be stored. + attr_accessor :user_metadata + + + # + # Mapper for HybridConnection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HybridConnection', + type: { + name: 'Composite', + class_name: 'HybridConnection', + 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' + } + }, + created_at: { + required: false, + read_only: true, + serialized_name: 'properties.createdAt', + type: { + name: 'DateTime' + } + }, + updated_at: { + required: false, + read_only: true, + serialized_name: 'properties.updatedAt', + type: { + name: 'DateTime' + } + }, + listener_count: { + required: false, + read_only: true, + serialized_name: 'properties.listenerCount', + constraints: { + InclusiveMaximum: 25, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + requires_client_authorization: { + required: false, + serialized_name: 'properties.requiresClientAuthorization', + type: { + name: 'Boolean' + } + }, + user_metadata: { + required: false, + serialized_name: 'properties.userMetadata', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/hybrid_connection_list_result.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/hybrid_connection_list_result.rb new file mode 100644 index 0000000000..b0a96d30ed --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/hybrid_connection_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::ARM::Relay + module Models + # + # The response of the list hybrid connection operation. + # + class HybridConnectionListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the list hybrid + # connections. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if value + # contains incomplete list hybrid connection operation. + 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 [HybridConnectionListResult] 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 HybridConnectionListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HybridConnectionListResult', + type: { + name: 'Composite', + class_name: 'HybridConnectionListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HybridConnectionElementType', + type: { + name: 'Composite', + class_name: 'HybridConnection' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/key_type.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/key_type.rb new file mode 100644 index 0000000000..b1230faf57 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/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::ARM::Relay + module Models + # + # Defines values for KeyType + # + module KeyType + PrimaryKey = "PrimaryKey" + SecondaryKey = "SecondaryKey" + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation.rb new file mode 100644 index 0000000000..ebae8e5250 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation.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::ARM::Relay + module Models + # + # A Relay REST API operation. + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation} + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation_display.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation_display.rb new file mode 100644 index 0000000000..9fc98f2631 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation_display.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::ARM::Relay + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Relay. + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: Invoice, + # etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation_list_result.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation_list_result.rb similarity index 89% rename from management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation_list_result.rb rename to management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation_list_result.rb index 9a7f987b75..17f2ef8fd0 100644 --- a/management/azure_mgmt_cdn/lib/generated/azure_mgmt_cdn/models/operation_list_result.rb +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/operation_list_result.rb @@ -1,12 +1,12 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. -module Azure::ARM::CDN +module Azure::ARM::Relay module Models # - # Result of the request to list CDN operations. It contains a list of + # Result of the request to list Relay operations. It contains a list of # operations and a URL link to get the next set of results. # class OperationListResult @@ -14,7 +14,7 @@ class OperationListResult include MsRestAzure include MsRest::JSONable - # @return [Array] List of CDN operations supported by the CDN + # @return [Array] List of Relay operations supported by # resource provider. attr_accessor :value @@ -68,6 +68,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', @@ -83,6 +84,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/provisioning_state_enum.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/provisioning_state_enum.rb new file mode 100644 index 0000000000..c8b9b8eb46 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/provisioning_state_enum.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::ARM::Relay + module Models + # + # Defines values for ProvisioningStateEnum + # + module ProvisioningStateEnum + Created = "Created" + Succeeded = "Succeeded" + Deleted = "Deleted" + Failed = "Failed" + Updating = "Updating" + Unknown = "Unknown" + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/regenerate_access_key_parameters.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/regenerate_access_key_parameters.rb new file mode 100644 index 0000000000..d806f75b53 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/regenerate_access_key_parameters.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::ARM::Relay + module Models + # + # Parameters supplied to the regenerate authorization rule operation, + # specifies which key neeeds to be reset. + # + class RegenerateAccessKeyParameters + + include MsRestAzure + + # @return [KeyType] The access key to regenerate. Possible values + # include: 'PrimaryKey', 'SecondaryKey' + attr_accessor :key_type + + # @return [String] Optional. If the key value is provided, this is set to + # key type, or autogenerated key value set for key type. + attr_accessor :key + + + # + # Mapper for RegenerateAccessKeyParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RegenerateAccessKeyParameters', + type: { + name: 'Composite', + class_name: 'RegenerateAccessKeyParameters', + model_properties: { + key_type: { + required: true, + serialized_name: 'keyType', + type: { + name: 'Enum', + module: 'KeyType' + } + }, + key: { + required: false, + serialized_name: 'key', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_namespace.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_namespace.rb new file mode 100644 index 0000000000..998e362ccf --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_namespace.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::ARM::Relay + module Models + # + # Description of a namespace resource. + # + class RelayNamespace < TrackedResource + + include MsRestAzure + + # @return [Sku] SKU of the namespace. + attr_accessor :sku + + # @return [ProvisioningStateEnum] Possible values include: 'Created', + # 'Succeeded', 'Deleted', 'Failed', 'Updating', 'Unknown' + attr_accessor :provisioning_state + + # @return [DateTime] The time the namespace was created. + attr_accessor :created_at + + # @return [DateTime] The time the namespace was updated. + attr_accessor :updated_at + + # @return [String] Endpoint you can use to perform Service Bus + # operations. + attr_accessor :service_bus_endpoint + + # @return [String] Identifier for Azure Insights metrics. + attr_accessor :metric_id + + + # + # Mapper for RelayNamespace class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelayNamespace', + type: { + name: 'Composite', + class_name: 'RelayNamespace', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'ProvisioningStateEnum' + } + }, + created_at: { + required: false, + read_only: true, + serialized_name: 'properties.createdAt', + type: { + name: 'DateTime' + } + }, + updated_at: { + required: false, + read_only: true, + serialized_name: 'properties.updatedAt', + type: { + name: 'DateTime' + } + }, + service_bus_endpoint: { + required: false, + read_only: true, + serialized_name: 'properties.serviceBusEndpoint', + type: { + name: 'String' + } + }, + metric_id: { + required: false, + read_only: true, + serialized_name: 'properties.metricId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_namespace_list_result.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_namespace_list_result.rb new file mode 100644 index 0000000000..1069288758 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_namespace_list_result.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::ARM::Relay + module Models + # + # The response from the list namespace operation. + # + class RelayNamespaceListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the list namespace operation. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if value + # contains incomplete list of namespaces. + 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 [RelayNamespaceListResult] 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 RelayNamespaceListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelayNamespaceListResult', + type: { + name: 'Composite', + class_name: 'RelayNamespaceListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RelayNamespaceElementType', + type: { + name: 'Composite', + class_name: 'RelayNamespace' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_update_parameters.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_update_parameters.rb new file mode 100644 index 0000000000..8eb148c1d6 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relay_update_parameters.rb @@ -0,0 +1,141 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + module Models + # + # Description of a namespace resource. + # + class RelayUpdateParameters < ResourceNamespacePatch + + include MsRestAzure + + # @return [Sku] SKU of the namespace. + attr_accessor :sku + + # @return [ProvisioningStateEnum] Possible values include: 'Created', + # 'Succeeded', 'Deleted', 'Failed', 'Updating', 'Unknown' + attr_accessor :provisioning_state + + # @return [DateTime] The time the namespace was created. + attr_accessor :created_at + + # @return [DateTime] The time the namespace was updated. + attr_accessor :updated_at + + # @return [String] Endpoint you can use to perform Service Bus + # operations. + attr_accessor :service_bus_endpoint + + # @return [String] Identifier for Azure Insights metrics. + attr_accessor :metric_id + + + # + # Mapper for RelayUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RelayUpdateParameters', + type: { + name: 'Composite', + class_name: 'RelayUpdateParameters', + 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' + } + } + } + }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'ProvisioningStateEnum' + } + }, + created_at: { + required: false, + read_only: true, + serialized_name: 'properties.createdAt', + type: { + name: 'DateTime' + } + }, + updated_at: { + required: false, + read_only: true, + serialized_name: 'properties.updatedAt', + type: { + name: 'DateTime' + } + }, + service_bus_endpoint: { + required: false, + read_only: true, + serialized_name: 'properties.serviceBusEndpoint', + type: { + name: 'String' + } + }, + metric_id: { + required: false, + read_only: true, + serialized_name: 'properties.metricId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relaytype.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relaytype.rb new file mode 100644 index 0000000000..33c15ebae8 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/relaytype.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::ARM::Relay + module Models + # + # Defines values for Relaytype + # + module Relaytype + NetTcp = "NetTcp" + Http = "Http" + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/resource.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/resource.rb new file mode 100644 index 0000000000..95632952b7 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/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::ARM::Relay + 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. + 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_relay/lib/generated/azure_mgmt_relay/models/resource_namespace_patch.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/resource_namespace_patch.rb new file mode 100644 index 0000000000..a79b207164 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/resource_namespace_patch.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::ARM::Relay + module Models + # + # Definition of resource. + # + class ResourceNamespacePatch < Resource + + include MsRestAzure + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for ResourceNamespacePatch class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ResourceNamespacePatch', + type: { + name: 'Composite', + class_name: 'ResourceNamespacePatch', + 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_relay/lib/generated/azure_mgmt_relay/models/sku.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/sku.rb new file mode 100644 index 0000000000..8eb6347bdb --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/sku.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::ARM::Relay + module Models + # + # SKU of the namespace. + # + class Sku + + include MsRestAzure + + # @return [String] Name of this SKU. Default value: 'Standard' . + attr_accessor :name + + # @return [SkuTier] The tier of this SKU. Possible values include: + # 'Standard' + attr_accessor :tier + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + required: true, + is_constant: true, + serialized_name: 'name', + default_value: 'Standard', + type: { + name: 'String' + } + }, + tier: { + required: false, + serialized_name: 'tier', + type: { + name: 'Enum', + module: 'SkuTier' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/sku_tier.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/sku_tier.rb new file mode 100644 index 0000000000..707500c1a5 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/sku_tier.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + module Models + # + # Defines values for SkuTier + # + module SkuTier + Standard = "Standard" + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/tracked_resource.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/tracked_resource.rb new file mode 100644 index 0000000000..c454405e81 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/tracked_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::ARM::Relay + module Models + # + # Definition of resource. + # + class TrackedResource < Resource + + include MsRestAzure + + # @return [String] Resource location. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for TrackedResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TrackedResource', + type: { + name: 'Composite', + class_name: 'TrackedResource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/unavailable_reason.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/unavailable_reason.rb new file mode 100644 index 0000000000..01dc857a28 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/unavailable_reason.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::ARM::Relay + module Models + # + # Defines values for UnavailableReason + # + module UnavailableReason + None = "None" + InvalidName = "InvalidName" + SubscriptionIsDisabled = "SubscriptionIsDisabled" + NameInUse = "NameInUse" + NameInLockdown = "NameInLockdown" + TooManyNamespaceInCurrentSubscription = "TooManyNamespaceInCurrentSubscription" + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/wcf_relay.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/wcf_relay.rb new file mode 100644 index 0000000000..95899cf313 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/wcf_relay.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::ARM::Relay + module Models + # + # Description of the WCF relay resource. + # + class WcfRelay < Resource + + include MsRestAzure + + # @return [Boolean] Returns true if the relay is dynamic; otherwise, + # false. + attr_accessor :is_dynamic + + # @return [DateTime] The time the WCF relay was created. + attr_accessor :created_at + + # @return [DateTime] The time the namespace was updated. + attr_accessor :updated_at + + # @return [Integer] The number of listeners for this relay. Note that min + # :1 and max:25 are supported. + attr_accessor :listener_count + + # @return [Relaytype] WCF relay type. Possible values include: 'NetTcp', + # 'Http' + attr_accessor :relay_type + + # @return [Boolean] Returns true if client authorization is needed for + # this relay; otherwise, false. + attr_accessor :requires_client_authorization + + # @return [Boolean] Returns true if transport security is needed for this + # relay; otherwise, false. + attr_accessor :requires_transport_security + + # @return [String] The usermetadata is a placeholder to store + # user-defined string data for the WCF Relay endpoint. For example, it + # can be used to store descriptive data, such as list of teams and their + # contact information. Also, user-defined configuration settings can be + # stored. + attr_accessor :user_metadata + + + # + # Mapper for WcfRelay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WcfRelay', + type: { + name: 'Composite', + class_name: 'WcfRelay', + 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' + } + }, + is_dynamic: { + required: false, + read_only: true, + serialized_name: 'properties.isDynamic', + type: { + name: 'Boolean' + } + }, + created_at: { + required: false, + read_only: true, + serialized_name: 'properties.createdAt', + type: { + name: 'DateTime' + } + }, + updated_at: { + required: false, + read_only: true, + serialized_name: 'properties.updatedAt', + type: { + name: 'DateTime' + } + }, + listener_count: { + required: false, + read_only: true, + serialized_name: 'properties.listenerCount', + constraints: { + InclusiveMaximum: 25, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + relay_type: { + required: false, + serialized_name: 'properties.relayType', + type: { + name: 'Enum', + module: 'Relaytype' + } + }, + requires_client_authorization: { + required: false, + serialized_name: 'properties.requiresClientAuthorization', + type: { + name: 'Boolean' + } + }, + requires_transport_security: { + required: false, + serialized_name: 'properties.requiresTransportSecurity', + type: { + name: 'Boolean' + } + }, + user_metadata: { + required: false, + serialized_name: 'properties.userMetadata', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/wcf_relays_list_result.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/wcf_relays_list_result.rb new file mode 100644 index 0000000000..52ec162474 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/models/wcf_relays_list_result.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::ARM::Relay + module Models + # + # The response of the list WCF relay operation. + # + class WcfRelaysListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the list WCF relay operation. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if value + # contains incomplete list of WCF relays. + 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 [WcfRelaysListResult] 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 WcfRelaysListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WcfRelaysListResult', + type: { + name: 'Composite', + class_name: 'WcfRelaysListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WcfRelayElementType', + type: { + name: 'Composite', + class_name: 'WcfRelay' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/module_definition.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/module_definition.rb new file mode 100644 index 0000000000..730ba6379d --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/module_definition.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 end +module Azure::ARM end +module Azure::ARM::Relay end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/namespaces.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/namespaces.rb new file mode 100644 index 0000000000..434f4776a6 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/namespaces.rb @@ -0,0 +1,1745 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + # + # Use these API to manage Azure Relay resources through Azure Resource + # Manager. + # + class Namespaces + include MsRestAzure + + # + # Creates and initializes a new instance of the Namespaces class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [RelayManagementClient] reference to the RelayManagementClient + attr_reader :client + + # + # Check the specified namespace name availability. + # + # @param parameters [CheckNameAvailability] Parameters to check availability of + # the specified namespace name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CheckNameAvailabilityResult] operation results. + # + def check_name_availability_method(parameters, custom_headers = nil) + response = check_name_availability_method_async(parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Check the specified namespace name availability. + # + # @param parameters [CheckNameAvailability] Parameters to check availability of + # the specified namespace name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def check_name_availability_method_with_http_info(parameters, custom_headers = nil) + check_name_availability_method_async(parameters, custom_headers).value! + end + + # + # Check the specified namespace name availability. + # + # @param parameters [CheckNameAvailability] Parameters to check availability of + # the specified namespace name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def check_name_availability_method_async(parameters, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::CheckNameAvailability.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.Relay/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::CheckNameAvailabilityResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the available namespaces within the subscription regardless of the + # resourceGroups. + # + # @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 the available namespaces within the subscription regardless of the + # resourceGroups. + # + # @param custom_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 the available namespaces within the subscription regardless of the + # resourceGroups. + # + # @param [Hash{String => String}] 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.Relay/namespaces' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::RelayNamespaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the available namespaces within the ResourceGroup. + # + # @param resource_group_name [String] Name of the Resource group within the + # 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_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 + + # + # Lists all the available namespaces within the ResourceGroup. + # + # @param resource_group_name [String] Name of the Resource group within the + # 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_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) + list_by_resource_group_async(resource_group_name, custom_headers).value! + end + + # + # Lists all the available namespaces within the ResourceGroup. + # + # @param resource_group_name [String] Name of the Resource group within the + # 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_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.Relay/namespaces' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::RelayNamespaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Azure Relay namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayNamespace] Parameters supplied to create a namespace + # resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelayNamespace] operation results. + # + def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayNamespace] Parameters supplied to create a namespace + # resource. + # @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, namespace_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Relay::Models::RelayNamespace.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes an existing namespace. This operation also removes all associated + # resources under the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, namespace_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, namespace_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, namespace_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Returns the description for the specified namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelayNamespace] operation results. + # + def get(resource_group_name, namespace_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the description for the specified namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Returns the description for the specified namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::RelayNamespace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 namespace. Once created, this namespace's resource + # manifest is immutable. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayUpdateParameters] Parameters for updating a namespace + # resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelayNamespace] operation results. + # + def update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a namespace. Once created, this namespace's resource + # manifest is immutable. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayUpdateParameters] Parameters for updating a namespace + # resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + update_async(resource_group_name, namespace_name, parameters, custom_headers).value! + end + + # + # Creates or updates a namespace. Once created, this namespace's resource + # manifest is immutable. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayUpdateParameters] Parameters for updating a namespace + # resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::RelayUpdateParameters.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.Relay/namespaces/{namespaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::RelayNamespace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::RelayNamespace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Authorization rules for a namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers) + first_page.get_all_items + end + + # + # Authorization rules for a namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Authorization rules for a namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AuthorizationRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 authorization rule for a namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRule] operation results. + # + def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an authorization rule for a namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule 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_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Creates or updates an authorization rule for a namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule 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_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::AuthorizationRule.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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AuthorizationRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a namespace authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! + nil + end + + # + # Deletes a namespace authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! + end + + # + # Deletes a namespace authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 + + # + # Authorization rule for a namespace by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRule] operation results. + # + def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Authorization rule for a namespace by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! + end + + # + # Authorization rule for a namespace by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::Relay::Models::AuthorizationRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Primary and secondary connection strings to the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessKeys] operation results. + # + def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Primary and secondary connection strings to the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value! + end + + # + # Primary and secondary connection strings to the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates the primary or secondary connection strings to the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessKeys] operation results. + # + def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the primary or secondary connection strings to the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Regenerates the primary or secondary connection strings to the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::RegenerateAccessKeyParameters.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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::Relay::Models::AccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Azure Relay namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayNamespace] Parameters supplied to create a namespace + # resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelayNamespace] operation results. + # + def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create Azure Relay namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayNamespace] Parameters supplied to create a namespace + # resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value! + end + + # + # Create Azure Relay namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param parameters [RelayNamespace] Parameters supplied to create a namespace + # resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::RelayNamespace.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.Relay/namespaces/{namespaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + 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::ARM::Relay::Models::RelayNamespace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::RelayNamespace.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 namespace. This operation also removes all associated + # resources under the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, namespace_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, namespace_name, custom_headers).value! + nil + end + + # + # Deletes an existing namespace. This operation also removes all associated + # resources under the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + begin_delete_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Deletes an existing namespace. This operation also removes all associated + # resources under the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 the available namespaces within the subscription regardless of the + # resourceGroups. + # + # @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 [RelayNamespaceListResult] 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 the available namespaces within the subscription regardless of the + # resourceGroups. + # + # @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 the available namespaces within the subscription regardless of the + # resourceGroups. + # + # @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::ARM::Relay::Models::RelayNamespaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the available namespaces within the ResourceGroup. + # + # @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 [RelayNamespaceListResult] operation results. + # + def list_by_resource_group_next(next_page_link, custom_headers = nil) + response = list_by_resource_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all the available namespaces within the ResourceGroup. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_resource_group_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all the available namespaces within the ResourceGroup. + # + # @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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::RelayNamespaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Authorization rules for a namespace. + # + # @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 [AuthorizationRuleListResult] operation results. + # + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Authorization rules for a namespace. + # + # @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_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! + end + + # + # Authorization rules for a namespace. + # + # @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_authorization_rules_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::ARM::Relay::Models::AuthorizationRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the available namespaces within the subscription regardless of the + # resourceGroups. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelayNamespaceListResult] 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 + + # + # Lists all the available namespaces within the ResourceGroup. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RelayNamespaceListResult] 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 + + # + # Authorization rules for a namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRuleListResult] which provide lazy access to pages of + # the response. + # + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_authorization_rules_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/operations.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/operations.rb new file mode 100644 index 0000000000..811dd008ed --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/operations.rb @@ -0,0 +1,214 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + # + # Use these API to manage Azure Relay resources through Azure Resource + # Manager. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [RelayManagementClient] reference to the RelayManagementClient + attr_reader :client + + # + # Lists all available Relay REST API operations. + # + # @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 available Relay REST API operations. + # + # @param custom_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 available Relay REST API operations. + # + # @param [Hash{String => String}] 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.Relay/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::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 available Relay REST 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 [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 available Relay REST 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_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all available Relay REST 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_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::ARM::Relay::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 available Relay REST API operations. + # + # @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_relay/lib/generated/azure_mgmt_relay/relay_management_client.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/relay_management_client.rb new file mode 100644 index 0000000000..8999195aca --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/relay_management_client.rb @@ -0,0 +1,143 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + # + # A service client - single point of access to the REST API. + # + class RelayManagementClient < 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] Subscription credentials which uniquely identify the + # Microsoft Azure subscription. The subscription ID forms part of the URI + # for every service call. + attr_accessor :subscription_id + + # @return [String] Client API version. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Operations] operations + attr_reader :operations + + # @return [Namespaces] namespaces + attr_reader :namespaces + + # @return [HybridConnections] hybrid_connections + attr_reader :hybrid_connections + + # @return [WCFRelays] wcfrelays + attr_reader :wcfrelays + + # + # Creates initializes a new instance of the RelayManagementClient 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 + + @operations = Operations.new(self) + @namespaces = Namespaces.new(self) + @hybrid_connections = HybridConnections.new(self) + @wcfrelays = WCFRelays.new(self) + @api_version = '2017-04-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_relay' + if defined? Azure::ARM::Relay::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::Relay::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/version.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/version.rb new file mode 100644 index 0000000000..52902a0bcc --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/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::ARM::Relay + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/wcfrelays.rb b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/wcfrelays.rb new file mode 100644 index 0000000000..44e2d74580 --- /dev/null +++ b/management/azure_mgmt_relay/lib/generated/azure_mgmt_relay/wcfrelays.rb @@ -0,0 +1,1263 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Relay + # + # Use these API to manage Azure Relay resources through Azure Resource + # Manager. + # + class WCFRelays + include MsRestAzure + + # + # Creates and initializes a new instance of the WCFRelays class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [RelayManagementClient] reference to the RelayManagementClient + attr_reader :client + + # + # Lists the WCF relays within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_namespace(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers) + first_page.get_all_items + end + + # + # Lists the WCF relays within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Lists the WCF relays within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_namespace_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::WcfRelaysListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 WCF relay. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param parameters [WcfRelay] Parameters supplied to create a WCF relay. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WcfRelay] operation results. + # + def create_or_update(resource_group_name, namespace_name, relay_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a WCF relay. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param parameters [WcfRelay] Parameters supplied to create a WCF relay. + # @param custom_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, namespace_name, relay_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, relay_name, parameters, custom_headers).value! + end + + # + # Creates or updates a WCF relay. This operation is idempotent. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param parameters [WcfRelay] Parameters supplied to create a WCF relay. + # @param [Hash{String => String}] 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, namespace_name, relay_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::WcfRelay.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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_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::ARM::Relay::Models::WcfRelay.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, namespace_name, relay_name, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, relay_name, custom_headers).value! + nil + end + + # + # Deletes a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil) + delete_async(resource_group_name, namespace_name, relay_name, custom_headers).value! + end + + # + # Deletes a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, namespace_name, relay_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_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 + + # + # Returns the description for the specified WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WcfRelay] operation results. + # + def get(resource_group_name, namespace_name, relay_name, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, relay_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the description for the specified WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil) + get_async(resource_group_name, namespace_name, relay_name, custom_headers).value! + end + + # + # Returns the description for the specified WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, namespace_name, relay_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_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 || 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 == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::WcfRelay.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Authorization rules for a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @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_authorization_rules(resource_group_name, namespace_name, relay_name, custom_headers = nil) + first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers) + first_page.get_all_items + end + + # + # Authorization rules for a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_authorization_rules_with_http_info(resource_group_name, namespace_name, relay_name, custom_headers = nil) + list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers).value! + end + + # + # Authorization rules for a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AuthorizationRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 authorization rule for a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule parameters. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRule] operation results. + # + def create_or_update_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil) + response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an authorization rule for a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule 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_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil) + create_or_update_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Creates or updates an authorization rule for a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [AuthorizationRule] The authorization rule 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_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::AuthorizationRule.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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AuthorizationRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a WCF relay authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + response = delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value! + nil + end + + # + # Deletes a WCF relay authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value! + end + + # + # Deletes a WCF relay authorization rule. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 authorizationRule for a WCF relay by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRule] operation results. + # + def get_authorization_rule(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + response = get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get authorizationRule for a WCF relay by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_authorization_rule_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value! + end + + # + # Get authorizationRule for a WCF relay by name. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_authorization_rule_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::Relay::Models::AuthorizationRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Primary and secondary connection strings to the WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessKeys] operation results. + # + def list_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + response = list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Primary and secondary connection strings to the WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers).value! + end + + # + # Primary and secondary connection strings to the WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/listKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates the primary or secondary connection strings to the WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessKeys] operation results. + # + def regenerate_keys(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil) + response = regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates the primary or secondary connection strings to the WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_keys_with_http_info(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil) + regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers).value! + end + + # + # Regenerates the primary or secondary connection strings to the WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param authorization_rule_name [String] The authorization rule name. + # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to + # regenerate authorization rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_keys_async(resource_group_name, namespace_name, relay_name, authorization_rule_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Relay::Models::RegenerateAccessKeyParameters.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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'relayName' => relay_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::ARM::Relay::Models::AccessKeys.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 WCF relays within the namespace. + # + # @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 [WcfRelaysListResult] operation results. + # + def list_by_namespace_next(next_page_link, custom_headers = nil) + response = list_by_namespace_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the WCF relays within the namespace. + # + # @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_namespace_next_with_http_info(next_page_link, custom_headers = nil) + list_by_namespace_next_async(next_page_link, custom_headers).value! + end + + # + # Lists the WCF relays within the namespace. + # + # @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_namespace_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::ARM::Relay::Models::WcfRelaysListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Authorization rules for a WCF relay. + # + # @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 [AuthorizationRuleListResult] operation results. + # + def list_authorization_rules_next(next_page_link, custom_headers = nil) + response = list_authorization_rules_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Authorization rules for a WCF relay. + # + # @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_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil) + list_authorization_rules_next_async(next_page_link, custom_headers).value! + end + + # + # Authorization rules for a WCF relay. + # + # @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_authorization_rules_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Relay::Models::AuthorizationRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 WCF relays within the namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WcfRelaysListResult] which provide lazy access to pages of the + # response. + # + def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_namespace_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Authorization rules for a WCF relay. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param relay_name [String] The relay name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AuthorizationRuleListResult] which provide lazy access to pages of + # the response. + # + def list_authorization_rules_as_lazy(resource_group_name, namespace_name, relay_name, custom_headers = nil) + response = list_authorization_rules_async(resource_group_name, namespace_name, relay_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_authorization_rules_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_relay/spec/spec_helper.rb b/management/azure_mgmt_relay/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_relay/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_resources/azure_mgmt_resources.gemspec b/management/azure_mgmt_resources/azure_mgmt_resources.gemspec index 6e6101e22c..787421a526 100644 --- a/management/azure_mgmt_resources/azure_mgmt_resources.gemspec +++ b/management/azure_mgmt_resources/azure_mgmt_resources.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources.rb old mode 100755 new mode 100644 index c30d331cba..4f71ff8628 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -68,7 +68,9 @@ module Models autoload :Dependency, 'generated/azure_mgmt_resources/models/dependency.rb' autoload :ResourceProviderOperationDisplayProperties, 'generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb' autoload :TemplateLink, 'generated/azure_mgmt_resources/models/template_link.rb' + autoload :Resource, 'generated/azure_mgmt_resources/models/resource.rb' autoload :DeploymentListResult, 'generated/azure_mgmt_resources/models/deployment_list_result.rb' + autoload :SubResource, 'generated/azure_mgmt_resources/models/sub_resource.rb' autoload :AliasType, 'generated/azure_mgmt_resources/models/alias_type.rb' autoload :ResourceGroupExportResult, 'generated/azure_mgmt_resources/models/resource_group_export_result.rb' autoload :GenericResource, 'generated/azure_mgmt_resources/models/generic_resource.rb' diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployment_operations.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployment_operations.rb old mode 100755 new mode 100644 index d4376a2ad9..e05db8f92f --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployment_operations.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployment_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployments.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployments.rb old mode 100755 new mode 100644 index 844c70ec71..0c2ce1c2cd --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployments.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/deployments.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_path_type.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_path_type.rb old mode 100755 new mode 100644 index 57bb4368c3..b445a6e9d8 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_path_type.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_path_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AliasPathType include MsRestAzure - include MsRest::JSONable # @return [String] The path of an alias. attr_accessor :path diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_type.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_type.rb old mode 100755 new mode 100644 index 022f626e75..5f366b7f8b --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_type.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/alias_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AliasType include MsRestAzure - include MsRest::JSONable # @return [String] The alias name. attr_accessor :name diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/basic_dependency.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/basic_dependency.rb old mode 100755 new mode 100644 index 5b15090cbb..56d3562cf4 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/basic_dependency.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/basic_dependency.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BasicDependency include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the dependency. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/debug_setting.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/debug_setting.rb old mode 100755 new mode 100644 index 1ca5506397..4a7eeb1420 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/debug_setting.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/debug_setting.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DebugSetting include MsRestAzure - include MsRest::JSONable # @return [String] Specifies the type of information to log for # debugging. The permitted values are none, requestContent, # responseContent, or both requestContent and responseContent separated diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/dependency.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/dependency.rb old mode 100755 new mode 100644 index 9bc904125a..b9025ce3ec --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/dependency.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/dependency.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Dependency include MsRestAzure - include MsRest::JSONable # @return [Array] The list of dependencies. attr_accessor :depends_on diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment.rb old mode 100755 new mode 100644 index 1e42f99d96..49a64b1db6 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Deployment include MsRestAzure - include MsRest::JSONable # @return [DeploymentProperties] The deployment properties. attr_accessor :properties diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_export_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_export_result.rb old mode 100755 new mode 100644 index ea3947b86b..0bc638b328 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_export_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_export_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentExportResult include MsRestAzure - include MsRest::JSONable # @return The template content. attr_accessor :template diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended.rb old mode 100755 new mode 100644 index d189e10bd9..1c1c33762f --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentExtended include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the deployment. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb old mode 100755 new mode 100644 index b16461c885..1ddf89c6b3 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentExtendedFilter include MsRestAzure - include MsRest::JSONable # @return [String] The provisioning state. attr_accessor :provisioning_state diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_list_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_list_result.rb old mode 100755 new mode 100644 index 40759694c1..8fde122c87 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_list_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_mode.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_mode.rb old mode 100755 new mode 100644 index 485558d8db..1c9b4c1c6c --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_mode.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation.rb old mode 100755 new mode 100644 index 8bfe11d51f..15273497e8 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentOperation include MsRestAzure - include MsRest::JSONable # @return [String] Full deployment operation ID. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb old mode 100755 new mode 100644 index b1acdfe81f..7680585870 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentOperationProperties include MsRestAzure - include MsRest::JSONable # @return [String] The state of the provisioning. attr_accessor :provisioning_state diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb old mode 100755 new mode 100644 index 0dc9051931..1e36295093 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties.rb old mode 100755 new mode 100644 index 59ef895364..bf5f93c62b --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentProperties include MsRestAzure - include MsRest::JSONable # @return The template content. You use this element when you want to # pass the template syntax directly in the request rather than link to an # existing template. It can be a JObject or well-formed JSON string. Use diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb old mode 100755 new mode 100644 index 3856e43c89..e778349041 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentPropertiesExtended include MsRestAzure - include MsRest::JSONable # @return [String] The state of the provisioning. attr_accessor :provisioning_state diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb old mode 100755 new mode 100644 index d03a9e5d12..84bd1da8f7 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeploymentValidateResult include MsRestAzure - include MsRest::JSONable # @return [ResourceManagementErrorWithDetails] Validation error. attr_accessor :error diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/export_template_request.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/export_template_request.rb old mode 100755 new mode 100644 index 80527af2b4..c83952be73 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/export_template_request.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/export_template_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExportTemplateRequest include MsRestAzure - include MsRest::JSONable # @return [Array] The IDs of the resources. The only supported # string currently is '*' (all resources). Future updates will support # exporting specific resources. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource.rb old mode 100755 new mode 100644 index e86a516534..beac50734c --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Resource information. # - class GenericResource < MsRestAzure::Resource + class GenericResource < Resource include MsRestAzure - include MsRest::JSONable # @return [Plan] The plan of the resource. attr_accessor :plan diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb old mode 100755 new mode 100644 index 57efc2116b..0c7629b01f --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GenericResourceFilter include MsRestAzure - include MsRest::JSONable # @return [String] The resource type. attr_accessor :resource_type diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/http_message.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/http_message.rb old mode 100755 new mode 100644 index 68e4e8158e..4c53ddbe60 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/http_message.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/http_message.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HttpMessage include MsRestAzure - include MsRest::JSONable # @return HTTP message content. attr_accessor :content diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/identity.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/identity.rb old mode 100755 new mode 100644 index 1e293e3b5a..dbf359f646 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/identity.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Identity include MsRestAzure - include MsRest::JSONable # @return [String] The principal ID of resource identity. attr_accessor :principal_id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/parameters_link.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/parameters_link.rb old mode 100755 new mode 100644 index c9c19e506c..ed3225d4a2 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/parameters_link.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/parameters_link.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ParametersLink include MsRestAzure - include MsRest::JSONable # @return [String] The URI of the parameters file. attr_accessor :uri diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/plan.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/plan.rb old mode 100755 new mode 100644 index d75cd0506f..4e054250b1 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/plan.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/plan.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Plan include MsRestAzure - include MsRest::JSONable # @return [String] The plan ID. attr_accessor :name diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider.rb old mode 100755 new mode 100644 index 2a4caf310f..1d92201d71 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Provider include MsRestAzure - include MsRest::JSONable # @return [String] The provider ID. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_list_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_list_result.rb old mode 100755 new mode 100644 index 7a7630fa00..eda6751346 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_list_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_resource_type.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_resource_type.rb old mode 100755 new mode 100644 index f99422e159..bb5ad5dc41 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_resource_type.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/provider_resource_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ProviderResourceType include MsRestAzure - include MsRest::JSONable # @return [String] The resource type. attr_accessor :resource_type diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource.rb new file mode 100644 index 0000000000..d0cb1071cd --- /dev/null +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource.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::ARM::Resources + module Models + # + # Resource. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group.rb old mode 100755 new mode 100644 index a8185a573d..38cdd1be8c --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceGroup include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the resource group. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb old mode 100755 new mode 100644 index 899f83eda6..47d1f681f9 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceGroupExportResult include MsRestAzure - include MsRest::JSONable # @return The template content. attr_accessor :template diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_filter.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_filter.rb old mode 100755 new mode 100644 index a47f0aedb3..549c59a405 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_filter.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceGroupFilter include MsRestAzure - include MsRest::JSONable # @return [String] The tag name. attr_accessor :tag_name diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb old mode 100755 new mode 100644 index 3cd0018993..7e56bd07ab --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_patchable.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_patchable.rb index f415c7f0a9..cd0a1218bd 100644 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_patchable.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_patchable.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceGroupPatchable include MsRestAzure - include MsRest::JSONable # @return [String] The name of the resource group. attr_accessor :name diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_properties.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_properties.rb old mode 100755 new mode 100644 index a8ecf73a19..ad981b4636 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_properties.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_group_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceGroupProperties include MsRestAzure - include MsRest::JSONable # @return [String] The provisioning state. attr_accessor :provisioning_state diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_identity_type.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_identity_type.rb old mode 100755 new mode 100644 index 4c2169110e..c0f72beeae --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_identity_type.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_identity_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_list_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_list_result.rb old mode 100755 new mode 100644 index 8078eea70c..4ffd95adea --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_list_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb old mode 100755 new mode 100644 index 2ead8bc0c6..f8ef170630 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceManagementErrorWithDetails include MsRestAzure - include MsRest::JSONable # @return [String] The error code returned when exporting the template. attr_accessor :code diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb old mode 100755 new mode 100644 index 0b26ebcb39..20115fab3d --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceProviderOperationDisplayProperties include MsRestAzure - include MsRest::JSONable # @return [String] Operation description. attr_accessor :publisher diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resources_move_info.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resources_move_info.rb old mode 100755 new mode 100644 index 6c9b70930e..710789ba35 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resources_move_info.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/resources_move_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourcesMoveInfo include MsRestAzure - include MsRest::JSONable # @return [Array] The IDs of the resources. attr_accessor :resources diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/sku.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/sku.rb old mode 100755 new mode 100644 index 745777bd4a..8b07d4ab4b --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/sku.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [String] The SKU name. attr_accessor :name diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/sub_resource.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/sub_resource.rb new file mode 100644 index 0000000000..45287921c3 --- /dev/null +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/sub_resource.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::ARM::Resources + module Models + # + # Sub-resource. + # + class SubResource + + include MsRestAzure + + # @return [String] Resource ID + attr_accessor :id + + + # + # Mapper for SubResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SubResource', + type: { + name: 'Composite', + class_name: 'SubResource', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_count.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_count.rb old mode 100755 new mode 100644 index 5eeb5e5f4b..964718e884 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_count.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_count.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TagCount include MsRestAzure - include MsRest::JSONable # @return [String] Type of count. attr_accessor :type diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_details.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_details.rb old mode 100755 new mode 100644 index bde7e1de90..f89ee89b74 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_details.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TagDetails include MsRestAzure - include MsRest::JSONable # @return [String] The tag ID. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_value.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_value.rb old mode 100755 new mode 100644 index 486354a2cb..8971766135 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_value.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tag_value.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TagValue include MsRestAzure - include MsRest::JSONable # @return [String] The tag ID. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tags_list_result.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tags_list_result.rb old mode 100755 new mode 100644 index 93d4eac367..1b64e08950 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tags_list_result.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/tags_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/target_resource.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/target_resource.rb old mode 100755 new mode 100644 index 6bd69d0217..e501d577bb --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/target_resource.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/target_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TargetResource include MsRestAzure - include MsRest::JSONable # @return [String] The ID of the resource. attr_accessor :id diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/template_link.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/template_link.rb old mode 100755 new mode 100644 index 5e2e57c96f..6bd7df293c --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/template_link.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/models/template_link.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TemplateLink include MsRestAzure - include MsRest::JSONable # @return [String] The URI of the template to deploy. attr_accessor :uri diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/module_definition.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/module_definition.rb old mode 100755 new mode 100644 index e04ccb78b4..599073263a --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/module_definition.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/providers.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/providers.rb old mode 100755 new mode 100644 index 5f24461505..8c8f8cd257 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/providers.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/providers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_groups.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_groups.rb old mode 100755 new mode 100644 index d6ba048d91..d305eb6acd --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_groups.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_groups.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_management_client.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_management_client.rb old mode 100755 new mode 100644 index 31a4f0b3b5..a554e641a0 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_management_client.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resource_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resources.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resources.rb old mode 100755 new mode 100644 index b1d614f1ea..60d2952d24 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resources.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/resources.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -133,7 +133,7 @@ def list_by_resource_group_async(resource_group_name, filter = nil, expand = nil # move completes. # # @param source_resource_group_name [String] The name of the resource group - # containing the rsources to move. + # containing the resources to move. # @param parameters [ResourcesMoveInfo] Parameters for moving resources. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. @@ -145,7 +145,7 @@ def move_resources(source_resource_group_name, parameters, custom_headers = nil) # # @param source_resource_group_name [String] The name of the resource group - # containing the rsources to move. + # containing the resources to move. # @param parameters [ResourcesMoveInfo] Parameters for moving resources. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. @@ -169,6 +169,55 @@ def move_resources_async(source_resource_group_name, parameters, custom_headers promise end + # + # Validates whether resources can be moved from one resource group to another + # resource group. + # + # This operation checks whether the specified resources can be moved to the + # target. The resources to move must be in the same source resource group. The + # target resource group may be in a different subscription. If validation + # succeeds, it returns HTTP response code 204 (no content). If validation + # fails, it returns HTTP response code 409 (Conflict) with an error message. + # Retrieve the URL in the Location header value to check the result of the + # long-running operation. + # + # @param source_resource_group_name [String] The name of the resource group + # containing the resources to validate for move. + # @param parameters [ResourcesMoveInfo] Parameters for moving resources. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def validate_move_resources(source_resource_group_name, parameters, custom_headers = nil) + response = validate_move_resources_async(source_resource_group_name, parameters, custom_headers).value! + nil + end + + # + # @param source_resource_group_name [String] The name of the resource group + # containing the resources to validate for move. + # @param parameters [ResourcesMoveInfo] Parameters for moving resources. + # @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_move_resources_async(source_resource_group_name, parameters, custom_headers = nil) + # Send request + promise = begin_validate_move_resources_async(source_resource_group_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + # # Get all the resources in a subscription. # @@ -873,7 +922,7 @@ def get_by_id_async(resource_id, api_version, custom_headers = nil) # move completes. # # @param source_resource_group_name [String] The name of the resource group - # containing the rsources to move. + # containing the resources to move. # @param parameters [ResourcesMoveInfo] Parameters for moving resources. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. @@ -894,7 +943,7 @@ def begin_move_resources(source_resource_group_name, parameters, custom_headers # move completes. # # @param source_resource_group_name [String] The name of the resource group - # containing the rsources to move. + # containing the resources to move. # @param parameters [ResourcesMoveInfo] Parameters for moving resources. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. @@ -915,7 +964,7 @@ def begin_move_resources_with_http_info(source_resource_group_name, parameters, # move completes. # # @param source_resource_group_name [String] The name of the resource group - # containing the rsources to move. + # containing the resources to move. # @param parameters [ResourcesMoveInfo] Parameters for moving resources. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. @@ -973,6 +1022,125 @@ def begin_move_resources_async(source_resource_group_name, parameters, custom_he promise.execute end + # + # Validates whether resources can be moved from one resource group to another + # resource group. + # + # This operation checks whether the specified resources can be moved to the + # target. The resources to move must be in the same source resource group. The + # target resource group may be in a different subscription. If validation + # succeeds, it returns HTTP response code 204 (no content). If validation + # fails, it returns HTTP response code 409 (Conflict) with an error message. + # Retrieve the URL in the Location header value to check the result of the + # long-running operation. + # + # @param source_resource_group_name [String] The name of the resource group + # containing the resources to validate for move. + # @param parameters [ResourcesMoveInfo] Parameters for moving resources. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_validate_move_resources(source_resource_group_name, parameters, custom_headers = nil) + response = begin_validate_move_resources_async(source_resource_group_name, parameters, custom_headers).value! + nil + end + + # + # Validates whether resources can be moved from one resource group to another + # resource group. + # + # This operation checks whether the specified resources can be moved to the + # target. The resources to move must be in the same source resource group. The + # target resource group may be in a different subscription. If validation + # succeeds, it returns HTTP response code 204 (no content). If validation + # fails, it returns HTTP response code 409 (Conflict) with an error message. + # Retrieve the URL in the Location header value to check the result of the + # long-running operation. + # + # @param source_resource_group_name [String] The name of the resource group + # containing the resources to validate for move. + # @param parameters [ResourcesMoveInfo] Parameters for moving resources. + # @param custom_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_move_resources_with_http_info(source_resource_group_name, parameters, custom_headers = nil) + begin_validate_move_resources_async(source_resource_group_name, parameters, custom_headers).value! + end + + # + # Validates whether resources can be moved from one resource group to another + # resource group. + # + # This operation checks whether the specified resources can be moved to the + # target. The resources to move must be in the same source resource group. The + # target resource group may be in a different subscription. If validation + # succeeds, it returns HTTP response code 204 (no content). If validation + # fails, it returns HTTP response code 409 (Conflict) with an error message. + # Retrieve the URL in the Location header value to check the result of the + # long-running operation. + # + # @param source_resource_group_name [String] The name of the resource group + # containing the resources to validate for move. + # @param parameters [ResourcesMoveInfo] Parameters for moving resources. + # @param [Hash{String => String}] 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_move_resources_async(source_resource_group_name, parameters, custom_headers = nil) + fail ArgumentError, 'source_resource_group_name is nil' if source_resource_group_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Resources::Models::ResourcesMoveInfo.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/{sourceResourceGroupName}/validateMoveResources' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'sourceResourceGroupName' => source_resource_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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 == 204 || status_code == 409 + 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 + # # Deletes a resource. # diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/tags.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/tags.rb old mode 100755 new mode 100644 index 811d86ec16..219c710bcd --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/tags.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/tags.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/version.rb b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/version.rb old mode 100755 new mode 100644 index e7c07c7a8a..037c543226 --- a/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/version.rb +++ b/management/azure_mgmt_resources/lib/generated/azure_mgmt_resources/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Resources - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_resources_management/.rspec b/management/azure_mgmt_resources_management/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_resources_management/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_resources_management/LICENSE.txt b/management/azure_mgmt_resources_management/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_resources_management/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_resources_management/Rakefile b/management/azure_mgmt_resources_management/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_resources_management/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_resources_management/azure_mgmt_resources_management.gemspec b/management/azure_mgmt_resources_management/azure_mgmt_resources_management.gemspec new file mode 100644 index 0000000000..db732eb391 --- /dev/null +++ b/management/azure_mgmt_resources_management/azure_mgmt_resources_management.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_resources_management/module_definition' +require 'generated/azure_mgmt_resources_management/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_resources_management' + spec.version = Azure::ARM::ResourcesManagement::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Resources Management Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Resources Management.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_resources_management/lib/azure_mgmt_resources_management.rb b/management/azure_mgmt_resources_management/lib/azure_mgmt_resources_management.rb new file mode 100644 index 0000000000..4f321cb712 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/azure_mgmt_resources_management.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_resources_management' + + diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management.rb new file mode 100644 index 0000000000..cafa41e3ab --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management.rb @@ -0,0 +1,43 @@ +# encoding: 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 'generated/azure_mgmt_resources_management/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::ResourcesManagement + autoload :ManagementGroups, 'generated/azure_mgmt_resources_management/management_groups.rb' + autoload :Operations, 'generated/azure_mgmt_resources_management/operations.rb' + autoload :ManagementGroupsAPI, 'generated/azure_mgmt_resources_management/management_groups_api.rb' + + module Models + autoload :ParentGroupInfo, 'generated/azure_mgmt_resources_management/models/parent_group_info.rb' + autoload :ErrorDetails, 'generated/azure_mgmt_resources_management/models/error_details.rb' + autoload :ManagementGroupDetailsProperties, 'generated/azure_mgmt_resources_management/models/management_group_details_properties.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_resources_management/models/operation_display.rb' + autoload :ManagementGroup, 'generated/azure_mgmt_resources_management/models/management_group.rb' + autoload :OperationListResult, 'generated/azure_mgmt_resources_management/models/operation_list_result.rb' + autoload :ManagementGroupChildInfo, 'generated/azure_mgmt_resources_management/models/management_group_child_info.rb' + autoload :ManagementGroupListResult, 'generated/azure_mgmt_resources_management/models/management_group_list_result.rb' + autoload :ManagementGroupWithChildren, 'generated/azure_mgmt_resources_management/models/management_group_with_children.rb' + autoload :Operation, 'generated/azure_mgmt_resources_management/models/operation.rb' + autoload :ManagementGroupRecursiveChildInfo, 'generated/azure_mgmt_resources_management/models/management_group_recursive_child_info.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_resources_management/models/error_response.rb' + autoload :ManagementGroupWithHierarchy, 'generated/azure_mgmt_resources_management/models/management_group_with_hierarchy.rb' + autoload :ManagementGroupInfo, 'generated/azure_mgmt_resources_management/models/management_group_info.rb' + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/management_groups.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/management_groups.rb new file mode 100644 index 0000000000..afff6f12b8 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/management_groups.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::ARM::ResourcesManagement + # + # The Azure Management Groups API enables consolidation of multiple + # subscriptions/resources into an organizational hierarchy and centrally + # manage access control, policies, alerting and reporting for those + # resources. + # + # + class ManagementGroups + include MsRestAzure + + # + # Creates and initializes a new instance of the ManagementGroups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ManagementGroupsAPI] reference to the ManagementGroupsAPI + attr_reader :client + + # + # List management groups for the authenticated user. + # + # + # @param skiptoken [String] Page continuation token is only used if a previous + # operation returned a partial result. + # If a previous response contains a nextLink element, the value of the nextLink + # element will include a token parameter that specifies a starting point to use + # for subsequent calls. + # + # @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(skiptoken = nil, custom_headers = nil) + first_page = list_as_lazy(skiptoken, custom_headers) + first_page.get_all_items + end + + # + # List management groups for the authenticated user. + # + # + # @param skiptoken [String] Page continuation token is only used if a previous + # operation returned a partial result. + # If a previous response contains a nextLink element, the value of the nextLink + # element will include a token parameter that specifies a starting point to use + # for subsequent calls. + # + # @param custom_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(skiptoken = nil, custom_headers = nil) + list_async(skiptoken, custom_headers).value! + end + + # + # List management groups for the authenticated user. + # + # + # @param skiptoken [String] Page continuation token is only used if a previous + # operation returned a partial result. + # If a previous response contains a nextLink element, the value of the nextLink + # element will include a token parameter that specifies a starting point to use + # for subsequent calls. + # + # @param [Hash{String => String}] 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(skiptoken = nil, 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.Management/managementGroups' + + 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,'$skiptoken' => skiptoken}, + 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::ARM::ResourcesManagement::Models::ManagementGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 details of the management group. + # + # + # @param expand [Enum] The $expand=children query string parameter allows + # clients to request inclusion of children in the response payload. Possible + # values include: 'children' + # @param recurse [Boolean] The $recurse=true query string parameter allows + # clients to request inclusion of entire hierarchy in the response payload. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagementGroupWithHierarchy] operation results. + # + def get(expand = nil, recurse = nil, custom_headers = nil) + response = get_async(expand, recurse, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the details of the management group. + # + # + # @param expand [Enum] The $expand=children query string parameter allows + # clients to request inclusion of children in the response payload. Possible + # values include: 'children' + # @param recurse [Boolean] The $recurse=true query string parameter allows + # clients to request inclusion of entire hierarchy in the response payload. + # @param custom_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(expand = nil, recurse = nil, custom_headers = nil) + get_async(expand, recurse, custom_headers).value! + end + + # + # Get the details of the management group. + # + # + # @param expand [Enum] The $expand=children query string parameter allows + # clients to request inclusion of children in the response payload. Possible + # values include: 'children' + # @param recurse [Boolean] The $recurse=true query string parameter allows + # clients to request inclusion of entire hierarchy in the response payload. + # @param [Hash{String => String}] 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(expand = nil, recurse = nil, custom_headers = nil) + fail ArgumentError, '@client.group_id is nil' if @client.group_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'providers/Microsoft.Management/managementGroups/{groupId}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'groupId' => @client.group_id}, + query_params: {'api-version' => @client.api_version,'$expand' => expand,'$recurse' => recurse}, + 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::ARM::ResourcesManagement::Models::ManagementGroupWithHierarchy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 management groups for the authenticated 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 [ManagementGroupListResult] 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 + + # + # List management groups for the authenticated 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 + + # + # List management groups for the authenticated 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::ARM::ResourcesManagement::Models::ManagementGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 management groups for the authenticated user. + # + # + # @param skiptoken [String] Page continuation token is only used if a previous + # operation returned a partial result. + # If a previous response contains a nextLink element, the value of the nextLink + # element will include a token parameter that specifies a starting point to use + # for subsequent calls. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagementGroupListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(skiptoken = nil, custom_headers = nil) + response = list_async(skiptoken, 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_resources_management/lib/generated/azure_mgmt_resources_management/management_groups_api.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/management_groups_api.rb new file mode 100644 index 0000000000..98a725b11c --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/management_groups_api.rb @@ -0,0 +1,134 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ResourcesManagement + # + # A service client - single point of access to the REST API. + # + class ManagementGroupsAPI < 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 Management Group ID. + attr_accessor :group_id + + # @return [String] Version of the API to be used with the client request. + # The current version is 2017-08-31-preview. + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [ManagementGroups] management_groups + attr_reader :management_groups + + # @return [Operations] operations + attr_reader :operations + + # + # Creates initializes a new instance of the ManagementGroupsAPI 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 + + @management_groups = ManagementGroups.new(self) + @operations = Operations.new(self) + @api_version = '2017-08-31-preview' + @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_resources_management' + if defined? Azure::ARM::ResourcesManagement::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::ResourcesManagement::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/error_details.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/error_details.rb new file mode 100644 index 0000000000..212373fc7f --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/error_details.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::ARM::ResourcesManagement + module Models + # + # The details of the error. + # + class ErrorDetails + + include MsRestAzure + + # @return [String] One of a server-defined set of error codes. + attr_accessor :code + + # @return [String] A human-readable representation of the error. + attr_accessor :message + + # @return [String] (Optional) The target of the error. + attr_accessor :target + + + # + # Mapper for ErrorDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorDetails', + type: { + name: 'Composite', + class_name: 'ErrorDetails', + 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_resources_management/lib/generated/azure_mgmt_resources_management/models/error_response.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/error_response.rb new file mode 100644 index 0000000000..7e5dcd34e4 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/error_response.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::ARM::ResourcesManagement + module Models + # + # The error object. + # + class ErrorResponse + + include MsRestAzure + + # @return [ErrorDetails] Error. + attr_accessor :error + + + # + # 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: { + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'ErrorDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group.rb new file mode 100644 index 0000000000..f94fd70d63 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group.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::ARM::ResourcesManagement + module Models + # + # The management group details. + # + class ManagementGroup + + include MsRestAzure + + # @return [String] The ID of the management group. E.g. + # /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000 + attr_accessor :id + + # @return [String] The type of the resource. E.g. + # /providers/Microsoft.Management/managementGroups + attr_accessor :type + + # @return The name of the management group. E.g. + # 20000000-0000-0000-0000-000000000000 + attr_accessor :name + + # @return The AAD Tenant ID associated with the management group. E.g. + # 10000000-0000-0000-0000-000000000000 + attr_accessor :tenant_id + + # @return [String] The friendly name of the management group. + attr_accessor :display_name + + # @return [ManagementGroupDetailsProperties] Details. + attr_accessor :details + + + # + # Mapper for ManagementGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroup', + type: { + name: 'Composite', + class_name: 'ManagementGroup', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'properties.details', + type: { + name: 'Composite', + class_name: 'ManagementGroupDetailsProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_child_info.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_child_info.rb new file mode 100644 index 0000000000..5b67f223d8 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_child_info.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::ARM::ResourcesManagement + module Models + # + # The unique identifier (ID) of a management group. + # + class ManagementGroupChildInfo + + include MsRestAzure + + # @return [Enum] Managment Group Child Info. Possible values include: + # 'Enrollment', 'Department', 'Account', 'Subscription' + attr_accessor :child_type + + # @return [String] The ID of the child resource (management group or + # subscription). E.g. + # /providers/Microsoft.Management/managementGroups/40000000-0000-0000-0000-000000000000 + attr_accessor :child_id + + # @return [String] The friendly name of the child resource. + attr_accessor :display_name + + # @return (Optional) The AAD Tenant ID associated with the child + # resource. + attr_accessor :tenant_id + + + # + # Mapper for ManagementGroupChildInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroupChildInfo', + type: { + name: 'Composite', + class_name: 'ManagementGroupChildInfo', + model_properties: { + child_type: { + required: false, + serialized_name: 'childType', + type: { + name: 'String' + } + }, + child_id: { + required: false, + serialized_name: 'childId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + serialized_name: 'tenantId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_details_properties.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_details_properties.rb new file mode 100644 index 0000000000..f8a0e1962d --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_details_properties.rb @@ -0,0 +1,87 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ResourcesManagement + module Models + # + # The details properties of a management group. + # + class ManagementGroupDetailsProperties + + include MsRestAzure + + # @return [Float] The version number of the object. + attr_accessor :version + + # @return [DateTime] The date and time when this object was last updated. + attr_accessor :updated_time + + # @return [String] The identity of the principal or process that updated + # the object. + attr_accessor :updated_by + + # @return [ParentGroupInfo] Parent. + attr_accessor :parent + + # @return [Enum] Management Group Type. Possible values include: + # 'Enrollment', 'Department', 'Account', 'Subscription' + attr_accessor :management_group_type + + + # + # Mapper for ManagementGroupDetailsProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroupDetailsProperties', + type: { + name: 'Composite', + class_name: 'ManagementGroupDetailsProperties', + model_properties: { + version: { + required: false, + serialized_name: 'version', + type: { + name: 'Double' + } + }, + updated_time: { + required: false, + serialized_name: 'updatedTime', + type: { + name: 'DateTime' + } + }, + updated_by: { + required: false, + serialized_name: 'updatedBy', + type: { + name: 'String' + } + }, + parent: { + required: false, + serialized_name: 'parent', + type: { + name: 'Composite', + class_name: 'ParentGroupInfo' + } + }, + management_group_type: { + required: false, + serialized_name: 'managementGroupType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_info.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_info.rb new file mode 100644 index 0000000000..09ceebbe30 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_info.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::ARM::ResourcesManagement + module Models + # + # The management group. + # + class ManagementGroupInfo + + include MsRestAzure + + # @return [String] The ID of the management group. E.g. + # /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000 + attr_accessor :id + + # @return [String] The type of the resource. E.g. + # /providers/Microsoft.Management/managementGroups + attr_accessor :type + + # @return The name of the management group. E.g. + # 20000000-0000-0000-0000-000000000000 + attr_accessor :name + + # @return The AAD Tenant ID associated with the management group. E.g. + # 10000000-0000-0000-0000-000000000000 + attr_accessor :tenant_id + + # @return [String] The friendly name of the management group. + attr_accessor :display_name + + + # + # Mapper for ManagementGroupInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroupInfo', + type: { + name: 'Composite', + class_name: 'ManagementGroupInfo', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_list_result.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_list_result.rb new file mode 100644 index 0000000000..4804460135 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_list_result.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::ARM::ResourcesManagement + module Models + # + # The result of listing management groups. + # + class ManagementGroupListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The list of management groups. + attr_accessor :value + + # @return [String] The URL to the next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ManagementGroupListResult] 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 ManagementGroupListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroupListResult', + type: { + name: 'Composite', + class_name: 'ManagementGroupListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagementGroupInfoElementType', + type: { + name: 'Composite', + class_name: 'ManagementGroupInfo' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_recursive_child_info.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_recursive_child_info.rb new file mode 100644 index 0000000000..e6302f0abf --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_recursive_child_info.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::ARM::ResourcesManagement + module Models + # + # The unique identifier (ID) of a management group. + # + class ManagementGroupRecursiveChildInfo + + include MsRestAzure + + # @return [Enum] Managment Group Recursive Child Info. Possible values + # include: 'Enrollment', 'Department', 'Account', 'Subscription' + attr_accessor :child_type + + # @return [String] The ID of the child resource (management group or + # subscription). E.g. + # /providers/Microsoft.Management/managementGroups/40000000-0000-0000-0000-000000000000 + attr_accessor :child_id + + # @return [String] The friendly name of the child resource. + attr_accessor :display_name + + # @return (Optional) The AAD Tenant ID associated with the child + # resource. + attr_accessor :tenant_id + + # @return [Array] The list of + # children. + attr_accessor :children + + + # + # Mapper for ManagementGroupRecursiveChildInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroupRecursiveChildInfo', + type: { + name: 'Composite', + class_name: 'ManagementGroupRecursiveChildInfo', + model_properties: { + child_type: { + required: false, + serialized_name: 'childType', + type: { + name: 'String' + } + }, + child_id: { + required: false, + serialized_name: 'childId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + children: { + required: false, + serialized_name: 'children', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagementGroupRecursiveChildInfoElementType', + type: { + name: 'Composite', + class_name: 'ManagementGroupRecursiveChildInfo' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_with_children.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_with_children.rb new file mode 100644 index 0000000000..e1b41ba47e --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_with_children.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::ARM::ResourcesManagement + module Models + # + # The management group details. + # + class ManagementGroupWithChildren + + include MsRestAzure + + # @return [String] The ID of the management group. E.g. + # /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000 + attr_accessor :id + + # @return [String] The type of the resource. E.g. + # /providers/Microsoft.Management/managementGroups + attr_accessor :type + + # @return The name of the management group. E.g. + # 20000000-0000-0000-0000-000000000000 + attr_accessor :name + + # @return The AAD Tenant ID associated with the management group. E.g. + # 10000000-0000-0000-0000-000000000000 + attr_accessor :tenant_id + + # @return [String] The friendly name of the management group. + attr_accessor :display_name + + # @return [ManagementGroupDetailsProperties] Details. + attr_accessor :details + + # @return [Array] The list of children. + attr_accessor :children + + + # + # Mapper for ManagementGroupWithChildren class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroupWithChildren', + type: { + name: 'Composite', + class_name: 'ManagementGroupWithChildren', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'properties.details', + type: { + name: 'Composite', + class_name: 'ManagementGroupDetailsProperties' + } + }, + children: { + required: false, + serialized_name: 'properties.children', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagementGroupChildInfoElementType', + type: { + name: 'Composite', + class_name: 'ManagementGroupChildInfo' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_with_hierarchy.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_with_hierarchy.rb new file mode 100644 index 0000000000..1d7d86a78c --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/management_group_with_hierarchy.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::ARM::ResourcesManagement + module Models + # + # The management group details. + # + class ManagementGroupWithHierarchy + + include MsRestAzure + + # @return [String] The ID of the management group. E.g. + # /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000 + attr_accessor :id + + # @return [String] The type of the resource. E.g. + # /providers/Microsoft.Management/managementGroups + attr_accessor :type + + # @return The name of the management group. E.g. + # 20000000-0000-0000-0000-000000000000 + attr_accessor :name + + # @return The AAD Tenant ID associated with the management group. E.g. + # 10000000-0000-0000-0000-000000000000 + attr_accessor :tenant_id + + # @return [String] The friendly name of the management group. + attr_accessor :display_name + + # @return [ManagementGroupDetailsProperties] Details. + attr_accessor :details + + # @return [Array] The list of + # children. + attr_accessor :children + + + # + # Mapper for ManagementGroupWithHierarchy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagementGroupWithHierarchy', + type: { + name: 'Composite', + class_name: 'ManagementGroupWithHierarchy', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'properties.details', + type: { + name: 'Composite', + class_name: 'ManagementGroupDetailsProperties' + } + }, + children: { + required: false, + serialized_name: 'properties.children', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagementGroupRecursiveChildInfoElementType', + type: { + name: 'Composite', + class_name: 'ManagementGroupRecursiveChildInfo' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation.rb new file mode 100644 index 0000000000..69e2461333 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation.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::ARM::ResourcesManagement + module Models + # + # A Management REST API operation. + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation}. + attr_accessor :name + + # @return [OperationDisplay] The object that represents the operation. + attr_accessor :display + + + # + # 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, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation_display.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation_display.rb new file mode 100644 index 0000000000..d166f01d47 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation_display.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::ARM::ResourcesManagement + module Models + # + # The object that represents the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft.Management. + attr_accessor :provider + + # @return [String] Resource on which the operation is performed: Invoice, + # etc. + attr_accessor :resource + + # @return [String] Operation type: Read, write, delete, etc. + attr_accessor :operation + + + # + # 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, + read_only: true, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + read_only: true, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'operation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation_list_result.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation_list_result.rb new file mode 100644 index 0000000000..7b66fa7468 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/operation_list_result.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::ARM::ResourcesManagement + module Models + # + # Result listing operations. It contains a list of operations and a URL + # link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of management operations supported by + # the Microsoft.Management 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/parent_group_info.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/parent_group_info.rb new file mode 100644 index 0000000000..5e9f5dbd7c --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/models/parent_group_info.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::ARM::ResourcesManagement + module Models + # + # (Optional) The ID of the parent management group. + # + class ParentGroupInfo + + include MsRestAzure + + # @return [String] The ID of the parent management group. E.g. + # /providers/Microsoft.Management/managementGroups/30000000-0000-0000-0000-000000000000 + attr_accessor :parent_id + + # @return [String] The friendly name of the management group. + attr_accessor :display_name + + + # + # Mapper for ParentGroupInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ParentGroupInfo', + type: { + name: 'Composite', + class_name: 'ParentGroupInfo', + model_properties: { + parent_id: { + required: false, + serialized_name: 'parentId', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/module_definition.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/module_definition.rb new file mode 100644 index 0000000000..8cf3862b10 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/module_definition.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 end +module Azure::ARM end +module Azure::ARM::ResourcesManagement end diff --git a/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/operations.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/operations.rb new file mode 100644 index 0000000000..9eaf8a25af --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/operations.rb @@ -0,0 +1,217 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ResourcesManagement + # + # The Azure Management Groups API enables consolidation of multiple + # subscriptions/resources into an organizational hierarchy and centrally + # manage access control, policies, alerting and reporting for those + # resources. + # + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ManagementGroupsAPI] reference to the ManagementGroupsAPI + attr_reader :client + + # + # Lists all of the available management REST API operations. + # + # @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 management REST API operations. + # + # @param custom_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 management REST API operations. + # + # @param [Hash{String => String}] 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.Management/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ResourcesManagement::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 management REST 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 [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 management REST 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_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 management REST 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_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::ARM::ResourcesManagement::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 management REST API operations. + # + # @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_resources_management/lib/generated/azure_mgmt_resources_management/version.rb b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_management/version.rb new file mode 100644 index 0000000000..42a3a472b1 --- /dev/null +++ b/management/azure_mgmt_resources_management/lib/generated/azure_mgmt_resources_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::ARM::ResourcesManagement + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_resources_management/spec/spec_helper.rb b/management/azure_mgmt_resources_management/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_resources_management/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_scheduler/azure_mgmt_scheduler.gemspec b/management/azure_mgmt_scheduler/azure_mgmt_scheduler.gemspec index 2fb0a76491..5b04b5eea7 100644 --- a/management/azure_mgmt_scheduler/azure_mgmt_scheduler.gemspec +++ b/management/azure_mgmt_scheduler/azure_mgmt_scheduler.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler.rb index 2562b39e16..a652d0c33d 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/job_collections.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/job_collections.rb index b602230abb..75fc1ce9f4 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/job_collections.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/job_collections.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/jobs.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/jobs.rb index ed5fb4ba3a..883cae8dcf 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/jobs.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/jobs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/basic_authentication.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/basic_authentication.rb index 1d5274c568..c6f2147633 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/basic_authentication.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/basic_authentication.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class BasicAuthentication < HttpAuthentication include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the username. attr_accessor :username diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/client_cert_authentication.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/client_cert_authentication.rb index 19dc426355..6840d2bfb8 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/client_cert_authentication.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/client_cert_authentication.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ClientCertAuthentication < HttpAuthentication include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the certificate password, return value # will always be empty. attr_accessor :password diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/day_of_week.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/day_of_week.rb index bb65ae8eb2..b269a4780e 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/day_of_week.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/day_of_week.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication.rb index 09f15feb13..cd139ee259 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class HttpAuthentication include MsRestAzure - include MsRest::JSONable # @return [HttpAuthenticationType] Gets or sets the HTTP authentication # type. Possible values include: 'NotSpecified', 'ClientCertificate', # 'ActiveDirectoryOAuth', 'Basic' diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication_type.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication_type.rb index 0ea0d43f05..4c7d4f573f 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication_type.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_authentication_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_request.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_request.rb index ad45a04861..8fc595d53b 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_request.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/http_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class HttpRequest include MsRestAzure - include MsRest::JSONable # @return [HttpAuthentication] Gets or sets the authentication method of # the request. attr_accessor :authentication diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action.rb index 7396d18ba6..2648dc64eb 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobAction include MsRestAzure - include MsRest::JSONable # @return [JobActionType] Gets or sets the job action type. Possible # values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', # 'ServiceBusTopic' diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action_type.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action_type.rb index ced87df707..bf39a713ae 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action_type.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_action_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_definition.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_definition.rb index ae3968e944..d638842054 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_definition.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobCollectionDefinition include MsRestAzure - include MsRest::JSONable # @return [String] Gets the job collection resource identifier. attr_accessor :id diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_list_result.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_list_result.rb index 2bf3579fae..738bbaa2ab 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_list_result.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_properties.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_properties.rb index 692fc95845..b86fb84ec5 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_properties.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobCollectionProperties include MsRestAzure - include MsRest::JSONable # @return [Sku] Gets or sets the SKU. attr_accessor :sku diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_quota.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_quota.rb index 3c962c8283..eb9f6dfebf 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_quota.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_quota.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobCollectionQuota include MsRestAzure - include MsRest::JSONable # @return [Integer] Gets or set the maximum job count. attr_accessor :max_job_count diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_state.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_state.rb index 8433857db2..aa639b7602 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_state.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_collection_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_definition.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_definition.rb index 14e78a0108..9641fd8fed 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_definition.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobDefinition include MsRestAzure - include MsRest::JSONable # @return [String] Gets the job resource identifier. attr_accessor :id diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_error_action.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_error_action.rb index 4aba66f50b..6168418728 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_error_action.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_error_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobErrorAction include MsRestAzure - include MsRest::JSONable # @return [JobActionType] Gets or sets the job error action type. # Possible values include: 'Http', 'Https', 'StorageQueue', # 'ServiceBusQueue', 'ServiceBusTopic' diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_execution_status.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_execution_status.rb index 9d487eb960..c598941178 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_execution_status.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_execution_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_action_name.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_action_name.rb index 869f00659d..4b92886c0e 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_action_name.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_action_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition.rb index a26e6b1f28..6790b73809 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobHistoryDefinition include MsRestAzure - include MsRest::JSONable # @return [String] Gets the job history identifier. attr_accessor :id diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition_properties.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition_properties.rb index 7a564695b9..59d04139b2 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition_properties.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_definition_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobHistoryDefinitionProperties include MsRestAzure - include MsRest::JSONable # @return [DateTime] Gets the start time for this job. attr_accessor :start_time diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_filter.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_filter.rb index 0c0b2fab8c..3b29489376 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_filter.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobHistoryFilter include MsRestAzure - include MsRest::JSONable # @return [JobExecutionStatus] Gets or sets the job execution status. # Possible values include: 'Completed', 'Failed', 'Postponed' attr_accessor :status diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_list_result.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_list_result.rb index fe6a0a5584..fc8a2953b4 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_list_result.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_history_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_list_result.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_list_result.rb index 65b67c0cc5..74fe97dd0e 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_list_result.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_max_recurrence.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_max_recurrence.rb index 20d4f9080d..35f5a790a7 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_max_recurrence.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_max_recurrence.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobMaxRecurrence include MsRestAzure - include MsRest::JSONable # @return [RecurrenceFrequency] Gets or sets the frequency of recurrence # (second, minute, hour, day, week, month). Possible values include: # 'Minute', 'Hour', 'Day', 'Week', 'Month' diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_properties.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_properties.rb index 678f53698e..b4260f3608 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_properties.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobProperties include MsRestAzure - include MsRest::JSONable # @return [DateTime] Gets or sets the job start time. attr_accessor :start_time diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence.rb index 608d1534da..28c8fc314b 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobRecurrence include MsRestAzure - include MsRest::JSONable # @return [RecurrenceFrequency] Gets or sets the frequency of recurrence # (second, minute, hour, day, week, month). Possible values include: # 'Minute', 'Hour', 'Day', 'Week', 'Month' diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule.rb index 104d472ab3..d81ec5a5f9 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobRecurrenceSchedule include MsRestAzure - include MsRest::JSONable # @return [Array] Gets or sets the days of the week that the # job should execute on. attr_accessor :week_days diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb index 8613fc232e..c6e54abcdc 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobRecurrenceScheduleMonthlyOccurrence include MsRestAzure - include MsRest::JSONable # @return [JobScheduleDay] Gets or sets the day. Must be one of monday, # tuesday, wednesday, thursday, friday, saturday, sunday. Possible values # include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_schedule_day.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_schedule_day.rb index 8dc10bf56e..9432d32cbe 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_schedule_day.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_schedule_day.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state.rb index 6f9c962379..14f540d878 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state_filter.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state_filter.rb index e731d02bfa..3049f5a9b5 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state_filter.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_state_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobStateFilter include MsRestAzure - include MsRest::JSONable # @return [JobState] Gets or sets the job state. Possible values include: # 'Enabled', 'Disabled', 'Faulted', 'Completed' attr_accessor :state diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_status.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_status.rb index cecc37c8df..628fd11b0f 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_status.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/job_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JobStatus include MsRestAzure - include MsRest::JSONable # @return [Integer] Gets the number of times this job has executed. attr_accessor :execution_count diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/oauth_authentication.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/oauth_authentication.rb index 1425d521eb..4cd8b10bb2 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/oauth_authentication.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/oauth_authentication.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class OAuthAuthentication < HttpAuthentication include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the secret, return value will always be # empty. attr_accessor :secret diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/recurrence_frequency.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/recurrence_frequency.rb index 117c8afaed..b654bf0ff5 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/recurrence_frequency.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/recurrence_frequency.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_policy.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_policy.rb index 796cfb0975..27b22c780d 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_policy.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RetryPolicy include MsRestAzure - include MsRest::JSONable # @return [RetryType] Gets or sets the retry strategy to be used. # Possible values include: 'None', 'Fixed' attr_accessor :retry_type diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_type.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_type.rb index 92ac8fdb1a..b1ef83de2b 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_type.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/retry_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication.rb index 5ba3daed17..9c19da11d3 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ServiceBusAuthentication include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the SAS key. attr_accessor :sas_key diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication_type.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication_type.rb index 26b4cfa70e..1ee88d5ad6 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication_type.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb index 4b1b3ae6b7..bd1a136337 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ServiceBusBrokeredMessageProperties include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the content type. attr_accessor :content_type diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_message.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_message.rb index e95568827c..45c05cc681 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_message.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_message.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ServiceBusMessage include MsRestAzure - include MsRest::JSONable # @return [ServiceBusAuthentication] Gets or sets the Service Bus # authentication. attr_accessor :authentication diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_queue_message.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_queue_message.rb index af1e21380e..fbb48a3f03 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_queue_message.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_queue_message.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ServiceBusQueueMessage < ServiceBusMessage include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the queue name. attr_accessor :queue_name diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_topic_message.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_topic_message.rb index 45f831f7fc..c28198f1e7 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_topic_message.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_topic_message.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ServiceBusTopicMessage < ServiceBusMessage include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the topic path. attr_accessor :topic_path diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_transport_type.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_transport_type.rb index b667954a03..4969fcd182 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_transport_type.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/service_bus_transport_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku.rb index e241c9ad59..fcb21e8fe4 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuDefinition] Gets or set the SKU. Possible values include: # 'Standard', 'Free', 'P10Premium', 'P20Premium' attr_accessor :name diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku_definition.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku_definition.rb index e6bec3e8ee..4972f4db00 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku_definition.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/sku_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/storage_queue_message.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/storage_queue_message.rb index 4558fa90ff..ca224b60cd 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/storage_queue_message.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/models/storage_queue_message.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class StorageQueueMessage include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the storage account name. attr_accessor :storage_account diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/module_definition.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/module_definition.rb index e94f7b4e9f..8a0f57ce1c 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/module_definition.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/scheduler_management_client.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/scheduler_management_client.rb index 92e61f7cde..67c8524399 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/scheduler_management_client.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/scheduler_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/version.rb b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/version.rb index d3b7275927..10b5669d08 100644 --- a/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/version.rb +++ b/management/azure_mgmt_scheduler/lib/generated/azure_mgmt_scheduler/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Scheduler - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_search/azure_mgmt_search.gemspec b/management/azure_mgmt_search/azure_mgmt_search.gemspec index 69fd37beb3..6a767d9fe3 100644 --- a/management/azure_mgmt_search/azure_mgmt_search.gemspec +++ b/management/azure_mgmt_search/azure_mgmt_search.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search.rb index 852fcec018..098eb21e09 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -30,6 +30,7 @@ module Models autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_search/models/check_name_availability_input.rb' autoload :SearchManagementRequestOptions, 'generated/azure_mgmt_search/models/search_management_request_options.rb' autoload :AdminKeyResult, 'generated/azure_mgmt_search/models/admin_key_result.rb' + autoload :Resource, 'generated/azure_mgmt_search/models/resource.rb' autoload :QueryKey, 'generated/azure_mgmt_search/models/query_key.rb' autoload :CheckNameAvailabilityOutput, 'generated/azure_mgmt_search/models/check_name_availability_output.rb' autoload :SearchService, 'generated/azure_mgmt_search/models/search_service.rb' diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/admin_keys.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/admin_keys.rb index e0b4b1347e..6c66f8173b 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/admin_keys.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/admin_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_kind.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_kind.rb index 66dad08f4a..6767c2dc8a 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_kind.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_kind.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_result.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_result.rb index 733708bf16..c285a466cd 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_result.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/admin_key_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AdminKeyResult include MsRestAzure - include MsRest::JSONable # @return [String] The primary admin API key of the Search service. attr_accessor :primary_key diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_input.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_input.rb index 8657a88450..65f1f709ed 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_input.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityInput include MsRestAzure - include MsRest::JSONable # @return [String] The Search service name to validate. Search service # names must only contain lowercase letters, digits or dashes, cannot use # dash as the first two or last one characters, cannot contain diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_output.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_output.rb index 45e467678f..e627c35db8 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_output.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/check_name_availability_output.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityOutput include MsRestAzure - include MsRest::JSONable # @return [Boolean] A value indicating whether the name is available. attr_accessor :is_name_available diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/hosting_mode.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/hosting_mode.rb index 82279f3a55..80241ed36d 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/hosting_mode.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/hosting_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/provisioning_state.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/provisioning_state.rb index aab44c3400..9bb71ca038 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/provisioning_state.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/query_key.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/query_key.rb index ba1166ba91..b0c6ce54c0 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/query_key.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/query_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class QueryKey include MsRestAzure - include MsRest::JSONable # @return [String] The name of the query API key; may be empty. attr_accessor :name diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/resource.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/resource.rb new file mode 100644 index 0000000000..3701182714 --- /dev/null +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/resource.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::ARM::Search + module Models + # + # Base type for all Azure resources. + # + class Resource + + include MsRestAzure + + # @return [String] The ID of the resource. This can be used with the + # Azure Resource Manager to link resources together. + attr_accessor :id + + # @return [String] The name of the resource. + attr_accessor :name + + # @return [String] The resource type. + attr_accessor :type + + # @return [String] The geographic location of the resource. This must be + # one of the supported and registered Azure Geo Regions (for example, + # West US, East US, Southeast Asia, and so forth). + attr_accessor :location + + # @return [Hash{String => String}] Tags to help categorize the resource + # in the Azure portal. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_management_request_options.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_management_request_options.rb index bba133ab0f..c6d082a3a5 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_management_request_options.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_management_request_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SearchManagementRequestOptions include MsRestAzure - include MsRest::JSONable # @return A client-generated GUID value that identifies this request. If # specified, this will be included in response information as a way to # track the request. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service.rb index 67e3d7829e..d2ca7cb173 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes an Azure Search service and its current state. # - class SearchService < MsRestAzure::Resource + class SearchService < Resource include MsRestAzure - include MsRest::JSONable # @return [Integer] The number of replicas in the Search service. If # specified, it must be a value between 1 and 12 inclusive for standard # SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1 . diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service_status.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service_status.rb index 8b52ebab7e..1c03493808 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service_status.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/search_service_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku.rb index c251b2b8e4..db4409ac24 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] The SKU of the Search service. Valid values include: # 'free': Shared service. 'basic': Dedicated service with up to 3 # replicas. 'standard': Dedicated service with up to 12 partitions and 12 diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku_name.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku_name.rb index 36c54a99b9..7cfd9ab157 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku_name.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/unavailable_name_reason.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/unavailable_name_reason.rb index becb14c681..ec2ef3fdc3 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/unavailable_name_reason.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/models/unavailable_name_reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/module_definition.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/module_definition.rb index 8f8d2d6bc4..2631cce8f7 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/module_definition.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/query_keys.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/query_keys.rb index 6f248e89f5..f1159c9e41 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/query_keys.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/query_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/search_management_client.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/search_management_client.rb index a458e04f21..0056294ee3 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/search_management_client.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/search_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/services.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/services.rb index 86e2e1e39f..fa74f756c1 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/services.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -50,10 +50,6 @@ def create_or_update(resource_group_name, search_service_name, service, search_m response.body unless response.nil? end - # - # Creates or updates a Search service in the given resource group. If the - # Search service already exists, all properties will be updated with the given - # values. # # @param resource_group_name [String] The name of the resource group within the # current subscription. You can obtain this value from the Azure Resource @@ -72,111 +68,25 @@ def create_or_update(resource_group_name, search_service_name, service, search_m # @param custom_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, search_service_name, service, search_management_request_options = nil, custom_headers = nil) - create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers).value! - end - - # - # Creates or updates a Search service in the given resource group. If the - # Search service already exists, all properties will be updated with the given - # values. - # - # @param resource_group_name [String] The name of the resource group within the - # current subscription. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param search_service_name [String] The name of the Azure Search service to - # create or update. Search service names must only contain lowercase letters, - # digits or dashes, cannot use dash as the first two or last one characters, - # cannot contain consecutive dashes, and must be between 2 and 60 characters in - # length. Search service names must be globally unique since they are part of - # the service URI (https://.search.windows.net). You cannot change the - # service name after the service is created. - # @param service [SearchService] The definition of the Search service to create - # or update. - # @param search_management_request_options [SearchManagementRequestOptions] - # Additional parameters for the 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. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # def create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options = nil, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'search_service_name is nil' if search_service_name.nil? - fail ArgumentError, 'service is nil' if service.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - - client_request_id = nil - unless search_management_request_options.nil? - client_request_id = search_management_request_options.clientRequestId - end - - request_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['x-ms-client-request-id'] = client_request_id.to_s unless client_request_id.to_s.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Search::Models::SearchService.mapper() - request_content = @client.serialize(request_mapper, service) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'searchServiceName' => search_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 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + # Send request + promise = begin_create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Search::Models::SearchService.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Search::Models::SearchService.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Search::Models::SearchService.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # @@ -623,5 +533,163 @@ def check_name_availability_async(name, search_management_request_options = nil, promise.execute end + # + # Creates or updates a Search service in the given resource group. If the + # Search service already exists, all properties will be updated with the given + # values. + # + # @param resource_group_name [String] The name of the resource group within the + # current subscription. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param search_service_name [String] The name of the Azure Search service to + # create or update. Search service names must only contain lowercase letters, + # digits or dashes, cannot use dash as the first two or last one characters, + # cannot contain consecutive dashes, and must be between 2 and 60 characters in + # length. Search service names must be globally unique since they are part of + # the service URI (https://.search.windows.net). You cannot change the + # service name after the service is created. + # @param service [SearchService] The definition of the Search service to create + # or update. + # @param search_management_request_options [SearchManagementRequestOptions] + # Additional parameters for the operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SearchService] operation results. + # + def begin_create_or_update(resource_group_name, search_service_name, service, search_management_request_options = nil, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a Search service in the given resource group. If the + # Search service already exists, all properties will be updated with the given + # values. + # + # @param resource_group_name [String] The name of the resource group within the + # current subscription. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param search_service_name [String] The name of the Azure Search service to + # create or update. Search service names must only contain lowercase letters, + # digits or dashes, cannot use dash as the first two or last one characters, + # cannot contain consecutive dashes, and must be between 2 and 60 characters in + # length. Search service names must be globally unique since they are part of + # the service URI (https://.search.windows.net). You cannot change the + # service name after the service is created. + # @param service [SearchService] The definition of the Search service to create + # or update. + # @param search_management_request_options [SearchManagementRequestOptions] + # Additional parameters for the 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, search_service_name, service, search_management_request_options = nil, custom_headers = nil) + begin_create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers).value! + end + + # + # Creates or updates a Search service in the given resource group. If the + # Search service already exists, all properties will be updated with the given + # values. + # + # @param resource_group_name [String] The name of the resource group within the + # current subscription. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param search_service_name [String] The name of the Azure Search service to + # create or update. Search service names must only contain lowercase letters, + # digits or dashes, cannot use dash as the first two or last one characters, + # cannot contain consecutive dashes, and must be between 2 and 60 characters in + # length. Search service names must be globally unique since they are part of + # the service URI (https://.search.windows.net). You cannot change the + # service name after the service is created. + # @param service [SearchService] The definition of the Search service to create + # or update. + # @param search_management_request_options [SearchManagementRequestOptions] + # Additional parameters for the 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, search_service_name, service, search_management_request_options = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'search_service_name is nil' if search_service_name.nil? + fail ArgumentError, 'service is nil' if service.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + client_request_id = nil + unless search_management_request_options.nil? + client_request_id = search_management_request_options.clientRequestId + end + + request_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['x-ms-client-request-id'] = client_request_id.to_s unless client_request_id.to_s.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Search::Models::SearchService.mapper() + request_content = @client.serialize(request_mapper, service) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'searchServiceName' => search_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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Search::Models::SearchService.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Search::Models::SearchService.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_search/lib/generated/azure_mgmt_search/version.rb b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/version.rb index 7f2eb64368..38882b34a3 100644 --- a/management/azure_mgmt_search/lib/generated/azure_mgmt_search/version.rb +++ b/management/azure_mgmt_search/lib/generated/azure_mgmt_search/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Search - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_server_management/azure_mgmt_server_management.gemspec b/management/azure_mgmt_server_management/azure_mgmt_server_management.gemspec index e63022bf20..2320337282 100644 --- a/management/azure_mgmt_server_management/azure_mgmt_server_management.gemspec +++ b/management/azure_mgmt_server_management/azure_mgmt_server_management.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management.rb index dd8e1b41f6..60744a2b86 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/gateway.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/gateway.rb index a8d9979ade..1c088b387a 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/gateway.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/gateway.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/credential_data_format.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/credential_data_format.rb index 6dad4c5a64..5910021f99 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/credential_data_format.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/credential_data_format.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/encryption_jwk_resource.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/encryption_jwk_resource.rb index 891d18b26f..2a24e73af1 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/encryption_jwk_resource.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/encryption_jwk_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EncryptionJwkResource include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :kty diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/error.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/error.rb index b94b2fe273..4e008a500e 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/error.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Error include MsRestAzure - include MsRest::JSONable # @return [Integer] attr_accessor :code diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_expand_option.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_expand_option.rb index 9f1306e32e..eff3bf5bc8 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_expand_option.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_expand_option.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_parameters.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_parameters.rb index e10a964fb5..44d79689a0 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_parameters.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GatewayParameters include MsRestAzure - include MsRest::JSONable # @return [String] Location of the resource. attr_accessor :location diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_profile.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_profile.rb index f8ce4d074b..6747e8ed8f 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_profile.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class GatewayProfile include MsRestAzure - include MsRest::JSONable # @return [String] The Dataplane connection URL. attr_accessor :data_plane_service_base_address diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resource.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resource.rb index e35f3b3d33..b28b4a94fd 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resource.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Data model for an arm gateway resource. # - class GatewayResource < MsRestAzure::Resource + class GatewayResource < Resource include MsRestAzure - include MsRest::JSONable # @return [DateTime] UTC date and time when gateway was first added to # management service. attr_accessor :created diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resources.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resources.rb index d2246fa7d6..991209c3d4 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resources.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_resources.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_status.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_status.rb index b1ce93256b..3b8f3a66af 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_status.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/gateway_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GatewayStatus include MsRestAzure - include MsRest::JSONable # @return [Float] The available memory on the gateway host machine in # megabytes. attr_accessor :available_memory_mbyte diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_parameters.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_parameters.rb index c349e87f9a..8162022440 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_parameters.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NodeParameters include MsRestAzure - include MsRest::JSONable # @return [String] Location of the resource. attr_accessor :location diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resource.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resource.rb index b756de143c..c7935e9206 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resource.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A Node Resource. # - class NodeResource < MsRestAzure::Resource + class NodeResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] ID of the gateway. attr_accessor :gateway_id diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resources.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resources.rb index 3350fc3e38..a934b04ff1 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resources.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/node_resources.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_parameters.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_parameters.rb index 7a1d6064a1..ff705c6097 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_parameters.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PowerShellCommandParameters include MsRestAzure - include MsRest::JSONable # @return [String] Script to execute. attr_accessor :command diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_result.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_result.rb index 46ca617c4d..857ef67537 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_result.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PowerShellCommandResult include MsRestAzure - include MsRest::JSONable # @return [Integer] The type of message. attr_accessor :message_type diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_results.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_results.rb index 0532afa956..403cc3d865 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_results.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_results.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PowerShellCommandResults include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :results diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_status.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_status.rb index 95c494820b..49f0df78b8 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_status.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_command_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Result status from invoking a PowerShell command. # - class PowerShellCommandStatus < MsRestAzure::Resource + class PowerShellCommandStatus < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :results diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_expand_option.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_expand_option.rb index 6a84649f5e..035b5c507a 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_expand_option.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_expand_option.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resource.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resource.rb index 4c5f2d4972..af67529625 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resource.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # A PowerShell session resource (practically equivalent to a runspace # instance). # - class PowerShellSessionResource < MsRestAzure::Resource + class PowerShellSessionResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The PowerShell Session ID. attr_accessor :session_id diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resources.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resources.rb index 3bc06d33ed..75301debc0 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resources.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_session_resources.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PowerShellSessionResources include MsRestAzure - include MsRest::JSONable # @return [Array] Collection of PowerShell # session resources. attr_accessor :value diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_parameters.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_parameters.rb index 10548ea2f7..00ecdaeb40 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_parameters.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PowerShellTabCompletionParameters include MsRestAzure - include MsRest::JSONable # @return [String] Command to get tab completion for. attr_accessor :command diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_results.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_results.rb index 156d511b92..d9cd57d76c 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_results.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_results.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class PowerShellTabCompletionResults include MsRestAzure - include MsRest::JSONable # @return [Array] attr_accessor :results diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_description.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_description.rb index 934515ce23..0af61412e0 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_description.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PromptFieldDescription include MsRestAzure - include MsRest::JSONable # @return [String] The name of the prompt. attr_accessor :name diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_type.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_type.rb index e7ed2fcbb7..1761854f42 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_type.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_field_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_message_response.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_message_response.rb index 148b571048..4d1248b252 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_message_response.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/prompt_message_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PromptMessageResponse include MsRestAzure - include MsRest::JSONable # @return [Array] The list of responses a cmdlet expects. attr_accessor :response diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/resource.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/resource.rb index 489deb895d..e6175be438 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/resource.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,25 @@ module Models # # Resource Manager Resource Information. # - class Resource < MsRestAzure::Resource + class Resource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Manager Resource ID. + attr_accessor :id + + # @return [String] Resource Manager Resource Type. + attr_accessor :type + + # @return [String] Resource Manager Resource Name. + attr_accessor :name + + # @return [String] Resource Manager Resource Location. + attr_accessor :location + + # @return [Hash{String => String}] Resource Manager Resource Tags. + attr_accessor :tags + # @return [String] attr_accessor :etag diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/retention_period.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/retention_period.rb index de0da0774d..eb2d2a915b 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/retention_period.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/retention_period.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_parameters.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_parameters.rb index a44be5ebcb..793a488798 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_parameters.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SessionParameters include MsRestAzure - include MsRest::JSONable # @return [String] Encrypted User name to be used to connect to node. attr_accessor :user_name diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_resource.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_resource.rb index 94232680ba..2661ffab61 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_resource.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/session_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The session object. # - class SessionResource < MsRestAzure::Resource + class SessionResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] The username connecting to the session. attr_accessor :user_name diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/upgrade_mode.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/upgrade_mode.rb index 6066e9ea2d..714abc8cab 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/upgrade_mode.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/upgrade_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/version.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/version.rb index 807560269b..b038fd5ab4 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/version.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/models/version.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Version include MsRestAzure - include MsRest::JSONable # @return [Integer] The leftmost number of the version. attr_accessor :major diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/module_definition.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/module_definition.rb index 4433be4d39..ba16df05d3 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/module_definition.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/node.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/node.rb index ddf23ddf8f..782163c05b 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/node.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/node.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/power_shell.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/power_shell.rb index 94ae93e382..66ffc904a4 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/power_shell.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/power_shell.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/server_management.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/server_management.rb index aff3539e7b..400017887a 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/server_management.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/server_management.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/session.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/session.rb index 817dd3b5d5..b457d62c3c 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/session.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/session.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/version.rb b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/version.rb index d237be2e98..b5c1e3da47 100644 --- a/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/version.rb +++ b/management/azure_mgmt_server_management/lib/generated/azure_mgmt_server_management/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::ServerManagement - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_service_bus/azure_mgmt_service_bus.gemspec b/management/azure_mgmt_service_bus/azure_mgmt_service_bus.gemspec index 84800f2c84..1c3286b36d 100644 --- a/management/azure_mgmt_service_bus/azure_mgmt_service_bus.gemspec +++ b/management/azure_mgmt_service_bus/azure_mgmt_service_bus.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus.rb old mode 100755 new mode 100644 index d55c666e3d..e3103af37e --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -22,33 +22,44 @@ module Azure::ARM::ServiceBus autoload :Operations, 'generated/azure_mgmt_service_bus/operations.rb' autoload :Namespaces, 'generated/azure_mgmt_service_bus/namespaces.rb' + autoload :DisasterRecoveryConfigs, 'generated/azure_mgmt_service_bus/disaster_recovery_configs.rb' autoload :Queues, 'generated/azure_mgmt_service_bus/queues.rb' autoload :Topics, 'generated/azure_mgmt_service_bus/topics.rb' autoload :Subscriptions, 'generated/azure_mgmt_service_bus/subscriptions.rb' autoload :Rules, 'generated/azure_mgmt_service_bus/rules.rb' + autoload :Regions, 'generated/azure_mgmt_service_bus/regions.rb' + autoload :PremiumMessagingRegionsOperations, 'generated/azure_mgmt_service_bus/premium_messaging_regions_operations.rb' + autoload :EventHubs, 'generated/azure_mgmt_service_bus/event_hubs.rb' autoload :ServiceBusManagementClient, 'generated/azure_mgmt_service_bus/service_bus_management_client.rb' module Models - autoload :CorrelationFilter, 'generated/azure_mgmt_service_bus/models/correlation_filter.rb' - autoload :RegenerateAccessKeyParameters, 'generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb' - autoload :MessageCountDetails, 'generated/azure_mgmt_service_bus/models/message_count_details.rb' - autoload :SBSku, 'generated/azure_mgmt_service_bus/models/sbsku.rb' - autoload :Operation, 'generated/azure_mgmt_service_bus/models/operation.rb' - autoload :SBNamespaceListResult, 'generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb' + autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_service_bus/models/check_name_availability_result.rb' autoload :SBQueueListResult, 'generated/azure_mgmt_service_bus/models/sbqueue_list_result.rb' - autoload :OperationListResult, 'generated/azure_mgmt_service_bus/models/operation_list_result.rb' - autoload :AuthorizationRuleProperties, 'generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb' + autoload :Resource, 'generated/azure_mgmt_service_bus/models/resource.rb' + autoload :PremiumMessagingRegionsListResult, 'generated/azure_mgmt_service_bus/models/premium_messaging_regions_list_result.rb' + autoload :SBSku, 'generated/azure_mgmt_service_bus/models/sbsku.rb' autoload :SBTopicListResult, 'generated/azure_mgmt_service_bus/models/sbtopic_list_result.rb' - autoload :SqlFilter, 'generated/azure_mgmt_service_bus/models/sql_filter.rb' - autoload :RuleListResult, 'generated/azure_mgmt_service_bus/models/rule_list_result.rb' - autoload :ErrorResponse, 'generated/azure_mgmt_service_bus/models/error_response.rb' + autoload :SBNamespaceListResult, 'generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb' + autoload :PremiumMessagingRegionsProperties, 'generated/azure_mgmt_service_bus/models/premium_messaging_regions_properties.rb' + autoload :CaptureDescription, 'generated/azure_mgmt_service_bus/models/capture_description.rb' autoload :SBSubscriptionListResult, 'generated/azure_mgmt_service_bus/models/sbsubscription_list_result.rb' - autoload :AccessKeys, 'generated/azure_mgmt_service_bus/models/access_keys.rb' + autoload :AuthorizationRuleProperties, 'generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb' autoload :CheckNameAvailability, 'generated/azure_mgmt_service_bus/models/check_name_availability.rb' + autoload :RegenerateAccessKeyParameters, 'generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb' + autoload :RuleListResult, 'generated/azure_mgmt_service_bus/models/rule_list_result.rb' + autoload :Destination, 'generated/azure_mgmt_service_bus/models/destination.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_service_bus/models/operation_display.rb' + autoload :ArmDisasterRecoveryListResult, 'generated/azure_mgmt_service_bus/models/arm_disaster_recovery_list_result.rb' + autoload :Operation, 'generated/azure_mgmt_service_bus/models/operation.rb' autoload :SBAuthorizationRuleListResult, 'generated/azure_mgmt_service_bus/models/sbauthorization_rule_list_result.rb' - autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_service_bus/models/check_name_availability_result.rb' + autoload :OperationListResult, 'generated/azure_mgmt_service_bus/models/operation_list_result.rb' + autoload :MessageCountDetails, 'generated/azure_mgmt_service_bus/models/message_count_details.rb' + autoload :ErrorResponse, 'generated/azure_mgmt_service_bus/models/error_response.rb' + autoload :EventHubListResult, 'generated/azure_mgmt_service_bus/models/event_hub_list_result.rb' autoload :Action, 'generated/azure_mgmt_service_bus/models/action.rb' - autoload :OperationDisplay, 'generated/azure_mgmt_service_bus/models/operation_display.rb' + autoload :SqlFilter, 'generated/azure_mgmt_service_bus/models/sql_filter.rb' + autoload :AccessKeys, 'generated/azure_mgmt_service_bus/models/access_keys.rb' + autoload :CorrelationFilter, 'generated/azure_mgmt_service_bus/models/correlation_filter.rb' autoload :TrackedResource, 'generated/azure_mgmt_service_bus/models/tracked_resource.rb' autoload :ResourceNamespacePatch, 'generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb' autoload :SBNamespace, 'generated/azure_mgmt_service_bus/models/sbnamespace.rb' @@ -59,6 +70,9 @@ module Models autoload :SBSubscription, 'generated/azure_mgmt_service_bus/models/sbsubscription.rb' autoload :Rule, 'generated/azure_mgmt_service_bus/models/rule.rb' autoload :SqlRuleAction, 'generated/azure_mgmt_service_bus/models/sql_rule_action.rb' + autoload :PremiumMessagingRegions, 'generated/azure_mgmt_service_bus/models/premium_messaging_regions.rb' + autoload :Eventhub, 'generated/azure_mgmt_service_bus/models/eventhub.rb' + autoload :ArmDisasterRecovery, 'generated/azure_mgmt_service_bus/models/arm_disaster_recovery.rb' autoload :SkuName, 'generated/azure_mgmt_service_bus/models/sku_name.rb' autoload :SkuTier, 'generated/azure_mgmt_service_bus/models/sku_tier.rb' autoload :AccessRights, 'generated/azure_mgmt_service_bus/models/access_rights.rb' @@ -66,5 +80,8 @@ module Models autoload :EntityStatus, 'generated/azure_mgmt_service_bus/models/entity_status.rb' autoload :UnavailableReason, 'generated/azure_mgmt_service_bus/models/unavailable_reason.rb' autoload :FilterType, 'generated/azure_mgmt_service_bus/models/filter_type.rb' + autoload :EncodingCaptureDescription, 'generated/azure_mgmt_service_bus/models/encoding_capture_description.rb' + autoload :ProvisioningStateDR, 'generated/azure_mgmt_service_bus/models/provisioning_state_dr.rb' + autoload :RoleDisasterRecovery, 'generated/azure_mgmt_service_bus/models/role_disaster_recovery.rb' end end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb new file mode 100644 index 0000000000..ac73db5529 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb @@ -0,0 +1,711 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + # + # Azure Service Bus client + # + class DisasterRecoveryConfigs + include MsRestAzure + + # + # Creates and initializes a new instance of the DisasterRecoveryConfigs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ServiceBusManagementClient] reference to the ServiceBusManagementClient + attr_reader :client + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceBus::Models::ArmDisasterRecoveryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 new Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param parameters [ArmDisasterRecovery] Parameters required to create an + # Alias(Disaster Recovery configuration) + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ArmDisasterRecovery] operation results. + # + def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a new Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param parameters [ArmDisasterRecovery] Parameters required to create an + # Alias(Disaster Recovery configuration) + # @param custom_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, namespace_name, alias_parameter, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value! + end + + # + # Creates or updates a new Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param parameters [ArmDisasterRecovery] Parameters required to create an + # Alias(Disaster Recovery configuration) + # @param [Hash{String => String}] 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, namespace_name, alias_parameter, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ServiceBus::Models::ArmDisasterRecovery.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.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceBus::Models::ArmDisasterRecovery.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + nil + end + + # + # Deletes an Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # Deletes an Alias(Disaster Recovery configuration) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@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.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(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 Alias(Disaster Recovery configuration) for primary or secondary + # namespace + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ArmDisasterRecovery] operation results. + # + def get(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves Alias(Disaster Recovery configuration) for primary or secondary + # namespace + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # Retrieves Alias(Disaster Recovery configuration) for primary or secondary + # namespace + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@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.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'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::ARM::ServiceBus::Models::ArmDisasterRecovery.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 disables the Disaster Recovery and stops replicating changes + # from primary to secondary namespaces + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + nil + end + + # + # This operation disables the Disaster Recovery and stops replicating changes + # from primary to secondary namespaces + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # This operation disables the Disaster Recovery and stops replicating changes + # from primary to secondary namespaces + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@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.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'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? + + result + end + + promise.execute + end + + # + # envokes GEO DR failover and reconfigure the alias to point to the secondary + # namespace + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + nil + end + + # + # envokes GEO DR failover and reconfigure the alias to point to the secondary + # namespace + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value! + end + + # + # envokes GEO DR failover and reconfigure the alias to point to the secondary + # namespace + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param alias_parameter [String] The Disaster Recovery configuration name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil? + fail ArgumentError, '@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.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'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? + + result + end + + promise.execute + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @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 [ArmDisasterRecoveryListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @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::ARM::ServiceBus::Models::ArmDisasterRecoveryListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all Alias(Disaster Recovery configurations) + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_async(resource_group_name, namespace_name, custom_headers).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_service_bus/lib/generated/azure_mgmt_service_bus/event_hubs.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/event_hubs.rb new file mode 100644 index 0000000000..a039020c93 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/event_hubs.rb @@ -0,0 +1,229 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + # + # Azure Service Bus client + # + class EventHubs + include MsRestAzure + + # + # Creates and initializes a new instance of the EventHubs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ServiceBusManagementClient] reference to the ServiceBusManagementClient + attr_reader :client + + # + # Gets all the Event Hubs in a service bus Namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_namespace(resource_group_name, namespace_name, custom_headers = nil) + first_page = list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the Event Hubs in a service bus Namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_namespace_with_http_info(resource_group_name, namespace_name, custom_headers = nil) + list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value! + end + + # + # Gets all the Event Hubs in a service bus Namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_namespace_async(resource_group_name, namespace_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/eventhubs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceBus::Models::EventHubListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the Event Hubs in a service bus Namespace. + # + # @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 [EventHubListResult] operation results. + # + def list_by_namespace_next(next_page_link, custom_headers = nil) + response = list_by_namespace_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the Event Hubs in a service bus Namespace. + # + # @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_namespace_next_with_http_info(next_page_link, custom_headers = nil) + list_by_namespace_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the Event Hubs in a service bus Namespace. + # + # @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_namespace_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::ARM::ServiceBus::Models::EventHubListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the Event Hubs in a service bus Namespace. + # + # @param resource_group_name [String] Name of the Resource group within the + # Azure subscription. + # @param namespace_name [String] The namespace name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EventHubListResult] which provide lazy access to pages of the + # response. + # + def list_by_namespace_as_lazy(resource_group_name, namespace_name, custom_headers = nil) + response = list_by_namespace_async(resource_group_name, namespace_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_namespace_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_keys.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_keys.rb index b5b725dc13..a21124bbcc 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_keys.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AccessKeys include MsRestAzure - include MsRest::JSONable # @return [String] Primary connection string of the created namespace # authorization rule. attr_accessor :primary_connection_string @@ -21,6 +20,14 @@ class AccessKeys # authorization rule. attr_accessor :secondary_connection_string + # @return [String] Primary connection string of the alias if GEO DR is + # enabled + attr_accessor :alias_primary_connection_string + + # @return [String] Secondary connection string of the alias if GEO DR is + # enabled + attr_accessor :alias_secondary_connection_string + # @return [String] A base64-encoded 256-bit primary key for signing and # validating the SAS token. attr_accessor :primary_key @@ -61,6 +68,22 @@ def self.mapper() name: 'String' } }, + alias_primary_connection_string: { + required: false, + read_only: true, + serialized_name: 'aliasPrimaryConnectionString', + type: { + name: 'String' + } + }, + alias_secondary_connection_string: { + required: false, + read_only: true, + serialized_name: 'aliasSecondaryConnectionString', + type: { + name: 'String' + } + }, primary_key: { required: false, read_only: true, diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_rights.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_rights.rb old mode 100755 new mode 100644 index 7a568a542a..9877116a3d --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_rights.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/access_rights.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/action.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/action.rb index beb16ff995..f27adeee76 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/action.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Action include MsRestAzure - include MsRest::JSONable # @return [String] SQL expression. e.g. MyProperty='ABC' attr_accessor :sql_expression diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/arm_disaster_recovery.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/arm_disaster_recovery.rb new file mode 100644 index 0000000000..ba97a15d68 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/arm_disaster_recovery.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::ARM::ServiceBus + module Models + # + # Single item in List or Get Alias(Disaster Recovery configuration) + # operation + # + class ArmDisasterRecovery < Resource + + include MsRestAzure + + # @return [ProvisioningStateDR] Provisioning state of the Alias(Disaster + # Recovery configuration) - possible values 'Accepted' or 'Succeeded' or + # 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + attr_accessor :provisioning_state + + # @return [String] Primary/Secondary eventhub namespace name, which is + # part of GEO DR pairning + attr_accessor :partner_namespace + + # @return [RoleDisasterRecovery] role of namespace in GEO DR - possible + # values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible + # values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' + attr_accessor :role + + + # + # Mapper for ArmDisasterRecovery class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ArmDisasterRecovery', + type: { + name: 'Composite', + class_name: 'ArmDisasterRecovery', + 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' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'ProvisioningStateDR' + } + }, + partner_namespace: { + required: false, + serialized_name: 'properties.partnerNamespace', + type: { + name: 'String' + } + }, + role: { + required: false, + read_only: true, + serialized_name: 'properties.role', + type: { + name: 'Enum', + module: 'RoleDisasterRecovery' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/arm_disaster_recovery_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/arm_disaster_recovery_list_result.rb new file mode 100644 index 0000000000..c7a161b3c1 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/arm_disaster_recovery_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::ARM::ServiceBus + module Models + # + # The result of the List Alias(Disaster Recovery configuration) operation. + # + class ArmDisasterRecoveryListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of Alias(Disaster Recovery + # configurations) + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of Alias(Disaster Recovery configuration) + 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 [ArmDisasterRecoveryListResult] 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 ArmDisasterRecoveryListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ArmDisasterRecoveryListResult', + type: { + name: 'Composite', + class_name: 'ArmDisasterRecoveryListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ArmDisasterRecoveryElementType', + type: { + name: 'Composite', + class_name: 'ArmDisasterRecovery' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb index c1448fb40a..276879f691 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AuthorizationRuleProperties include MsRestAzure - include MsRest::JSONable # @return [Array] The rights associated with the rule. attr_accessor :rights diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/capture_description.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/capture_description.rb new file mode 100644 index 0000000000..f78fa63870 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/capture_description.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::ARM::ServiceBus + module Models + # + # Properties to configure capture description for eventhub + # + class CaptureDescription + + include MsRestAzure + + # @return [Boolean] A value that indicates whether capture description is + # enabled. + attr_accessor :enabled + + # @return [EncodingCaptureDescription] Enumerates the possible values for + # the encoding format of capture description. Possible values include: + # 'Avro', 'AvroDeflate' + attr_accessor :encoding + + # @return [Integer] The time window allows you to set the frequency with + # which the capture to Azure Blobs will happen, value should between 60 + # to 900 seconds + attr_accessor :interval_in_seconds + + # @return [Integer] The size window defines the amount of data built up + # in your Event Hub before an capture operation, value should be between + # 10485760 and 524288000 bytes + attr_accessor :size_limit_in_bytes + + # @return [Destination] Properties of Destination where capture will be + # stored. (Storage Account, Blob Names) + attr_accessor :destination + + + # + # Mapper for CaptureDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CaptureDescription', + type: { + name: 'Composite', + class_name: 'CaptureDescription', + model_properties: { + enabled: { + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + }, + encoding: { + required: false, + serialized_name: 'encoding', + type: { + name: 'Enum', + module: 'EncodingCaptureDescription' + } + }, + interval_in_seconds: { + required: false, + serialized_name: 'intervalInSeconds', + constraints: { + InclusiveMaximum: 900, + InclusiveMinimum: 60 + }, + type: { + name: 'Number' + } + }, + size_limit_in_bytes: { + required: false, + serialized_name: 'sizeLimitInBytes', + constraints: { + InclusiveMaximum: 524288000, + InclusiveMinimum: 10485760 + }, + type: { + name: 'Number' + } + }, + destination: { + required: false, + serialized_name: 'destination', + type: { + name: 'Composite', + class_name: 'Destination' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb old mode 100755 new mode 100644 index dfdbd38953..7f2c8b7dcc --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailability include MsRestAzure - include MsRest::JSONable # @return [String] The Name to check the namespce name availability and # The namespace name can contain only letters, numbers, and hyphens. The # namespace must start with a letter, and it must end with a letter or diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb old mode 100755 new mode 100644 index 74d661138d..c2648d4331 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityResult include MsRestAzure - include MsRest::JSONable # @return [String] The detailed info regarding the reason associated with # the namespace. attr_accessor :message diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/correlation_filter.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/correlation_filter.rb index a93970fbc2..4795d39902 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/correlation_filter.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/correlation_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CorrelationFilter include MsRestAzure - include MsRest::JSONable # @return [String] Identifier of the correlation. attr_accessor :correlation_id diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/destination.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/destination.rb new file mode 100644 index 0000000000..5624dbaa47 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/destination.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::ARM::ServiceBus + module Models + # + # Capture storage details for capture description + # + class Destination + + include MsRestAzure + + # @return [String] Name for capture destination + attr_accessor :name + + # @return [String] Resource id of the storage account to be used to + # create the blobs + attr_accessor :storage_account_resource_id + + # @return [String] Blob container Name + attr_accessor :blob_container + + # @return [String] Blob naming convention for archive, e.g. + # {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + # Here all the parameters (Namespace,EventHub .. etc) are mandatory + # irrespective of order + attr_accessor :archive_name_format + + + # + # Mapper for Destination class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Destination', + type: { + name: 'Composite', + class_name: 'Destination', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + storage_account_resource_id: { + required: false, + serialized_name: 'properties.storageAccountResourceId', + type: { + name: 'String' + } + }, + blob_container: { + required: false, + serialized_name: 'properties.blobContainer', + type: { + name: 'String' + } + }, + archive_name_format: { + required: false, + serialized_name: 'properties.archiveNameFormat', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/encoding_capture_description.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/encoding_capture_description.rb new file mode 100644 index 0000000000..2b425c5987 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/encoding_capture_description.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::ARM::ServiceBus + module Models + # + # Defines values for EncodingCaptureDescription + # + module EncodingCaptureDescription + Avro = "Avro" + AvroDeflate = "AvroDeflate" + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/entity_status.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/entity_status.rb old mode 100755 new mode 100644 index 9d11923cac..16fe1fd7cd --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/entity_status.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/entity_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/error_response.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/error_response.rb index c3d5cf0afb..3cb257c252 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/error_response.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/error_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ErrorResponse include MsRestAzure - include MsRest::JSONable # @return [String] Error code. attr_accessor :code diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/event_hub_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/event_hub_list_result.rb new file mode 100644 index 0000000000..89bb4c4720 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/event_hub_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::ARM::ServiceBus + module Models + # + # The result of the List EventHubs operation. + # + class EventHubListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the List EventHubs operation. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of EventHubs. + 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 [EventHubListResult] 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 EventHubListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EventHubListResult', + type: { + name: 'Composite', + class_name: 'EventHubListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'EventhubElementType', + type: { + name: 'Composite', + class_name: 'Eventhub' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/eventhub.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/eventhub.rb new file mode 100644 index 0000000000..a7f40775db --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/eventhub.rb @@ -0,0 +1,153 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + module Models + # + # Single item in List or Get Event Hub operation + # + class Eventhub < Resource + + include MsRestAzure + + # @return [Array] Current number of shards on the Event Hub. + attr_accessor :partition_ids + + # @return [DateTime] Exact time the Event Hub was created. + attr_accessor :created_at + + # @return [DateTime] The exact time the message was updated. + attr_accessor :updated_at + + # @return [Integer] Number of days to retain the events for this Event + # Hub, value should be 1 to 7 days + attr_accessor :message_retention_in_days + + # @return [Integer] Number of partitions created for the Event Hub, + # allowed values are from 1 to 32 partitions. + attr_accessor :partition_count + + # @return [EntityStatus] Enumerates the possible values for the status of + # the Event Hub. Possible values include: 'Active', 'Disabled', + # 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + # 'Renaming', 'Unknown' + attr_accessor :status + + # @return [CaptureDescription] Properties of capture description + attr_accessor :capture_description + + + # + # Mapper for Eventhub class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Eventhub', + type: { + name: 'Composite', + class_name: 'Eventhub', + 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' + } + }, + partition_ids: { + required: false, + read_only: true, + serialized_name: 'properties.partitionIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + created_at: { + required: false, + read_only: true, + serialized_name: 'properties.createdAt', + type: { + name: 'DateTime' + } + }, + updated_at: { + required: false, + read_only: true, + serialized_name: 'properties.updatedAt', + type: { + name: 'DateTime' + } + }, + message_retention_in_days: { + required: false, + serialized_name: 'properties.messageRetentionInDays', + constraints: { + InclusiveMaximum: 7, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + partition_count: { + required: false, + serialized_name: 'properties.partitionCount', + constraints: { + InclusiveMaximum: 32, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'Enum', + module: 'EntityStatus' + } + }, + capture_description: { + required: false, + serialized_name: 'properties.captureDescription', + type: { + name: 'Composite', + class_name: 'CaptureDescription' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/filter_type.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/filter_type.rb index a989075d39..48ccfdbdaa 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/filter_type.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/filter_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/key_type.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/key_type.rb index b6e7db21b3..5b2066b921 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/key_type.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb old mode 100755 new mode 100644 index ab5ebf1045..577a9af7a3 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MessageCountDetails include MsRestAzure - include MsRest::JSONable # @return [Integer] Number of active messages in the queue, topic, or # subscription. attr_accessor :active_message_count diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation.rb old mode 100755 new mode 100644 index fcfd844ae6..a776d0a147 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] Operation name: {provider}/{resource}/{operation} attr_accessor :name diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_display.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_display.rb old mode 100755 new mode 100644 index d652ed8757..d1cbfd74d6 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_display.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable # @return [String] Service provider: Microsoft.ServiceBus attr_accessor :provider diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb old mode 100755 new mode 100644 index dacdffc814..59e398acf8 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions.rb new file mode 100644 index 0000000000..377c821dde --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions.rb @@ -0,0 +1,90 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + module Models + # + # Premium Messaging Region + # + class PremiumMessagingRegions < ResourceNamespacePatch + + include MsRestAzure + + # @return [PremiumMessagingRegionsProperties] + attr_accessor :properties + + + # + # Mapper for PremiumMessagingRegions class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PremiumMessagingRegions', + type: { + name: 'Composite', + class_name: 'PremiumMessagingRegions', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'PremiumMessagingRegionsProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_list_result.rb new file mode 100644 index 0000000000..e92ee869b9 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_list_result.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + module Models + # + # The response of the List PremiumMessagingRegions operation. + # + class PremiumMessagingRegionsListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Result of the List + # PremiumMessagingRegions type. + attr_accessor :value + + # @return [String] Link to the next set of results. Not empty if Value + # contains incomplete list of PremiumMessagingRegions. + 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 [PremiumMessagingRegionsListResult] 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 PremiumMessagingRegionsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PremiumMessagingRegionsListResult', + type: { + name: 'Composite', + class_name: 'PremiumMessagingRegionsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PremiumMessagingRegionsElementType', + type: { + name: 'Composite', + class_name: 'PremiumMessagingRegions' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_properties.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_properties.rb new file mode 100644 index 0000000000..b3ff2a6e4c --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_properties.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + module Models + # + # Model object. + # + # + class PremiumMessagingRegionsProperties + + include MsRestAzure + + # @return [String] Region code + attr_accessor :code + + # @return [String] Full name of the region + attr_accessor :full_name + + + # + # Mapper for PremiumMessagingRegionsProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PremiumMessagingRegions_properties', + type: { + name: 'Composite', + class_name: 'PremiumMessagingRegionsProperties', + model_properties: { + code: { + required: false, + read_only: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + full_name: { + required: false, + read_only: true, + serialized_name: 'fullName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/provisioning_state_dr.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/provisioning_state_dr.rb new file mode 100644 index 0000000000..3129b0ef2b --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/provisioning_state_dr.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::ARM::ServiceBus + module Models + # + # Defines values for ProvisioningStateDR + # + module ProvisioningStateDR + Accepted = "Accepted" + Succeeded = "Succeeded" + Failed = "Failed" + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb index 37a09929ce..c368c79e18 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RegenerateAccessKeyParameters include MsRestAzure - include MsRest::JSONable # @return [KeyType] The access key to regenerate. Possible values # include: 'PrimaryKey', 'SecondaryKey' attr_accessor :key_type diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/resource.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/resource.rb new file mode 100644 index 0000000000..ebc4270a1a --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/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::ARM::ServiceBus + module Models + # + # The Resource definition for other than namespace. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + + # + # Mapper for 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_service_bus/lib/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb index 1a6a5ad67e..52d1b8cd9d 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The Resource definition. # - class ResourceNamespacePatch < MsRestAzure::Resource + class ResourceNamespacePatch < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Resource location attr_accessor :location diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/role_disaster_recovery.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/role_disaster_recovery.rb new file mode 100644 index 0000000000..0407febfff --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/role_disaster_recovery.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::ARM::ServiceBus + module Models + # + # Defines values for RoleDisasterRecovery + # + module RoleDisasterRecovery + Primary = "Primary" + PrimaryNotReplicating = "PrimaryNotReplicating" + Secondary = "Secondary" + end + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule.rb index 804e193997..054c7bf752 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of Rule Resource. # - class Rule < MsRestAzure::Resource + class Rule < Resource include MsRestAzure - include MsRest::JSONable # @return [Action] Represents the filter actions which are allowed for # the transformation of a message that have been matched by a filter # expression. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule_list_result.rb index 3bdab86b4d..ab08ffe6d7 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule_list_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule.rb index f64f966e8e..ea9d3fc2f7 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a namespace authorization rule. # - class SBAuthorizationRule < MsRestAzure::Resource + class SBAuthorizationRule < Resource include MsRestAzure - include MsRest::JSONable # @return [Array] The rights associated with the rule. attr_accessor :rights diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule_list_result.rb index 9a1dc47565..16effa7253 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule_list_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbauthorization_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace.rb index 11f2f89fa9..f564407a9b 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SBNamespace < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [SBSku] Porperties of Sku attr_accessor :sku diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb index 84865ca528..60cb1ca001 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb index 772e4d0aba..3c6730d5a1 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SBNamespaceUpdateParameters < ResourceNamespacePatch include MsRestAzure - include MsRest::JSONable # @return [SBSku] Porperties of Sku attr_accessor :sku diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue.rb index c113f6ceef..c36766fd10 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of queue Resource. # - class SBQueue < MsRestAzure::Resource + class SBQueue < Resource include MsRestAzure - include MsRest::JSONable # @return [MessageCountDetails] Message Count Details. attr_accessor :count_details diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue_list_result.rb index 13dd693a7c..844cdaf74d 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue_list_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbqueue_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsku.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsku.rb index 5a82a0d4db..bb3a4a2f89 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsku.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SBSku include MsRestAzure - include MsRest::JSONable # @return [SkuName] Name of this SKU. Possible values include: 'Basic', # 'Standard', 'Premium' attr_accessor :name diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription.rb index 395f403f84..22238c5b02 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of subscription resource. # - class SBSubscription < MsRestAzure::Resource + class SBSubscription < Resource include MsRestAzure - include MsRest::JSONable # @return [Integer] Number of messages. attr_accessor :message_count diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription_list_result.rb index 6f05b095cc..02c4dd9054 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription_list_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbsubscription_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic.rb index 16b2eb261c..7b5a3e30fe 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of topic resource. # - class SBTopic < MsRestAzure::Resource + class SBTopic < Resource include MsRestAzure - include MsRest::JSONable # @return [Integer] Size of the topic, in bytes. attr_accessor :size_in_bytes diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic_list_result.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic_list_result.rb index ef36f0f02d..4a3a14404f 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic_list_result.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sbtopic_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_name.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_name.rb old mode 100755 new mode 100644 index a9925b17cd..36ac6c4a4b --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_name.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb old mode 100755 new mode 100644 index 56bf596116..52adad0024 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_filter.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_filter.rb index 9963eab557..bbf94c2939 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_filter.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_filter.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SqlFilter include MsRestAzure - include MsRest::JSONable # @return [String] The SQL expression. e.g. MyProperty='ABC' attr_accessor :sql_expression diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_rule_action.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_rule_action.rb index ccb1500d3c..20558813de 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_rule_action.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/sql_rule_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SqlRuleAction < Action include MsRestAzure - include MsRest::JSONable # # Mapper for SqlRuleAction class as Ruby Hash. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb old mode 100755 new mode 100644 index e928f7e80b..9084559c01 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,12 +8,11 @@ module Models # # The Resource definition. # - class TrackedResource < MsRestAzure::Resource + class TrackedResource < Resource include MsRestAzure - include MsRest::JSONable - # @return [String] The Geo-location where the resource live + # @return [String] The Geo-location where the resource lives attr_accessor :location # @return [Hash{String => String}] Resource tags diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb old mode 100755 new mode 100644 index 8f1fa7cb49..de03a4397d --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/module_definition.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/module_definition.rb old mode 100755 new mode 100644 index 138b248e7f..d48ff95382 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/module_definition.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/namespaces.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/namespaces.rb old mode 100755 new mode 100644 index 7973e01211..24325fce21 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/namespaces.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/namespaces.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/operations.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/operations.rb old mode 100755 new mode 100644 index cacc22db37..ec4346fb1c --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/operations.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/premium_messaging_regions_operations.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/premium_messaging_regions_operations.rb new file mode 100644 index 0000000000..6c8f870b62 --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/premium_messaging_regions_operations.rb @@ -0,0 +1,215 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + # + # Azure Service Bus client + # + class PremiumMessagingRegionsOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the PremiumMessagingRegionsOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ServiceBusManagementClient] reference to the ServiceBusManagementClient + attr_reader :client + + # + # Gets the available premium messaging regions for servicebus + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # Gets the available premium messaging regions for servicebus + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # Gets the available premium messaging regions for servicebus + # + # @param [Hash{String => String}] 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.ServiceBus/premiumMessagingRegions' + + 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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the available premium messaging regions for servicebus + # + # @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 [PremiumMessagingRegionsListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the available premium messaging regions for servicebus + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the available premium messaging regions for servicebus + # + # @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::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the available premium messaging regions for servicebus + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PremiumMessagingRegionsListResult] 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_service_bus/lib/generated/azure_mgmt_service_bus/queues.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/queues.rb old mode 100755 new mode 100644 index 78e26c5600..5fcb02761a --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/queues.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/queues.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/regions.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/regions.rb new file mode 100644 index 0000000000..117f162c2c --- /dev/null +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/regions.rb @@ -0,0 +1,220 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceBus + # + # Azure Service Bus 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 [ServiceBusManagementClient] reference to the ServiceBusManagementClient + attr_reader :client + + # + # Gets the available Regions for a given sku + # + # @param sku [String] The sku type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_sku(sku, custom_headers = nil) + first_page = list_by_sku_as_lazy(sku, custom_headers) + first_page.get_all_items + end + + # + # Gets the available Regions for a given sku + # + # @param sku [String] The sku type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_sku_with_http_info(sku, custom_headers = nil) + list_by_sku_async(sku, custom_headers).value! + end + + # + # Gets the available Regions for a given sku + # + # @param sku [String] The sku type. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_sku_async(sku, custom_headers = nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'sku is nil' if sku.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/sku/{sku}/regions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'sku' => sku}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the available Regions for a given sku + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PremiumMessagingRegionsListResult] operation results. + # + def list_by_sku_next(next_page_link, custom_headers = nil) + response = list_by_sku_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the available Regions for a given sku + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_sku_next_with_http_info(next_page_link, custom_headers = nil) + list_by_sku_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the available Regions for a given sku + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_sku_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the available Regions for a given sku + # + # @param sku [String] The sku type. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PremiumMessagingRegionsListResult] which provide lazy access to + # pages of the response. + # + def list_by_sku_as_lazy(sku, custom_headers = nil) + response = list_by_sku_async(sku, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_sku_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/rules.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/rules.rb index 386c5cde11..18a6d4949a 100644 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/rules.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb old mode 100755 new mode 100644 index b34de37758..236c0aebaa --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -42,6 +42,9 @@ class ServiceBusManagementClient < MsRestAzure::AzureServiceClient # @return [Namespaces] namespaces attr_reader :namespaces + # @return [DisasterRecoveryConfigs] disaster_recovery_configs + attr_reader :disaster_recovery_configs + # @return [Queues] queues attr_reader :queues @@ -54,6 +57,16 @@ class ServiceBusManagementClient < MsRestAzure::AzureServiceClient # @return [Rules] rules attr_reader :rules + # @return [Regions] regions + attr_reader :regions + + # @return [PremiumMessagingRegionsOperations] + # premium_messaging_regions_operations + attr_reader :premium_messaging_regions_operations + + # @return [EventHubs] event_hubs + attr_reader :event_hubs + # # Creates initializes a new instance of the ServiceBusManagementClient class. # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @@ -69,10 +82,14 @@ def initialize(credentials = nil, base_url = nil, options = nil) @operations = Operations.new(self) @namespaces = Namespaces.new(self) + @disaster_recovery_configs = DisasterRecoveryConfigs.new(self) @queues = Queues.new(self) @topics = Topics.new(self) @subscriptions = Subscriptions.new(self) @rules = Rules.new(self) + @regions = Regions.new(self) + @premium_messaging_regions_operations = PremiumMessagingRegionsOperations.new(self) + @event_hubs = EventHubs.new(self) @api_version = '2017-04-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/subscriptions.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/subscriptions.rb old mode 100755 new mode 100644 index 4855dcf7c5..3013a7b25b --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/subscriptions.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/subscriptions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/topics.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/topics.rb old mode 100755 new mode 100644 index fa2286e733..bb08467fc8 --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/topics.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/topics.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/version.rb b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/version.rb old mode 100755 new mode 100644 index 7f327b2c3a..aa94c8910f --- a/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/version.rb +++ b/management/azure_mgmt_service_bus/lib/generated/azure_mgmt_service_bus/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::ServiceBus - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_service_bus/spec/queues_spec.rb b/management/azure_mgmt_service_bus/spec/queues_spec.rb index 6ab02004f9..72166b58a4 100644 --- a/management/azure_mgmt_service_bus/spec/queues_spec.rb +++ b/management/azure_mgmt_service_bus/spec/queues_spec.rb @@ -21,7 +21,6 @@ namespace_parameters = Azure::ARM::ServiceBus::Models::SBNamespace.new namespace_parameters.location = 'westus' queue_parameters = Azure::ARM::ServiceBus::Models::SBQueue.new - queue_parameters.location = 'westus' # Create new namespace namespace = @service_bus_client.namespaces.create_or_update(@resource_group.name, namespace_name, namespace_parameters) diff --git a/management/azure_mgmt_service_fabric/.rspec b/management/azure_mgmt_service_fabric/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_service_fabric/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_service_fabric/LICENSE.txt b/management/azure_mgmt_service_fabric/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_service_fabric/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_service_fabric/Rakefile b/management/azure_mgmt_service_fabric/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_service_fabric/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_service_fabric/azure_mgmt_service_fabric.gemspec b/management/azure_mgmt_service_fabric/azure_mgmt_service_fabric.gemspec new file mode 100644 index 0000000000..8b9a9991b0 --- /dev/null +++ b/management/azure_mgmt_service_fabric/azure_mgmt_service_fabric.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_service_fabric/module_definition' +require 'generated/azure_mgmt_service_fabric/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_service_fabric' + spec.version = Azure::ARM::ServiceFabric::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Service Fabric Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Service Fabric.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_service_fabric/lib/azure_mgmt_service_fabric.rb b/management/azure_mgmt_service_fabric/lib/azure_mgmt_service_fabric.rb new file mode 100644 index 0000000000..70a6732d05 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/azure_mgmt_service_fabric.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_service_fabric' + + diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric.rb new file mode 100644 index 0000000000..fe82ea235c --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric.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. + +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 'generated/azure_mgmt_service_fabric/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::ServiceFabric + autoload :Clusters, 'generated/azure_mgmt_service_fabric/clusters.rb' + autoload :ClusterVersions, 'generated/azure_mgmt_service_fabric/cluster_versions.rb' + autoload :Operations, 'generated/azure_mgmt_service_fabric/operations.rb' + autoload :ServiceFabricManagementClient, 'generated/azure_mgmt_service_fabric/service_fabric_management_client.rb' + + module Models + autoload :ClusterUpgradePolicy, 'generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb' + autoload :ClusterVersionDetails, 'generated/azure_mgmt_service_fabric/models/cluster_version_details.rb' + autoload :DiagnosticsStorageAccountConfig, 'generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb' + autoload :ClusterCodeVersionsListResult, 'generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.rb' + autoload :AzureActiveDirectory, 'generated/azure_mgmt_service_fabric/models/azure_active_directory.rb' + autoload :SettingsParameterDescription, 'generated/azure_mgmt_service_fabric/models/settings_parameter_description.rb' + autoload :ClusterUpdateParameters, 'generated/azure_mgmt_service_fabric/models/cluster_update_parameters.rb' + autoload :EndpointRangeDescription, 'generated/azure_mgmt_service_fabric/models/endpoint_range_description.rb' + autoload :NodeTypeDescription, 'generated/azure_mgmt_service_fabric/models/node_type_description.rb' + autoload :ClientCertificateCommonName, 'generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb' + autoload :ClusterListResult, 'generated/azure_mgmt_service_fabric/models/cluster_list_result.rb' + autoload :ClusterUpgradeDeltaHealthPolicy, 'generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.rb' + autoload :AvailableOperationDisplay, 'generated/azure_mgmt_service_fabric/models/available_operation_display.rb' + autoload :CertificateDescription, 'generated/azure_mgmt_service_fabric/models/certificate_description.rb' + autoload :OperationResult, 'generated/azure_mgmt_service_fabric/models/operation_result.rb' + autoload :ClientCertificateThumbprint, 'generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.rb' + autoload :OperationListResult, 'generated/azure_mgmt_service_fabric/models/operation_list_result.rb' + autoload :ClusterCodeVersionsResult, 'generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.rb' + autoload :ErrorModelError, 'generated/azure_mgmt_service_fabric/models/error_model_error.rb' + autoload :ClusterHealthPolicy, 'generated/azure_mgmt_service_fabric/models/cluster_health_policy.rb' + autoload :ErrorModel, 'generated/azure_mgmt_service_fabric/models/error_model.rb' + autoload :SettingsSectionDescription, 'generated/azure_mgmt_service_fabric/models/settings_section_description.rb' + autoload :Resource, 'generated/azure_mgmt_service_fabric/models/resource.rb' + autoload :Cluster, 'generated/azure_mgmt_service_fabric/models/cluster.rb' + autoload :ProvisioningState, 'generated/azure_mgmt_service_fabric/models/provisioning_state.rb' + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/cluster_versions.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/cluster_versions.rb new file mode 100644 index 0000000000..9813534570 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/cluster_versions.rb @@ -0,0 +1,737 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + # + # ClusterVersions + # + class ClusterVersions + include MsRestAzure + + # + # Creates and initializes a new instance of the ClusterVersions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ServiceFabricManagementClient] reference to the ServiceFabricManagementClient + attr_reader :client + + # + # List cluster code versions by location + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @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(location, custom_headers = nil) + first_page = list_as_lazy(location, custom_headers) + first_page.get_all_items + end + + # + # List cluster code versions by location + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param custom_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(location, custom_headers = nil) + list_async(location, custom_headers).value! + end + + # + # List cluster code versions by location + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param [Hash{String => String}] 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(location, custom_headers = nil) + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, '@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.ServiceFabric/locations/{location}/clusterVersions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'location' => location,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterCodeVersionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster code versions by environment + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param environment [Enum] Cluster operating system, the default means all. + # Possible values include: 'Windows', 'Linux' + # @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_environment(location, environment, custom_headers = nil) + first_page = list_by_environment_as_lazy(location, environment, custom_headers) + first_page.get_all_items + end + + # + # List cluster code versions by environment + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param environment [Enum] Cluster operating system, the default means all. + # Possible values include: 'Windows', 'Linux' + # @param custom_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_environment_with_http_info(location, environment, custom_headers = nil) + list_by_environment_async(location, environment, custom_headers).value! + end + + # + # List cluster code versions by environment + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param environment [Enum] Cluster operating system, the default means all. + # Possible values include: 'Windows', 'Linux' + # @param [Hash{String => String}] 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_environment_async(location, environment, custom_headers = nil) + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, 'environment is nil' if environment.nil? + fail ArgumentError, '@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.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'location' => location,'environment' => environment,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterCodeVersionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster code versions by environment and version + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param environment [Enum] Cluster operating system, the default means all. + # Possible values include: 'Windows', 'Linux' + # @param cluster_version [String] The cluster code version + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterCodeVersionsResult] operation results. + # + def get(location, environment, cluster_version, custom_headers = nil) + response = get_async(location, environment, cluster_version, custom_headers).value! + response.body unless response.nil? + end + + # + # Get cluster code versions by environment and version + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param environment [Enum] Cluster operating system, the default means all. + # Possible values include: 'Windows', 'Linux' + # @param cluster_version [String] The cluster code version + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(location, environment, cluster_version, custom_headers = nil) + get_async(location, environment, cluster_version, custom_headers).value! + end + + # + # Get cluster code versions by environment and version + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param environment [Enum] Cluster operating system, the default means all. + # Possible values include: 'Windows', 'Linux' + # @param cluster_version [String] The cluster code version + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(location, environment, cluster_version, custom_headers = nil) + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, 'environment is nil' if environment.nil? + 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, 'cluster_version is nil' if cluster_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions/{clusterVersion}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'location' => location,'environment' => environment,'subscriptionId' => @client.subscription_id,'clusterVersion' => cluster_version}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterCodeVersionsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster code versions by version + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param cluster_version [String] The cluster code version + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_version(location, cluster_version, custom_headers = nil) + first_page = list_by_version_as_lazy(location, cluster_version, custom_headers) + first_page.get_all_items + end + + # + # List cluster code versions by version + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param cluster_version [String] The cluster code version + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_version_with_http_info(location, cluster_version, custom_headers = nil) + list_by_version_async(location, cluster_version, custom_headers).value! + end + + # + # List cluster code versions by version + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param cluster_version [String] The cluster code version + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_version_async(location, cluster_version, custom_headers = nil) + fail ArgumentError, 'location is nil' if location.nil? + 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, 'cluster_version is nil' if cluster_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions/{clusterVersion}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'location' => location,'subscriptionId' => @client.subscription_id,'clusterVersion' => cluster_version}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterCodeVersionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster code versions by location + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterCodeVersionsListResult] 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 + + # + # List cluster code versions by location + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # List cluster code versions by location + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterCodeVersionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster code versions by environment + # + # @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 [ClusterCodeVersionsListResult] operation results. + # + def list_by_environment_next(next_page_link, custom_headers = nil) + response = list_by_environment_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List cluster code versions by environment + # + # @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_environment_next_with_http_info(next_page_link, custom_headers = nil) + list_by_environment_next_async(next_page_link, custom_headers).value! + end + + # + # List cluster code versions by environment + # + # @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_environment_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterCodeVersionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster code versions by version + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterCodeVersionsListResult] operation results. + # + def list_by_version_next(next_page_link, custom_headers = nil) + response = list_by_version_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List cluster code versions by version + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_version_next_with_http_info(next_page_link, custom_headers = nil) + list_by_version_next_async(next_page_link, custom_headers).value! + end + + # + # List cluster code versions by version + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_version_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterCodeVersionsListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster code versions by location + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterCodeVersionsListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(location, custom_headers = nil) + response = list_async(location, 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 + + # + # List cluster code versions by environment + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param environment [Enum] Cluster operating system, the default means all. + # Possible values include: 'Windows', 'Linux' + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterCodeVersionsListResult] which provide lazy access to pages of + # the response. + # + def list_by_environment_as_lazy(location, environment, custom_headers = nil) + response = list_by_environment_async(location, environment, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_environment_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List cluster code versions by version + # + # @param location [String] The location for the cluster code versions, this is + # different from cluster location + # @param cluster_version [String] The cluster code version + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterCodeVersionsListResult] which provide lazy access to pages of + # the response. + # + def list_by_version_as_lazy(location, cluster_version, custom_headers = nil) + response = list_by_version_async(location, cluster_version, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_version_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/clusters.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/clusters.rb new file mode 100644 index 0000000000..312b10385d --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/clusters.rb @@ -0,0 +1,907 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + # + # Clusters + # + class Clusters + include MsRestAzure + + # + # Creates and initializes a new instance of the Clusters class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ServiceFabricManagementClient] reference to the ServiceFabricManagementClient + attr_reader :client + + # + # Update cluster configuration + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [ClusterUpdateParameters] The parameters which contains the + # property value and property name which used to update the cluster + # configuration + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Cluster] operation results. + # + def update(resource_group_name, cluster_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, cluster_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [ClusterUpdateParameters] The parameters which contains the + # property value and property name which used to update the cluster + # configuration + # @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, cluster_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ServiceFabric::Models::Cluster.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 + + # + # Get cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Cluster] operation results. + # + def get(resource_group_name, cluster_name, custom_headers = nil) + response = get_async(resource_group_name, cluster_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, cluster_name, custom_headers = nil) + get_async(resource_group_name, cluster_name, custom_headers).value! + end + + # + # Get cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, cluster_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cluster_name is nil' if cluster_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.ServiceFabric/clusters/{clusterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_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::ARM::ServiceFabric::Models::Cluster.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [Cluster] Put Request + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Cluster] operation results. + # + def create(resource_group_name, cluster_name, parameters, custom_headers = nil) + response = create_async(resource_group_name, cluster_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [Cluster] Put Request + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(resource_group_name, cluster_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::ServiceFabric::Models::Cluster.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 + + # + # Delete cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, cluster_name, custom_headers = nil) + response = delete_async(resource_group_name, cluster_name, custom_headers).value! + nil + end + + # + # Delete cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, cluster_name, custom_headers = nil) + delete_async(resource_group_name, cluster_name, custom_headers).value! + end + + # + # Delete cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, cluster_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cluster_name is nil' if cluster_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.ServiceFabric/clusters/{clusterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_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 + + # + # List cluster resource by resource group + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @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 cluster resource by resource group + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param custom_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 cluster resource by resource group + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param [Hash{String => String}] 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.ServiceFabric/clusters' + + 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::ARM::ServiceFabric::Models::ClusterListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster resource + # + # @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 + + # + # List cluster resource + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! + end + + # + # List cluster resource + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def 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.ServiceFabric/clusters' + + 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::ARM::ServiceFabric::Models::ClusterListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster configuration + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [ClusterUpdateParameters] The parameters which contains the + # property value and property name which used to update the cluster + # configuration + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Cluster] operation results. + # + def begin_update(resource_group_name, cluster_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Update cluster configuration + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [ClusterUpdateParameters] The parameters which contains the + # property value and property name which used to update the cluster + # configuration + # @param custom_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, cluster_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, cluster_name, parameters, custom_headers).value! + end + + # + # Update cluster configuration + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [ClusterUpdateParameters] The parameters which contains the + # property value and property name which used to update the cluster + # configuration + # @param [Hash{String => String}] 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, cluster_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ServiceFabric::Models::ClusterUpdateParameters.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.ServiceFabric/clusters/{clusterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::Cluster.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [Cluster] Put Request + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Cluster] operation results. + # + def begin_create(resource_group_name, cluster_name, parameters, custom_headers = nil) + response = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Create cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [Cluster] Put Request + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(resource_group_name, cluster_name, parameters, custom_headers = nil) + begin_create_async(resource_group_name, cluster_name, parameters, custom_headers).value! + end + + # + # Create cluster resource + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param cluster_name [String] The name of the cluster resource + # @param parameters [Cluster] Put Request + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(resource_group_name, cluster_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::ServiceFabric::Models::Cluster.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.ServiceFabric/clusters/{clusterName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::Cluster.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster resource by 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 [ClusterListResult] 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 cluster resource by 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 cluster resource by 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::ARM::ServiceFabric::Models::ClusterListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster resource + # + # @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 [ClusterListResult] 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 + + # + # List cluster resource + # + # @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 + + # + # List cluster resource + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::Models::ClusterListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 cluster resource by resource group + # + # @param resource_group_name [String] The name of the resource group to which + # the resource belongs or get created + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterListResult] 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 + + # + # List cluster resource + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ClusterListResult] 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_service_fabric/lib/generated/azure_mgmt_service_fabric/models/available_operation_display.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/available_operation_display.rb new file mode 100644 index 0000000000..31d4bcc9ad --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/available_operation_display.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::ARM::ServiceFabric + module Models + # + # Operation supported by ServiceFabric resource provider + # + class AvailableOperationDisplay + + include MsRestAzure + + # @return [String] Provider name + attr_accessor :provider + + # @return [String] Resource name + attr_accessor :resource + + # @return [String] Operation name + attr_accessor :operation + + # @return [String] Operation description + attr_accessor :description + + + # + # Mapper for AvailableOperationDisplay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableOperationDisplay', + type: { + name: 'Composite', + class_name: 'AvailableOperationDisplay', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/azure_active_directory.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/azure_active_directory.rb new file mode 100644 index 0000000000..94a2143aee --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/azure_active_directory.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::ARM::ServiceFabric + module Models + # + # The settings to enable AAD authentication on the cluster + # + class AzureActiveDirectory + + include MsRestAzure + + # @return [String] Azure active directory tenant id + attr_accessor :tenant_id + + # @return [String] Azure active directory cluster application id + attr_accessor :cluster_application + + # @return [String] Azure active directory client application id + attr_accessor :client_application + + + # + # Mapper for AzureActiveDirectory class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AzureActiveDirectory', + type: { + name: 'Composite', + class_name: 'AzureActiveDirectory', + model_properties: { + tenant_id: { + required: false, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + cluster_application: { + required: false, + serialized_name: 'clusterApplication', + type: { + name: 'String' + } + }, + client_application: { + required: false, + serialized_name: 'clientApplication', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/certificate_description.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/certificate_description.rb new file mode 100644 index 0000000000..b99bc72594 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/certificate_description.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::ARM::ServiceFabric + module Models + # + # Certificate details + # + class CertificateDescription + + include MsRestAzure + + # @return [String] Thumbprint of the primary certificate + attr_accessor :thumbprint + + # @return [String] Thumbprint of the secondary certificate + attr_accessor :thumbprint_secondary + + # @return [Enum] The local certificate store location. Possible values + # include: 'AddressBook', 'AuthRoot', 'CertificateAuthority', + # 'Disallowed', 'My', 'Root', 'TrustedPeople', 'TrustedPublisher' + attr_accessor :x509store_name + + + # + # Mapper for CertificateDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CertificateDescription', + type: { + name: 'Composite', + class_name: 'CertificateDescription', + model_properties: { + thumbprint: { + required: true, + serialized_name: 'thumbprint', + type: { + name: 'String' + } + }, + thumbprint_secondary: { + required: false, + serialized_name: 'thumbprintSecondary', + type: { + name: 'String' + } + }, + x509store_name: { + required: false, + serialized_name: 'x509StoreName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb new file mode 100644 index 0000000000..7a1c3b44be --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb @@ -0,0 +1,66 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + module Models + # + # Client certificate details using common name + # + class ClientCertificateCommonName + + include MsRestAzure + + # @return [Boolean] Is this certificate used for admin access from the + # client, if false , it is used or query only access + attr_accessor :is_admin + + # @return [String] Certificate common name to be granted access; be + # carefull using wild card common names + attr_accessor :certificate_common_name + + # @return [String] Certificate issuer thumbprint + attr_accessor :certificate_issuer_thumbprint + + + # + # Mapper for ClientCertificateCommonName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClientCertificateCommonName', + type: { + name: 'Composite', + class_name: 'ClientCertificateCommonName', + model_properties: { + is_admin: { + required: true, + serialized_name: 'isAdmin', + type: { + name: 'Boolean' + } + }, + certificate_common_name: { + required: true, + serialized_name: 'certificateCommonName', + type: { + name: 'String' + } + }, + certificate_issuer_thumbprint: { + required: true, + serialized_name: 'certificateIssuerThumbprint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.rb new file mode 100644 index 0000000000..7f3d5e8ded --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.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::ARM::ServiceFabric + module Models + # + # Client certificate details using thumbprint + # + class ClientCertificateThumbprint + + include MsRestAzure + + # @return [Boolean] Is this certificate used for admin access from the + # client, if false, it is used or query only access + attr_accessor :is_admin + + # @return [String] Certificate thumbprint + attr_accessor :certificate_thumbprint + + + # + # Mapper for ClientCertificateThumbprint class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClientCertificateThumbprint', + type: { + name: 'Composite', + class_name: 'ClientCertificateThumbprint', + model_properties: { + is_admin: { + required: true, + serialized_name: 'isAdmin', + type: { + name: 'Boolean' + } + }, + certificate_thumbprint: { + required: true, + serialized_name: 'certificateThumbprint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster.rb new file mode 100644 index 0000000000..536daa4a94 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster.rb @@ -0,0 +1,343 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + module Models + # + # The cluster resource + # + class Cluster < Resource + + include MsRestAzure + + # @return [Array] The available cluster code + # version which the cluster can upgrade to, note that you must choose + # upgradeMode to manual to upgrade to + attr_accessor :available_cluster_versions + + # @return [String] The unique identifier for the cluster resource + attr_accessor :cluster_id + + # @return [Enum] The state for the cluster. Possible values include: + # 'WaitingForNodes', 'Deploying', 'BaselineUpgrade', + # 'UpdatingUserConfiguration', 'UpdatingUserCertificate', + # 'UpdatingInfrastructure', 'EnforcingClusterVersion', + # 'UpgradeServiceUnreachable', 'AutoScale', 'Ready' + attr_accessor :cluster_state + + # @return [String] The endpoint for the cluster connecting to + # servicefabric resource provider + attr_accessor :cluster_endpoint + + # @return [String] The ServiceFabric code version running in your cluster + attr_accessor :cluster_code_version + + # @return [CertificateDescription] This primay certificate will be used + # as cluster node to node security, SSL certificate for cluster + # management endpoint and default admin client + attr_accessor :certificate + + # @return [Enum] Cluster reliability level indicates replica set size of + # system service. Possible values include: 'Bronze', 'Silver', 'Gold', + # 'Platinum' + attr_accessor :reliability_level + + # @return [Enum] Cluster upgrade mode indicates if fabric upgrade is + # initiated automatically by the system or not. Possible values include: + # 'Automatic', 'Manual' + attr_accessor :upgrade_mode + + # @return [Array] The client thumbprint + # details ,it is used for client access for cluster operation + attr_accessor :client_certificate_thumbprints + + # @return [Array] List of client + # certificates to whitelist based on common names + attr_accessor :client_certificate_common_names + + # @return [Array] List of custom fabric + # settings to configure the cluster. + attr_accessor :fabric_settings + + # @return [CertificateDescription] The server certificate used by reverse + # proxy + attr_accessor :reverse_proxy_certificate + + # @return [String] The http management endpoint of the cluster + attr_accessor :management_endpoint + + # @return [Array] The list of nodetypes that make up + # the cluster + attr_accessor :node_types + + # @return [AzureActiveDirectory] The settings to enable AAD + # authentication on the cluster + attr_accessor :azure_active_directory + + # @return [ProvisioningState] The provisioning state of the cluster + # resource. Possible values include: 'Updating', 'Succeeded', 'Failed', + # 'Canceled' + attr_accessor :provisioning_state + + # @return [String] The name of VM image VMSS has been configured with. + # Generic names such as Windows or Linux can be used. + attr_accessor :vm_image + + # @return [DiagnosticsStorageAccountConfig] The storage diagnostics + # account configuration details + attr_accessor :diagnostics_storage_account_config + + # @return [ClusterUpgradePolicy] The policy to use when upgrading the + # cluster. + attr_accessor :upgrade_description + + + # + # Mapper for Cluster class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Cluster', + type: { + name: 'Composite', + class_name: 'Cluster', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + available_cluster_versions: { + required: false, + read_only: true, + serialized_name: 'properties.availableClusterVersions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClusterVersionDetailsElementType', + type: { + name: 'Composite', + class_name: 'ClusterVersionDetails' + } + } + } + }, + cluster_id: { + required: false, + read_only: true, + serialized_name: 'properties.clusterId', + type: { + name: 'String' + } + }, + cluster_state: { + required: false, + read_only: true, + serialized_name: 'properties.clusterState', + type: { + name: 'String' + } + }, + cluster_endpoint: { + required: false, + read_only: true, + serialized_name: 'properties.clusterEndpoint', + type: { + name: 'String' + } + }, + cluster_code_version: { + required: false, + serialized_name: 'properties.clusterCodeVersion', + type: { + name: 'String' + } + }, + certificate: { + required: false, + serialized_name: 'properties.certificate', + type: { + name: 'Composite', + class_name: 'CertificateDescription' + } + }, + reliability_level: { + required: false, + serialized_name: 'properties.reliabilityLevel', + type: { + name: 'String' + } + }, + upgrade_mode: { + required: false, + serialized_name: 'properties.upgradeMode', + type: { + name: 'String' + } + }, + client_certificate_thumbprints: { + required: false, + serialized_name: 'properties.clientCertificateThumbprints', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClientCertificateThumbprintElementType', + type: { + name: 'Composite', + class_name: 'ClientCertificateThumbprint' + } + } + } + }, + client_certificate_common_names: { + required: false, + serialized_name: 'properties.clientCertificateCommonNames', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClientCertificateCommonNameElementType', + type: { + name: 'Composite', + class_name: 'ClientCertificateCommonName' + } + } + } + }, + fabric_settings: { + required: false, + serialized_name: 'properties.fabricSettings', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SettingsSectionDescriptionElementType', + type: { + name: 'Composite', + class_name: 'SettingsSectionDescription' + } + } + } + }, + reverse_proxy_certificate: { + required: false, + serialized_name: 'properties.reverseProxyCertificate', + type: { + name: 'Composite', + class_name: 'CertificateDescription' + } + }, + management_endpoint: { + required: true, + serialized_name: 'properties.managementEndpoint', + type: { + name: 'String' + } + }, + node_types: { + required: true, + serialized_name: 'properties.nodeTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NodeTypeDescriptionElementType', + type: { + name: 'Composite', + class_name: 'NodeTypeDescription' + } + } + } + }, + azure_active_directory: { + required: false, + serialized_name: 'properties.azureActiveDirectory', + type: { + name: 'Composite', + class_name: 'AzureActiveDirectory' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + vm_image: { + required: false, + serialized_name: 'properties.vmImage', + type: { + name: 'String' + } + }, + diagnostics_storage_account_config: { + required: false, + serialized_name: 'properties.diagnosticsStorageAccountConfig', + type: { + name: 'Composite', + class_name: 'DiagnosticsStorageAccountConfig' + } + }, + upgrade_description: { + required: false, + serialized_name: 'properties.upgradeDescription', + type: { + name: 'Composite', + class_name: 'ClusterUpgradePolicy' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.rb new file mode 100644 index 0000000000..74134f8c5e --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.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::ARM::ServiceFabric + module Models + # + # The list results of the ServiceFabric runtime versions + # + class ClusterCodeVersionsListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] + attr_accessor :value + + # @return [String] The URL to use for getting the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ClusterCodeVersionsListResult] 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 ClusterCodeVersionsListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterCodeVersionsListResult', + type: { + name: 'Composite', + class_name: 'ClusterCodeVersionsListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClusterCodeVersionsResultElementType', + type: { + name: 'Composite', + class_name: 'ClusterCodeVersionsResult' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.rb new file mode 100644 index 0000000000..52130c194e --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.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::ARM::ServiceFabric + module Models + # + # The result of the ServiceFabric runtime versions + # + class ClusterCodeVersionsResult + + include MsRestAzure + + # @return [String] The identification of the result + attr_accessor :id + + # @return [String] The name of the result + attr_accessor :name + + # @return [String] The result resource type + attr_accessor :type + + # @return [String] The ServiceFabric runtime version of the cluster + attr_accessor :code_version + + # @return [String] The date of expiry of support of the version + attr_accessor :support_expiry_utc + + # @return [Enum] Cluster operating system. Possible values include: + # 'Windows', 'Linux' + attr_accessor :environment + + + # + # Mapper for ClusterCodeVersionsResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterCodeVersionsResult', + type: { + name: 'Composite', + class_name: 'ClusterCodeVersionsResult', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + code_version: { + required: false, + serialized_name: 'properties.codeVersion', + type: { + name: 'String' + } + }, + support_expiry_utc: { + required: false, + serialized_name: 'properties.supportExpiryUtc', + type: { + name: 'String' + } + }, + environment: { + required: false, + serialized_name: 'properties.environment', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_health_policy.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_health_policy.rb new file mode 100644 index 0000000000..4bb7dfc3ad --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_health_policy.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::ARM::ServiceFabric + module Models + # + # Defines a health policy used to evaluate the health of the cluster or of + # a cluster node. + # + class ClusterHealthPolicy + + include MsRestAzure + + # @return [Integer] The maximum allowed percentage of unhealthy nodes + # before reporting an error. For example, to allow 10% of nodes to be + # unhealthy, this value would be 10. + attr_accessor :max_percent_unhealthy_nodes + + # @return [Integer] The maximum allowed percentage of unhealthy + # applications before reporting an error. For example, to allow 10% of + # applications to be unhealthy, this value would be 10. + attr_accessor :max_percent_unhealthy_applications + + + # + # Mapper for ClusterHealthPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterHealthPolicy', + type: { + name: 'Composite', + class_name: 'ClusterHealthPolicy', + model_properties: { + max_percent_unhealthy_nodes: { + required: false, + serialized_name: 'maxPercentUnhealthyNodes', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + max_percent_unhealthy_applications: { + required: false, + serialized_name: 'maxPercentUnhealthyApplications', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_list_result.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_list_result.rb new file mode 100644 index 0000000000..e3f641b36f --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_list_result.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::ARM::ServiceFabric + module Models + # + # Cluster list results + # + class ClusterListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] + attr_accessor :value + + # @return [String] The URL to use for getting the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [ClusterListResult] 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 ClusterListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterListResult', + type: { + name: 'Composite', + class_name: 'ClusterListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClusterElementType', + type: { + name: 'Composite', + class_name: 'Cluster' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_update_parameters.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_update_parameters.rb new file mode 100644 index 0000000000..a528bc004d --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_update_parameters.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::ARM::ServiceFabric + module Models + # + # Cluster update request + # + class ClusterUpdateParameters + + include MsRestAzure + + # @return [Enum] This level is used to set the number of replicas of the + # system services. Possible values include: 'Bronze', 'Silver', 'Gold' + attr_accessor :reliability_level + + # @return [Enum] Cluster upgrade mode indicates if fabric upgrade is + # initiated automatically by the system or not. Possible values include: + # 'Automatic', 'Manual' + attr_accessor :upgrade_mode + + # @return [String] The ServiceFabric code version, if set it, please make + # sure you have set upgradeMode to Manual, otherwise ,it will fail, if + # you are using PUT new cluster, you can get the version by using + # ClusterVersions_List, if you are updating existing cluster, you can get + # the availableClusterVersions from Clusters_Get + attr_accessor :cluster_code_version + + # @return [CertificateDescription] This primay certificate will be used + # as cluster node to node security, SSL certificate for cluster + # management endpoint and default admin client, the certificate should + # exist in the virtual machine scale sets or Azure key vault, before you + # add it. It will override original value + attr_accessor :certificate + + # @return [Array] The client thumbprint + # details, it is used for client access for cluster operation, it will + # override existing collection + attr_accessor :client_certificate_thumbprints + + # @return [Array] List of client + # certificates to whitelist based on common names. + attr_accessor :client_certificate_common_names + + # @return [Array] List of custom fabric + # settings to configure the cluster, Note, it will overwrite existing + # collection + attr_accessor :fabric_settings + + # @return [CertificateDescription] Certificate for the reverse proxy + attr_accessor :reverse_proxy_certificate + + # @return [Array] The list of nodetypes that make up + # the cluster, it will override + attr_accessor :node_types + + # @return [ClusterUpgradePolicy] The policy to use when upgrading the + # cluster. + attr_accessor :upgrade_description + + # @return [Hash{String => String}] Cluster update parameters + attr_accessor :tags + + + # + # Mapper for ClusterUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterUpdateParameters', + type: { + name: 'Composite', + class_name: 'ClusterUpdateParameters', + model_properties: { + reliability_level: { + required: false, + serialized_name: 'properties.reliabilityLevel', + type: { + name: 'String' + } + }, + upgrade_mode: { + required: false, + serialized_name: 'properties.upgradeMode', + type: { + name: 'String' + } + }, + cluster_code_version: { + required: false, + serialized_name: 'properties.clusterCodeVersion', + type: { + name: 'String' + } + }, + certificate: { + required: false, + serialized_name: 'properties.certificate', + type: { + name: 'Composite', + class_name: 'CertificateDescription' + } + }, + client_certificate_thumbprints: { + required: false, + serialized_name: 'properties.clientCertificateThumbprints', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClientCertificateThumbprintElementType', + type: { + name: 'Composite', + class_name: 'ClientCertificateThumbprint' + } + } + } + }, + client_certificate_common_names: { + required: false, + serialized_name: 'properties.clientCertificateCommonNames', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ClientCertificateCommonNameElementType', + type: { + name: 'Composite', + class_name: 'ClientCertificateCommonName' + } + } + } + }, + fabric_settings: { + required: false, + serialized_name: 'properties.fabricSettings', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SettingsSectionDescriptionElementType', + type: { + name: 'Composite', + class_name: 'SettingsSectionDescription' + } + } + } + }, + reverse_proxy_certificate: { + required: false, + serialized_name: 'properties.reverseProxyCertificate', + type: { + name: 'Composite', + class_name: 'CertificateDescription' + } + }, + node_types: { + required: false, + serialized_name: 'properties.nodeTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NodeTypeDescriptionElementType', + type: { + name: 'Composite', + class_name: 'NodeTypeDescription' + } + } + } + }, + upgrade_description: { + required: false, + serialized_name: 'properties.upgradeDescription', + type: { + name: 'Composite', + class_name: 'ClusterUpgradePolicy' + } + }, + 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_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.rb new file mode 100644 index 0000000000..fcbb4cc342 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.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::ARM::ServiceFabric + module Models + # + # Delta health policy for the cluster + # + class ClusterUpgradeDeltaHealthPolicy + + include MsRestAzure + + # @return [Integer] Additional unhealthy nodes percentage + attr_accessor :max_percent_delta_unhealthy_nodes + + # @return [Integer] Additional unhealthy nodes percentage per upgrade + # domain + attr_accessor :max_percent_upgrade_domain_delta_unhealthy_nodes + + # @return [Integer] Additional unhealthy applications percentage + attr_accessor :max_percent_delta_unhealthy_applications + + + # + # Mapper for ClusterUpgradeDeltaHealthPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterUpgradeDeltaHealthPolicy', + type: { + name: 'Composite', + class_name: 'ClusterUpgradeDeltaHealthPolicy', + model_properties: { + max_percent_delta_unhealthy_nodes: { + required: true, + serialized_name: 'maxPercentDeltaUnhealthyNodes', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + max_percent_upgrade_domain_delta_unhealthy_nodes: { + required: true, + serialized_name: 'maxPercentUpgradeDomainDeltaUnhealthyNodes', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + max_percent_delta_unhealthy_applications: { + required: true, + serialized_name: 'maxPercentDeltaUnhealthyApplications', + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb new file mode 100644 index 0000000000..55544d69b8 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb @@ -0,0 +1,141 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + module Models + # + # Cluster upgrade policy + # + class ClusterUpgradePolicy + + include MsRestAzure + + # @return [Boolean] Use the user defined upgrade policy or not + attr_accessor :override_user_upgrade_policy + + # @return [Boolean] Force node to restart or not + attr_accessor :force_restart + + # @return [String] Timeout for replica set upgrade to complete,it + # represents .Net TimeSpan + attr_accessor :upgrade_replica_set_check_timeout + + # @return [String] The length of time to wait after completing an upgrade + # domain before performing health checks, it represents .Net TimeSpan + attr_accessor :health_check_wait_duration + + # @return [String] The length of time that health checks must pass + # continuously,it represents .Net TimeSpan + attr_accessor :health_check_stable_duration + + # @return [String] The length of time that health checks can fail + # continuously,it represents .Net TimeSpan + attr_accessor :health_check_retry_timeout + + # @return [String] The upgrade timeout,it represents .Net TimeSpan + attr_accessor :upgrade_timeout + + # @return [String] The timeout for any upgrade domain,it represents .Net + # TimeSpan + attr_accessor :upgrade_domain_timeout + + # @return [ClusterHealthPolicy] Cluster health Policy + attr_accessor :health_policy + + # @return [ClusterUpgradeDeltaHealthPolicy] Delta health policy + attr_accessor :delta_health_policy + + + # + # Mapper for ClusterUpgradePolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterUpgradePolicy', + type: { + name: 'Composite', + class_name: 'ClusterUpgradePolicy', + model_properties: { + override_user_upgrade_policy: { + required: false, + serialized_name: 'overrideUserUpgradePolicy', + type: { + name: 'Boolean' + } + }, + force_restart: { + required: false, + serialized_name: 'forceRestart', + type: { + name: 'Boolean' + } + }, + upgrade_replica_set_check_timeout: { + required: true, + serialized_name: 'upgradeReplicaSetCheckTimeout', + type: { + name: 'String' + } + }, + health_check_wait_duration: { + required: true, + serialized_name: 'healthCheckWaitDuration', + type: { + name: 'String' + } + }, + health_check_stable_duration: { + required: true, + serialized_name: 'healthCheckStableDuration', + type: { + name: 'String' + } + }, + health_check_retry_timeout: { + required: true, + serialized_name: 'healthCheckRetryTimeout', + type: { + name: 'String' + } + }, + upgrade_timeout: { + required: true, + serialized_name: 'upgradeTimeout', + type: { + name: 'String' + } + }, + upgrade_domain_timeout: { + required: true, + serialized_name: 'upgradeDomainTimeout', + type: { + name: 'String' + } + }, + health_policy: { + required: true, + serialized_name: 'healthPolicy', + type: { + name: 'Composite', + class_name: 'ClusterHealthPolicy' + } + }, + delta_health_policy: { + required: false, + serialized_name: 'deltaHealthPolicy', + type: { + name: 'Composite', + class_name: 'ClusterUpgradeDeltaHealthPolicy' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_version_details.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_version_details.rb new file mode 100644 index 0000000000..07416fd2d4 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/cluster_version_details.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::ARM::ServiceFabric + module Models + # + # The detail of the ServiceFabric runtime version result + # + class ClusterVersionDetails + + include MsRestAzure + + # @return [String] The ServiceFabric runtime version of the cluster + attr_accessor :code_version + + # @return [String] The date of expiry of support of the version + attr_accessor :support_expiry_utc + + # @return [Enum] Cluster operating system. Possible values include: + # 'Windows', 'Linux' + attr_accessor :environment + + + # + # Mapper for ClusterVersionDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClusterVersionDetails', + type: { + name: 'Composite', + class_name: 'ClusterVersionDetails', + model_properties: { + code_version: { + required: false, + serialized_name: 'codeVersion', + type: { + name: 'String' + } + }, + support_expiry_utc: { + required: false, + serialized_name: 'supportExpiryUtc', + type: { + name: 'String' + } + }, + environment: { + required: false, + serialized_name: 'environment', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb new file mode 100644 index 0000000000..cd95fc7e1e --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + module Models + # + # Diagnostics storage account config + # + class DiagnosticsStorageAccountConfig + + include MsRestAzure + + # @return [String] Diagnostics storage account name + attr_accessor :storage_account_name + + # @return [String] Protected Diagnostics storage key name + attr_accessor :protected_account_key_name + + # @return [String] Diagnostics storage account blob endpoint + attr_accessor :blob_endpoint + + # @return [String] Diagnostics storage account queue endpoint + attr_accessor :queue_endpoint + + # @return [String] Diagnostics storage account table endpoint + attr_accessor :table_endpoint + + + # + # Mapper for DiagnosticsStorageAccountConfig class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiagnosticsStorageAccountConfig', + type: { + name: 'Composite', + class_name: 'DiagnosticsStorageAccountConfig', + model_properties: { + storage_account_name: { + required: true, + serialized_name: 'storageAccountName', + type: { + name: 'String' + } + }, + protected_account_key_name: { + required: true, + serialized_name: 'protectedAccountKeyName', + type: { + name: 'String' + } + }, + blob_endpoint: { + required: true, + serialized_name: 'blobEndpoint', + type: { + name: 'String' + } + }, + queue_endpoint: { + required: true, + serialized_name: 'queueEndpoint', + type: { + name: 'String' + } + }, + table_endpoint: { + required: true, + serialized_name: 'tableEndpoint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/endpoint_range_description.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/endpoint_range_description.rb new file mode 100644 index 0000000000..a5ff742d99 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/endpoint_range_description.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::ARM::ServiceFabric + module Models + # + # Port range details + # + class EndpointRangeDescription + + include MsRestAzure + + # @return [Integer] Starting port of a range of ports + attr_accessor :start_port + + # @return [Integer] End port of a range of ports + attr_accessor :end_port + + + # + # Mapper for EndpointRangeDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EndpointRangeDescription', + type: { + name: 'Composite', + class_name: 'EndpointRangeDescription', + model_properties: { + start_port: { + required: true, + serialized_name: 'startPort', + type: { + name: 'Number' + } + }, + end_port: { + required: true, + serialized_name: 'endPort', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/error_model.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/error_model.rb new file mode 100644 index 0000000000..078b4b261e --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/error_model.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::ARM::ServiceFabric + module Models + # + # The structure of the error + # + class ErrorModel + + include MsRestAzure + + # @return [ErrorModelError] The error detail + attr_accessor :error + + + # + # Mapper for ErrorModel class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorModel', + type: { + name: 'Composite', + class_name: 'ErrorModel', + model_properties: { + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'ErrorModelError' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/error_model_error.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/error_model_error.rb new file mode 100644 index 0000000000..81ad9ed8b1 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/error_model_error.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::ARM::ServiceFabric + module Models + # + # The error detail + # + class ErrorModelError + + include MsRestAzure + + # @return [String] The error code + attr_accessor :code + + # @return [String] The error message + attr_accessor :message + + + # + # Mapper for ErrorModelError class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ErrorModel_error', + type: { + name: 'Composite', + class_name: 'ErrorModelError', + model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/node_type_description.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/node_type_description.rb new file mode 100644 index 0000000000..db30587b11 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/node_type_description.rb @@ -0,0 +1,170 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + module Models + # + # Describes a node type in the cluster, each node type represents sub set + # of nodes in the cluster + # + class NodeTypeDescription + + include MsRestAzure + + # @return [String] Name of the node type + attr_accessor :name + + # @return [Hash{String => String}] The placement tags applied to nodes in + # the node type, which can be used to indicate where certain services + # (workload) should run + attr_accessor :placement_properties + + # @return [Hash{String => String}] The capacity tags applied to the nodes + # in the node type, the cluster resource manager uses these tags to + # understand how much of a resource a node has + attr_accessor :capacities + + # @return [Integer] The TCP cluster management endpoint port + attr_accessor :client_connection_endpoint_port + + # @return [Integer] The HTTP cluster management endpoint port + attr_accessor :http_gateway_endpoint_port + + # @return [Enum] Nodetype durability Level. Possible values include: + # 'Bronze', 'Silver', 'Gold' + attr_accessor :durability_level + + # @return [EndpointRangeDescription] Ports used by applications + attr_accessor :application_ports + + # @return [EndpointRangeDescription] System assgined application ports + attr_accessor :ephemeral_ports + + # @return [Boolean] Mark this as the primary node type + attr_accessor :is_primary + + # @return [Integer] The number of node instances in the node type + attr_accessor :vm_instance_count + + # @return [Integer] Endpoint used by reverse proxy + attr_accessor :reverse_proxy_endpoint_port + + + # + # Mapper for NodeTypeDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NodeTypeDescription', + type: { + name: 'Composite', + class_name: 'NodeTypeDescription', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + placement_properties: { + required: false, + serialized_name: 'placementProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + capacities: { + required: false, + serialized_name: 'capacities', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + client_connection_endpoint_port: { + required: true, + serialized_name: 'clientConnectionEndpointPort', + type: { + name: 'Number' + } + }, + http_gateway_endpoint_port: { + required: true, + serialized_name: 'httpGatewayEndpointPort', + type: { + name: 'Number' + } + }, + durability_level: { + required: false, + serialized_name: 'durabilityLevel', + type: { + name: 'String' + } + }, + application_ports: { + required: false, + serialized_name: 'applicationPorts', + type: { + name: 'Composite', + class_name: 'EndpointRangeDescription' + } + }, + ephemeral_ports: { + required: false, + serialized_name: 'ephemeralPorts', + type: { + name: 'Composite', + class_name: 'EndpointRangeDescription' + } + }, + is_primary: { + required: true, + serialized_name: 'isPrimary', + type: { + name: 'Boolean' + } + }, + vm_instance_count: { + required: true, + serialized_name: 'vmInstanceCount', + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + reverse_proxy_endpoint_port: { + required: false, + serialized_name: 'reverseProxyEndpointPort', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/operation_list_result.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/operation_list_result.rb new file mode 100644 index 0000000000..8d8d207b90 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/operation_list_result.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::ARM::ServiceFabric + module Models + # + # Result of the request to list ServiceFabric operations. It contains a + # list of operations and a URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of ServiceFabric operations + # supported by the Microsoft.ServiceFabric 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, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'OperationResultElementType', + type: { + name: 'Composite', + class_name: 'OperationResult' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/operation_result.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/operation_result.rb new file mode 100644 index 0000000000..0305df8bab --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/operation_result.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::ARM::ServiceFabric + module Models + # + # Available operation list result + # + class OperationResult + + include MsRestAzure + + # @return [String] Result name + attr_accessor :name + + # @return [AvailableOperationDisplay] Dispaly of the result + attr_accessor :display + + # @return [String] Origin result + attr_accessor :origin + + # @return [String] The URL to use for getting the next set of results. + attr_accessor :next_link + + + # + # Mapper for OperationResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationResult', + type: { + name: 'Composite', + class_name: 'OperationResult', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'AvailableOperationDisplay' + } + }, + origin: { + required: false, + serialized_name: 'origin', + type: { + name: 'String' + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/provisioning_state.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/provisioning_state.rb new file mode 100644 index 0000000000..982a93b4d9 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/provisioning_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::ARM::ServiceFabric + module Models + # + # Defines values for ProvisioningState + # + module ProvisioningState + Updating = "Updating" + Succeeded = "Succeeded" + Failed = "Failed" + Canceled = "Canceled" + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/resource.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/resource.rb new file mode 100644 index 0000000000..1f2d0e4916 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/resource.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::ARM::ServiceFabric + module Models + # + # The resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + # @return [String] Resource location. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/settings_parameter_description.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/settings_parameter_description.rb new file mode 100644 index 0000000000..15370ca557 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/settings_parameter_description.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::ARM::ServiceFabric + module Models + # + # ServiceFabric settings under sections + # + class SettingsParameterDescription + + include MsRestAzure + + # @return [String] The name of settings property + attr_accessor :name + + # @return [String] The value of the property + attr_accessor :value + + + # + # Mapper for SettingsParameterDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SettingsParameterDescription', + type: { + name: 'Composite', + class_name: 'SettingsParameterDescription', + 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_service_fabric/lib/generated/azure_mgmt_service_fabric/models/settings_section_description.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/settings_section_description.rb new file mode 100644 index 0000000000..c69227ad4a --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/models/settings_section_description.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::ARM::ServiceFabric + module Models + # + # ServiceFabric section settings + # + class SettingsSectionDescription + + include MsRestAzure + + # @return [String] The name of settings section + attr_accessor :name + + # @return [Array] Collection of settings in + # the section, each setting is a tuple consisting of setting name and + # value + attr_accessor :parameters + + + # + # Mapper for SettingsSectionDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SettingsSectionDescription', + type: { + name: 'Composite', + class_name: 'SettingsSectionDescription', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + parameters: { + required: true, + serialized_name: 'parameters', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SettingsParameterDescriptionElementType', + type: { + name: 'Composite', + class_name: 'SettingsParameterDescription' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/module_definition.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/module_definition.rb new file mode 100644 index 0000000000..c2f8ceea87 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/module_definition.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 end +module Azure::ARM end +module Azure::ARM::ServiceFabric end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/operations.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/operations.rb new file mode 100644 index 0000000000..51d3ea69c5 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/operations.rb @@ -0,0 +1,213 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::ServiceFabric + # + # Operations + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [ServiceFabricManagementClient] reference to the ServiceFabricManagementClient + attr_reader :client + + # + # Lists all of the available ServiceFabric REST API operations. + # + # @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 ServiceFabric REST API operations. + # + # @param custom_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 ServiceFabric REST API operations. + # + # @param [Hash{String => String}] 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.ServiceFabric/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 MsRest::HttpOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::ServiceFabric::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 ServiceFabric REST 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 [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 ServiceFabric REST 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_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 ServiceFabric REST 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_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::ARM::ServiceFabric::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 ServiceFabric REST API operations. + # + # @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_service_fabric/lib/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb new file mode 100644 index 0000000000..2f01b6fa12 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/service_fabric_management_client.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::ARM::ServiceFabric + # + # A service client - single point of access to the REST API. + # + class ServiceFabricManagementClient < 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] The customer subscription identifier + attr_accessor :subscription_id + + # @return [String] The version of the ServiceFabric resouce provider api + attr_reader :api_version + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Clusters] clusters + attr_reader :clusters + + # @return [ClusterVersions] cluster_versions + attr_reader :cluster_versions + + # @return [Operations] operations + attr_reader :operations + + # + # Creates initializes a new instance of the ServiceFabricManagementClient 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 + + @clusters = Clusters.new(self) + @cluster_versions = ClusterVersions.new(self) + @operations = Operations.new(self) + @api_version = '2016-09-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_service_fabric' + if defined? Azure::ARM::ServiceFabric::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::ServiceFabric::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/version.rb b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/version.rb new file mode 100644 index 0000000000..c57ed3ea78 --- /dev/null +++ b/management/azure_mgmt_service_fabric/lib/generated/azure_mgmt_service_fabric/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::ARM::ServiceFabric + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_service_fabric/spec/spec_helper.rb b/management/azure_mgmt_service_fabric/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_service_fabric/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_sql/azure_mgmt_sql.gemspec b/management/azure_mgmt_sql/azure_mgmt_sql.gemspec index eea168e8fe..10fc149b2b 100644 --- a/management/azure_mgmt_sql/azure_mgmt_sql.gemspec +++ b/management/azure_mgmt_sql/azure_mgmt_sql.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql.rb index ef58e5e377..5f659055f1 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -20,81 +20,123 @@ require 'ms_rest_azure' module Azure::ARM::SQL - autoload :Databases, 'generated/azure_mgmt_sql/databases.rb' - autoload :Servers, 'generated/azure_mgmt_sql/servers.rb' + autoload :BackupLongTermRetentionPolicies, 'generated/azure_mgmt_sql/backup_long_term_retention_policies.rb' + autoload :BackupLongTermRetentionVaults, 'generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb' + autoload :RestorePoints, 'generated/azure_mgmt_sql/restore_points.rb' autoload :RecoverableDatabases, 'generated/azure_mgmt_sql/recoverable_databases.rb' autoload :RestorableDroppedDatabases, 'generated/azure_mgmt_sql/restorable_dropped_databases.rb' autoload :Capabilities, 'generated/azure_mgmt_sql/capabilities.rb' + autoload :ServerConnectionPolicies, 'generated/azure_mgmt_sql/server_connection_policies.rb' + autoload :DatabaseThreatDetectionPolicies, 'generated/azure_mgmt_sql/database_threat_detection_policies.rb' + autoload :DataMaskingPolicies, 'generated/azure_mgmt_sql/data_masking_policies.rb' + autoload :DataMaskingRules, 'generated/azure_mgmt_sql/data_masking_rules.rb' autoload :FirewallRules, 'generated/azure_mgmt_sql/firewall_rules.rb' + autoload :GeoBackupPolicies, 'generated/azure_mgmt_sql/geo_backup_policies.rb' + autoload :Databases, 'generated/azure_mgmt_sql/databases.rb' autoload :ElasticPools, 'generated/azure_mgmt_sql/elastic_pools.rb' - autoload :Operations, 'generated/azure_mgmt_sql/operations.rb' + autoload :ReplicationLinks, 'generated/azure_mgmt_sql/replication_links.rb' autoload :ServerAzureADAdministrators, 'generated/azure_mgmt_sql/server_azure_adadministrators.rb' autoload :ServerCommunicationLinks, 'generated/azure_mgmt_sql/server_communication_links.rb' + autoload :ServiceObjectives, 'generated/azure_mgmt_sql/service_objectives.rb' + autoload :Servers, 'generated/azure_mgmt_sql/servers.rb' + autoload :ElasticPoolActivities, 'generated/azure_mgmt_sql/elastic_pool_activities.rb' + autoload :ElasticPoolDatabaseActivities, 'generated/azure_mgmt_sql/elastic_pool_database_activities.rb' autoload :RecommendedElasticPools, 'generated/azure_mgmt_sql/recommended_elastic_pools.rb' + autoload :ServiceTierAdvisors, 'generated/azure_mgmt_sql/service_tier_advisors.rb' + autoload :TransparentDataEncryptions, 'generated/azure_mgmt_sql/transparent_data_encryptions.rb' + autoload :TransparentDataEncryptionActivities, 'generated/azure_mgmt_sql/transparent_data_encryption_activities.rb' + autoload :ServerUsages, 'generated/azure_mgmt_sql/server_usages.rb' + autoload :DatabaseUsages, 'generated/azure_mgmt_sql/database_usages.rb' + autoload :DatabaseBlobAuditingPolicies, 'generated/azure_mgmt_sql/database_blob_auditing_policies.rb' + autoload :EncryptionProtectors, 'generated/azure_mgmt_sql/encryption_protectors.rb' autoload :FailoverGroups, 'generated/azure_mgmt_sql/failover_groups.rb' + autoload :Operations, 'generated/azure_mgmt_sql/operations.rb' autoload :ServerKeys, 'generated/azure_mgmt_sql/server_keys.rb' + autoload :SyncAgents, 'generated/azure_mgmt_sql/sync_agents.rb' + autoload :SyncGroups, 'generated/azure_mgmt_sql/sync_groups.rb' + autoload :SyncMembers, 'generated/azure_mgmt_sql/sync_members.rb' autoload :VirtualNetworkRules, 'generated/azure_mgmt_sql/virtual_network_rules.rb' + autoload :DatabaseOperations, 'generated/azure_mgmt_sql/database_operations.rb' autoload :SqlManagementClient, 'generated/azure_mgmt_sql/sql_management_client.rb' module Models - autoload :SqlSubResource, 'generated/azure_mgmt_sql/models/sql_sub_resource.rb' - autoload :MetricDefinition, 'generated/azure_mgmt_sql/models/metric_definition.rb' - autoload :ImportExtensionRequest, 'generated/azure_mgmt_sql/models/import_extension_request.rb' - autoload :PartnerInfo, 'generated/azure_mgmt_sql/models/partner_info.rb' - autoload :TransparentDataEncryptionActivityListResult, 'generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb' autoload :RecommendedElasticPoolListMetricsResult, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb' - autoload :ServiceTierAdvisorListResult, 'generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb' - autoload :ExportRequest, 'generated/azure_mgmt_sql/models/export_request.rb' - autoload :DatabaseListResult, 'generated/azure_mgmt_sql/models/database_list_result.rb' - autoload :RecommendedElasticPoolListResult, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb' - autoload :DatabaseUsageListResult, 'generated/azure_mgmt_sql/models/database_usage_list_result.rb' - autoload :MetricName, 'generated/azure_mgmt_sql/models/metric_name.rb' - autoload :MaxSizeCapability, 'generated/azure_mgmt_sql/models/max_size_capability.rb' - autoload :Metric, 'generated/azure_mgmt_sql/models/metric.rb' - autoload :EditionCapability, 'generated/azure_mgmt_sql/models/edition_capability.rb' - autoload :MetricListResult, 'generated/azure_mgmt_sql/models/metric_list_result.rb' - autoload :ElasticPoolPerDatabaseMaxDtuCapability, 'generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb' - autoload :MetricAvailability, 'generated/azure_mgmt_sql/models/metric_availability.rb' - autoload :ElasticPoolEditionCapability, 'generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb' + autoload :Resource, 'generated/azure_mgmt_sql/models/resource.rb' + autoload :SloUsageMetric, 'generated/azure_mgmt_sql/models/slo_usage_metric.rb' + autoload :CheckNameAvailabilityResponse, 'generated/azure_mgmt_sql/models/check_name_availability_response.rb' + autoload :RecommendedElasticPoolMetric, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb' autoload :FailoverGroupListResult, 'generated/azure_mgmt_sql/models/failover_group_list_result.rb' + autoload :ServerAdministratorListResult, 'generated/azure_mgmt_sql/models/server_administrator_list_result.rb' + autoload :RestorePointListResult, 'generated/azure_mgmt_sql/models/restore_point_list_result.rb' + autoload :FailoverGroupUpdate, 'generated/azure_mgmt_sql/models/failover_group_update.rb' + autoload :RecoverableDatabaseListResult, 'generated/azure_mgmt_sql/models/recoverable_database_list_result.rb' + autoload :ServerCommunicationLinkListResult, 'generated/azure_mgmt_sql/models/server_communication_link_list_result.rb' + autoload :RestorableDroppedDatabaseListResult, 'generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb' + autoload :SyncGroupLogListResult, 'generated/azure_mgmt_sql/models/sync_group_log_list_result.rb' + autoload :ServiceObjectiveCapability, 'generated/azure_mgmt_sql/models/service_objective_capability.rb' + autoload :ServiceObjectiveListResult, 'generated/azure_mgmt_sql/models/service_objective_list_result.rb' + autoload :ElasticPoolPerDatabaseMinDtuCapability, 'generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb' + autoload :CheckNameAvailabilityRequest, 'generated/azure_mgmt_sql/models/check_name_availability_request.rb' + autoload :ElasticPoolDtuCapability, 'generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb' + autoload :ElasticPoolEditionCapability, 'generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb' + autoload :FailoverGroupReadOnlyEndpoint, 'generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb' autoload :LocationCapabilities, 'generated/azure_mgmt_sql/models/location_capabilities.rb' - autoload :MetricDefinitionListResult, 'generated/azure_mgmt_sql/models/metric_definition_list_result.rb' - autoload :EncryptionProtectorListResult, 'generated/azure_mgmt_sql/models/encryption_protector_list_result.rb' - autoload :OperationDisplay, 'generated/azure_mgmt_sql/models/operation_display.rb' + autoload :PartnerInfo, 'generated/azure_mgmt_sql/models/partner_info.rb' + autoload :ServerListResult, 'generated/azure_mgmt_sql/models/server_list_result.rb' + autoload :SyncFullSchemaPropertiesListResult, 'generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb' autoload :FailoverGroupReadWriteEndpoint, 'generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb' - autoload :Operation, 'generated/azure_mgmt_sql/models/operation.rb' - autoload :SubResource, 'generated/azure_mgmt_sql/models/sub_resource.rb' - autoload :OperationListResult, 'generated/azure_mgmt_sql/models/operation_list_result.rb' + autoload :DataMaskingRuleListResult, 'generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb' + autoload :SyncFullSchemaTableColumn, 'generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb' autoload :FirewallRuleListResult, 'generated/azure_mgmt_sql/models/firewall_rule_list_result.rb' - autoload :ServerKeyListResult, 'generated/azure_mgmt_sql/models/server_key_list_result.rb' + autoload :SyncDatabaseIdListResult, 'generated/azure_mgmt_sql/models/sync_database_id_list_result.rb' autoload :GeoBackupPolicyListResult, 'generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb' + autoload :OperationImpact, 'generated/azure_mgmt_sql/models/operation_impact.rb' + autoload :OperationListResult, 'generated/azure_mgmt_sql/models/operation_list_result.rb' + autoload :SyncDatabaseIdProperties, 'generated/azure_mgmt_sql/models/sync_database_id_properties.rb' + autoload :ExportRequest, 'generated/azure_mgmt_sql/models/export_request.rb' + autoload :SyncAgentLinkedDatabaseListResult, 'generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb' + autoload :MetricName, 'generated/azure_mgmt_sql/models/metric_name.rb' + autoload :SyncFullSchemaTable, 'generated/azure_mgmt_sql/models/sync_full_schema_table.rb' + autoload :MetricListResult, 'generated/azure_mgmt_sql/models/metric_list_result.rb' + autoload :RecommendedElasticPoolListResult, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb' + autoload :MetricDefinition, 'generated/azure_mgmt_sql/models/metric_definition.rb' + autoload :MetricDefinitionListResult, 'generated/azure_mgmt_sql/models/metric_definition_list_result.rb' + autoload :EncryptionProtectorListResult, 'generated/azure_mgmt_sql/models/encryption_protector_list_result.rb' autoload :ReplicationLinkListResult, 'generated/azure_mgmt_sql/models/replication_link_list_result.rb' - autoload :ServerUsageListResult, 'generated/azure_mgmt_sql/models/server_usage_list_result.rb' - autoload :ResourceIdentity, 'generated/azure_mgmt_sql/models/resource_identity.rb' - autoload :RecoverableDatabaseListResult, 'generated/azure_mgmt_sql/models/recoverable_database_list_result.rb' - autoload :ServerAdministratorListResult, 'generated/azure_mgmt_sql/models/server_administrator_list_result.rb' - autoload :ServiceObjectiveCapability, 'generated/azure_mgmt_sql/models/service_objective_capability.rb' - autoload :ElasticPoolDtuCapability, 'generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb' - autoload :ElasticPoolDatabaseActivityListResult, 'generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb' - autoload :ServerCommunicationLinkListResult, 'generated/azure_mgmt_sql/models/server_communication_link_list_result.rb' - autoload :DataMaskingRuleListResult, 'generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb' + autoload :SyncAgentListResult, 'generated/azure_mgmt_sql/models/sync_agent_list_result.rb' + autoload :DatabaseOperationListResult, 'generated/azure_mgmt_sql/models/database_operation_list_result.rb' + autoload :MaxSizeCapability, 'generated/azure_mgmt_sql/models/max_size_capability.rb' + autoload :ElasticPoolListResult, 'generated/azure_mgmt_sql/models/elastic_pool_list_result.rb' + autoload :ElasticPoolPerDatabaseMaxDtuCapability, 'generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb' autoload :VirtualNetworkRuleListResult, 'generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb' - autoload :FailoverGroupReadOnlyEndpoint, 'generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb' - autoload :ServiceObjectiveListResult, 'generated/azure_mgmt_sql/models/service_objective_list_result.rb' - autoload :RestorePointListResult, 'generated/azure_mgmt_sql/models/restore_point_list_result.rb' - autoload :CheckNameAvailabilityRequest, 'generated/azure_mgmt_sql/models/check_name_availability_request.rb' - autoload :ElasticPoolPerDatabaseMinDtuCapability, 'generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb' - autoload :CheckNameAvailabilityResponse, 'generated/azure_mgmt_sql/models/check_name_availability_response.rb' + autoload :ServerUpdate, 'generated/azure_mgmt_sql/models/server_update.rb' autoload :ElasticPoolActivityListResult, 'generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb' - autoload :RecommendedElasticPoolMetric, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb' + autoload :ServerKeyListResult, 'generated/azure_mgmt_sql/models/server_key_list_result.rb' + autoload :SyncMemberListResult, 'generated/azure_mgmt_sql/models/sync_member_list_result.rb' + autoload :ImportExtensionRequest, 'generated/azure_mgmt_sql/models/import_extension_request.rb' + autoload :ElasticPoolDatabaseActivityListResult, 'generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb' + autoload :MetricValue, 'generated/azure_mgmt_sql/models/metric_value.rb' + autoload :SyncGroupListResult, 'generated/azure_mgmt_sql/models/sync_group_list_result.rb' + autoload :MetricAvailability, 'generated/azure_mgmt_sql/models/metric_availability.rb' + autoload :DatabaseListResult, 'generated/azure_mgmt_sql/models/database_list_result.rb' + autoload :SyncAgentKeyProperties, 'generated/azure_mgmt_sql/models/sync_agent_key_properties.rb' + autoload :ServiceTierAdvisorListResult, 'generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb' + autoload :EditionCapability, 'generated/azure_mgmt_sql/models/edition_capability.rb' + autoload :SyncGroupSchema, 'generated/azure_mgmt_sql/models/sync_group_schema.rb' + autoload :ResourceIdentity, 'generated/azure_mgmt_sql/models/resource_identity.rb' + autoload :TransparentDataEncryptionActivityListResult, 'generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb' + autoload :Operation, 'generated/azure_mgmt_sql/models/operation.rb' autoload :ServerUsage, 'generated/azure_mgmt_sql/models/server_usage.rb' - autoload :SloUsageMetric, 'generated/azure_mgmt_sql/models/slo_usage_metric.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_sql/models/operation_display.rb' + autoload :ServerUsageListResult, 'generated/azure_mgmt_sql/models/server_usage_list_result.rb' autoload :ServerVersionCapability, 'generated/azure_mgmt_sql/models/server_version_capability.rb' - autoload :ServerUpdate, 'generated/azure_mgmt_sql/models/server_update.rb' - autoload :RestorableDroppedDatabaseListResult, 'generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb' - autoload :ServerListResult, 'generated/azure_mgmt_sql/models/server_list_result.rb' - autoload :ElasticPoolListResult, 'generated/azure_mgmt_sql/models/elastic_pool_list_result.rb' - autoload :OperationImpact, 'generated/azure_mgmt_sql/models/operation_impact.rb' + autoload :DatabaseUsage, 'generated/azure_mgmt_sql/models/database_usage.rb' + autoload :Metric, 'generated/azure_mgmt_sql/models/metric.rb' + autoload :DatabaseUsageListResult, 'generated/azure_mgmt_sql/models/database_usage_list_result.rb' + autoload :SyncGroupLogProperties, 'generated/azure_mgmt_sql/models/sync_group_log_properties.rb' + autoload :SyncGroupSchemaTable, 'generated/azure_mgmt_sql/models/sync_group_schema_table.rb' + autoload :SyncFullSchemaProperties, 'generated/azure_mgmt_sql/models/sync_full_schema_properties.rb' + autoload :SyncGroupSchemaTableColumn, 'generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb' autoload :ProxyResource, 'generated/azure_mgmt_sql/models/proxy_resource.rb' autoload :BackupLongTermRetentionPolicy, 'generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb' autoload :BackupLongTermRetentionVault, 'generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb' @@ -110,7 +152,6 @@ module Models autoload :GeoBackupPolicy, 'generated/azure_mgmt_sql/models/geo_backup_policy.rb' autoload :ImportExportResponse, 'generated/azure_mgmt_sql/models/import_export_response.rb' autoload :ImportRequest, 'generated/azure_mgmt_sql/models/import_request.rb' - autoload :MetricValue, 'generated/azure_mgmt_sql/models/metric_value.rb' autoload :ReplicationLink, 'generated/azure_mgmt_sql/models/replication_link.rb' autoload :ServerAzureADAdministrator, 'generated/azure_mgmt_sql/models/server_azure_adadministrator.rb' autoload :ServerCommunicationLink, 'generated/azure_mgmt_sql/models/server_communication_link.rb' @@ -126,13 +167,17 @@ module Models autoload :ElasticPoolDatabaseActivity, 'generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb' autoload :DatabaseUpdate, 'generated/azure_mgmt_sql/models/database_update.rb' autoload :TransparentDataEncryptionActivity, 'generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb' - autoload :DatabaseUsage, 'generated/azure_mgmt_sql/models/database_usage.rb' autoload :DatabaseBlobAuditingPolicy, 'generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb' autoload :EncryptionProtector, 'generated/azure_mgmt_sql/models/encryption_protector.rb' autoload :FailoverGroup, 'generated/azure_mgmt_sql/models/failover_group.rb' autoload :ServerKey, 'generated/azure_mgmt_sql/models/server_key.rb' autoload :Server, 'generated/azure_mgmt_sql/models/server.rb' + autoload :SyncAgent, 'generated/azure_mgmt_sql/models/sync_agent.rb' + autoload :SyncAgentLinkedDatabase, 'generated/azure_mgmt_sql/models/sync_agent_linked_database.rb' + autoload :SyncGroup, 'generated/azure_mgmt_sql/models/sync_group.rb' + autoload :SyncMember, 'generated/azure_mgmt_sql/models/sync_member.rb' autoload :VirtualNetworkRule, 'generated/azure_mgmt_sql/models/virtual_network_rule.rb' + autoload :DatabaseOperation, 'generated/azure_mgmt_sql/models/database_operation.rb' autoload :BackupLongTermRetentionPolicyState, 'generated/azure_mgmt_sql/models/backup_long_term_retention_policy_state.rb' autoload :RestorePointType, 'generated/azure_mgmt_sql/models/restore_point_type.rb' autoload :CapabilityStatus, 'generated/azure_mgmt_sql/models/capability_status.rb' @@ -171,6 +216,16 @@ module Models autoload :ReadWriteEndpointFailoverPolicy, 'generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb' autoload :ReadOnlyEndpointFailoverPolicy, 'generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb' autoload :FailoverGroupReplicationRole, 'generated/azure_mgmt_sql/models/failover_group_replication_role.rb' + autoload :OperationOrigin, 'generated/azure_mgmt_sql/models/operation_origin.rb' autoload :IdentityType, 'generated/azure_mgmt_sql/models/identity_type.rb' + autoload :SyncAgentState, 'generated/azure_mgmt_sql/models/sync_agent_state.rb' + autoload :SyncMemberDbType, 'generated/azure_mgmt_sql/models/sync_member_db_type.rb' + autoload :SyncGroupLogType, 'generated/azure_mgmt_sql/models/sync_group_log_type.rb' + autoload :SyncConflictResolutionPolicy, 'generated/azure_mgmt_sql/models/sync_conflict_resolution_policy.rb' + autoload :SyncGroupState, 'generated/azure_mgmt_sql/models/sync_group_state.rb' + autoload :SyncDirection, 'generated/azure_mgmt_sql/models/sync_direction.rb' + autoload :SyncMemberState, 'generated/azure_mgmt_sql/models/sync_member_state.rb' + autoload :VirtualNetworkRuleState, 'generated/azure_mgmt_sql/models/virtual_network_rule_state.rb' + autoload :ManagementOperationState, 'generated/azure_mgmt_sql/models/management_operation_state.rb' end end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb new file mode 100644 index 0000000000..f1aa46fd1a --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb @@ -0,0 +1,310 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class BackupLongTermRetentionPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the BackupLongTermRetentionPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Returns a database backup long term retention policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns a database backup long term retention policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Returns a database backup long term retention policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + backup_long_term_retention_policy_name = 'Default' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'backupLongTermRetentionPolicyName' => backup_long_term_retention_policy_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a database backup long term retention policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database + # @param parameters [BackupLongTermRetentionPolicy] The required parameters to + # update a backup long term retention policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database + # @param parameters [BackupLongTermRetentionPolicy] The required parameters to + # update a backup long term retention policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates a database backup long term retention policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database + # @param parameters [BackupLongTermRetentionPolicy] The required parameters to + # update a backup long term retention policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionPolicy] operation results. + # + def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database backup long term retention policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database + # @param parameters [BackupLongTermRetentionPolicy] The required parameters to + # update a backup long term retention policy + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database backup long term retention policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database + # @param parameters [BackupLongTermRetentionPolicy] The required parameters to + # update a backup long term retention policy + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + backup_long_term_retention_policy_name = 'Default' + 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::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'backupLongTermRetentionPolicyName' => backup_long_term_retention_policy_name}, + query_params: {'api-version' => 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::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb new file mode 100644 index 0000000000..7fc975463a --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb @@ -0,0 +1,300 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class BackupLongTermRetentionVaults + include MsRestAzure + + # + # Creates and initializes a new instance of the BackupLongTermRetentionVaults class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a server backup long term retention vault + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionVault] operation results. + # + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a server backup long term retention vault + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets a server backup long term retention vault + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + backup_long_term_retention_vault_name = 'RegisteredVault' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}' + + 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,'serverName' => server_name,'backupLongTermRetentionVaultName' => backup_long_term_retention_vault_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates a server backup long term retention vault + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [BackupLongTermRetentionVault] The required parameters to + # update a backup long term retention vault + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionVault] operation results. + # + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [BackupLongTermRetentionVault] The required parameters to + # update a backup long term retention vault + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionVault.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 a server backup long term retention vault + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [BackupLongTermRetentionVault] The required parameters to + # update a backup long term retention vault + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupLongTermRetentionVault] operation results. + # + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a server backup long term retention vault + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [BackupLongTermRetentionVault] The required parameters to + # update a backup long term retention vault + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + end + + # + # Updates a server backup long term retention vault + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [BackupLongTermRetentionVault] The required parameters to + # update a backup long term retention vault + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + backup_long_term_retention_vault_name = 'RegisteredVault' + 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::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}' + + 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,'serverName' => server_name,'backupLongTermRetentionVaultName' => backup_long_term_retention_vault_name}, + query_params: {'api-version' => 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::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/capabilities.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/capabilities.rb index d1edca3db8..b8d6922ff7 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/capabilities.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/capabilities.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/data_masking_policies.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/data_masking_policies.rb new file mode 100644 index 0000000000..6e5e25cd49 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/data_masking_policies.rb @@ -0,0 +1,248 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DataMaskingPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the DataMaskingPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Creates or updates a database data masking policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DataMaskingPolicy] Parameters for creating or updating a + # data masking policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataMaskingPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database data masking policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DataMaskingPolicy] Parameters for creating or updating a + # data masking policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database data masking policy + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [DataMaskingPolicy] Parameters for creating or updating a + # data masking policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + data_masking_policy_name = 'Default' + 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::ARM::SQL::Models::DataMaskingPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DataMaskingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a database data masking policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataMaskingPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database data masking policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database data masking policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + data_masking_policy_name = 'Default' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DataMaskingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/data_masking_rules.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/data_masking_rules.rb new file mode 100644 index 0000000000..d8ecfa6394 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/data_masking_rules.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::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DataMaskingRules + include MsRestAzure + + # + # Creates and initializes a new instance of the DataMaskingRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Creates or updates a database data masking rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param data_masking_rule_name [String] The name of the data masking rule. + # @param parameters [DataMaskingRule] The required parameters for creating or + # updating a data masking rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataMaskingRule] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database data masking rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param data_masking_rule_name [String] The name of the data masking rule. + # @param parameters [DataMaskingRule] The required parameters for creating or + # updating a data masking rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database data masking rule. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param data_masking_rule_name [String] The name of the data masking rule. + # @param parameters [DataMaskingRule] The required parameters for creating or + # updating a data masking rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + data_masking_policy_name = 'Default' + fail ArgumentError, 'data_masking_rule_name is nil' if data_masking_rule_name.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::ARM::SQL::Models::DataMaskingRule.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name,'dataMaskingRuleName' => data_masking_rule_name}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DataMaskingRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DataMaskingRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of database data masking rules. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DataMaskingRuleListResult] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of database data masking rules. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a list of database data masking rules. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + data_masking_policy_name = 'Default' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules' + + 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DataMaskingRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_blob_auditing_policies.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_blob_auditing_policies.rb new file mode 100644 index 0000000000..ddd9058227 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_blob_auditing_policies.rb @@ -0,0 +1,264 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseBlobAuditingPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseBlobAuditingPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the blob + # audit policy is defined. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseBlobAuditingPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the blob + # audit policy is defined. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the blob + # audit policy is defined. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the blob + # auditing policy will be defined. + # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseBlobAuditingPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the blob + # auditing policy will be defined. + # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database's blob auditing policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the blob + # auditing policy will be defined. + # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing + # policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + blob_auditing_policy_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_operations.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_operations.rb new file mode 100644 index 0000000000..941f0f2298 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_operations.rb @@ -0,0 +1,335 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseOperations + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseOperations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Cancels the asynchronous operation on the database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param operation_id The operation identifier. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def cancel(resource_group_name, server_name, database_name, operation_id, custom_headers = nil) + response = cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers).value! + nil + end + + # + # Cancels the asynchronous operation on the database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param operation_id The operation 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 cancel_with_http_info(resource_group_name, server_name, database_name, operation_id, custom_headers = nil) + cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers).value! + end + + # + # Cancels the asynchronous operation on the database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param operation_id The operation 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 cancel_async(resource_group_name, server_name, database_name, operation_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'operation_id is nil' if operation_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2017-03-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a list of operations performed on the database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of operations performed on the database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a list of operations performed on the database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2017-03-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/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,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseOperationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of operations performed on the database. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseOperationListResult] operation results. + # + def list_by_database_next(next_page_link, custom_headers = nil) + response = list_by_database_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of operations performed on the database. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_next_with_http_info(next_page_link, custom_headers = nil) + list_by_database_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of operations performed on the database. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseOperationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of operations performed on the database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseOperationListResult] which provide lazy access to pages of + # the response. + # + def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_database_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_threat_detection_policies.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_threat_detection_policies.rb new file mode 100644 index 0000000000..745a3004ab --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_threat_detection_policies.rb @@ -0,0 +1,264 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseThreatDetectionPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseThreatDetectionPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a database's threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which database + # Threat Detection policy is defined. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseSecurityAlertPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which database + # Threat Detection policy is defined. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database's threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which database + # Threat Detection policy is defined. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + security_alert_policy_name = 'default' + api_version = '2014-04-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'securityAlertPolicyName' => security_alert_policy_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a database's threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which database + # Threat Detection policy is defined. + # @param parameters [DatabaseSecurityAlertPolicy] The database Threat Detection + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseSecurityAlertPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database's threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which database + # Threat Detection policy is defined. + # @param parameters [DatabaseSecurityAlertPolicy] The database Threat Detection + # policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database's threat detection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which database + # Threat Detection policy is defined. + # @param parameters [DatabaseSecurityAlertPolicy] The database Threat Detection + # policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + security_alert_policy_name = 'default' + fail ArgumentError, 'parameters is nil' if parameters.nil? + api_version = '2014-04-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'securityAlertPolicyName' => security_alert_policy_name}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_usages.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_usages.rb new file mode 100644 index 0000000000..8c7dcc86d1 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/database_usages.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::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class DatabaseUsages + include MsRestAzure + + # + # Creates and initializes a new instance of the DatabaseUsages class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Returns database usages. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DatabaseUsageListResult] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns database usages. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Returns database usages. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages' + + 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,'serverName' => server_name,'databaseName' => database_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::DatabaseUsageListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/databases.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/databases.rb index eeea5f1c3e..5d30110ce2 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/databases.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/databases.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -25,124 +25,73 @@ def initialize(client) attr_reader :client # - # Returns a database backup long term retention policy + # Imports a bacpac into a new database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. + # @param parameters [ImportRequest] The required parameters for importing a + # Bacpac into a database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupLongTermRetentionPolicy] operation results. + # @return [ImportExportResponse] operation results. # - def get_backup_long_term_retention_policy(resource_group_name, server_name, database_name, custom_headers = nil) - response = get_backup_long_term_retention_policy_async(resource_group_name, server_name, database_name, custom_headers).value! + def import(resource_group_name, server_name, parameters, custom_headers = nil) + response = import_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end - # - # Returns a database backup long term retention policy # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. + # @param parameters [ImportRequest] The required parameters for importing a + # Bacpac into a database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_backup_long_term_retention_policy_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - get_backup_long_term_retention_policy_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Returns a database backup long term retention policy - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def get_backup_long_term_retention_policy_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - backup_long_term_retention_policy_name = 'Default' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}' - - 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,'serverName' => server_name,'databaseName' => database_name,'backupLongTermRetentionPolicyName' => backup_long_term_retention_policy_name}, - query_params: {'api-version' => 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 + def import_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_import_async(resource_group_name, server_name, parameters, custom_headers) - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::ImportExportResponse.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) end - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # - # Creates or updates a database backup long term retention policy + # Creates an import operation that imports a bacpac into an existing database. + # The existing database must be empty. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database - # @param parameters [BackupLongTermRetentionPolicy] The required parameters to - # update a backup long term retention policy + # @param database_name [String] The name of the database to import into + # @param parameters [ImportExtensionRequest] The required parameters for + # importing a Bacpac into a database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupLongTermRetentionPolicy] operation results. + # @return [ImportExportResponse] operation results. # - def create_or_update_long_term_retention_policy(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_or_update_long_term_retention_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def create_import_operation(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end @@ -151,23 +100,23 @@ def create_or_update_long_term_retention_policy(resource_group_name, server_name # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database - # @param parameters [BackupLongTermRetentionPolicy] The required parameters to - # update a backup long term retention policy + # @param database_name [String] The name of the database to import into + # @param parameters [ImportExtensionRequest] The required parameters for + # importing a Bacpac into a database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_long_term_retention_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + def create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) # Send request - promise = begin_create_or_update_long_term_retention_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers) + promise = begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::ImportExportResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end @@ -179,167 +128,118 @@ def create_or_update_long_term_retention_policy_async(resource_group_name, serve end # - # Gets a list of database restore points. + # Exports a database to a bacpac. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to get available - # restore points. + # @param database_name [String] The name of the database to be exported. + # @param parameters [ExportRequest] The required parameters for exporting a + # database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RestorePointListResult] operation results. + # @return [ImportExportResponse] operation results. # - def list_restore_points(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_restore_points_async(resource_group_name, server_name, database_name, custom_headers).value! + def export(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! response.body unless response.nil? end - # - # Gets a list of database restore points. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to get available - # restore points. + # @param database_name [String] The name of the database to be exported. + # @param parameters [ExportRequest] The required parameters for exporting a + # database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_restore_points_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_restore_points_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Gets a list of database restore points. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to get available - # restore points. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def list_restore_points_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => 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 + def export_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers) - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::RestorePointListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::ImportExportResponse.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) end - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # - # Gets a database's threat detection policy. + # Returns database metrics. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which database - # Threat Detection policy is defined. + # @param database_name [String] The name of the database. + # @param filter [String] An OData filter expression that describes a subset of + # metrics to return. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DatabaseSecurityAlertPolicy] operation results. + # @return [MetricListResult] operation results. # - def get_threat_detection_policy(resource_group_name, server_name, database_name, custom_headers = nil) - response = get_threat_detection_policy_async(resource_group_name, server_name, database_name, custom_headers).value! + def list_metrics(resource_group_name, server_name, database_name, filter, custom_headers = nil) + response = list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers).value! response.body unless response.nil? end # - # Gets a database's threat detection policy. + # Returns database metrics. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which database - # Threat Detection policy is defined. + # @param database_name [String] The name of the database. + # @param filter [String] An OData filter expression that describes a subset of + # metrics to return. # @param custom_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_threat_detection_policy_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - get_threat_detection_policy_async(resource_group_name, server_name, database_name, custom_headers).value! + def list_metrics_with_http_info(resource_group_name, server_name, database_name, filter, custom_headers = nil) + list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers).value! end # - # Gets a database's threat detection policy. + # Returns database metrics. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which database - # Threat Detection policy is defined. + # @param database_name [String] The name of the database. + # @param filter [String] An OData filter expression that describes a subset of + # metrics to return. # @param [Hash{String => String}] 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_threat_detection_policy_async(resource_group_name, server_name, database_name, custom_headers = nil) + def list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers = nil) + api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? - security_alert_policy_name = 'default' - api_version = '2014-04-01' + fail ArgumentError, 'filter is nil' if filter.nil? request_headers = {} @@ -347,14 +247,14 @@ def get_threat_detection_policy_async(resource_group_name, server_name, database # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics' 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,'serverName' => server_name,'databaseName' => database_name,'securityAlertPolicyName' => security_alert_policy_name}, - query_params: {'api-version' => api_version}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name}, + query_params: {'api-version' => api_version,'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -374,7 +274,7 @@ def get_threat_detection_policy_async(resource_group_name, server_name, database if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::MetricListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -388,70 +288,59 @@ def get_threat_detection_policy_async(resource_group_name, server_name, database end # - # Creates or updates a database's threat detection policy. + # Returns database metric definitions. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which database - # Threat Detection policy is defined. - # @param parameters [DatabaseSecurityAlertPolicy] The database Threat Detection - # policy. + # @param database_name [String] The name of the database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DatabaseSecurityAlertPolicy] operation results. + # @return [MetricDefinitionListResult] operation results. # - def create_or_update_threat_detection_policy(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_or_update_threat_detection_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def list_metric_definitions(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers).value! response.body unless response.nil? end # - # Creates or updates a database's threat detection policy. + # Returns database metric definitions. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which database - # Threat Detection policy is defined. - # @param parameters [DatabaseSecurityAlertPolicy] The database Threat Detection - # policy. + # @param database_name [String] The name of the database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_threat_detection_policy_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - create_or_update_threat_detection_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def list_metric_definitions_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers).value! end # - # Creates or updates a database's threat detection policy. + # Returns database metric definitions. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which database - # Threat Detection policy is defined. - # @param parameters [DatabaseSecurityAlertPolicy] The database Threat Detection - # policy. + # @param database_name [String] The name of the database. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_threat_detection_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + def list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? - security_alert_policy_name = 'default' - fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2014-04-01' request_headers = {} @@ -459,33 +348,24 @@ def create_or_update_threat_detection_policy_async(resource_group_name, server_n # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions' 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,'serverName' => server_name,'databaseName' => database_name,'securityAlertPolicyName' => security_alert_policy_name}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name}, query_params: {'api-version' => 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 = @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 || status_code == 201 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -495,17 +375,7 @@ def create_or_update_threat_detection_policy_async(resource_group_name, server_n if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseSecurityAlertPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::MetricDefinitionListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -519,2332 +389,252 @@ def create_or_update_threat_detection_policy_async(resource_group_name, server_n end # - # Creates or updates a database data masking policy + # Pauses a data warehouse. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param parameters [DataMaskingPolicy] Parameters for creating or updating a - # data masking policy. + # @param database_name [String] The name of the data warehouse to pause. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DataMaskingPolicy] operation results. - # - def create_or_update_data_masking_policy(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_or_update_data_masking_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - response.body unless response.nil? + def pause(resource_group_name, server_name, database_name, custom_headers = nil) + response = pause_async(resource_group_name, server_name, database_name, custom_headers).value! + nil end - # - # Creates or updates a database data masking policy # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param parameters [DataMaskingPolicy] Parameters for creating or updating a - # data masking policy. + # @param database_name [String] The name of the data warehouse to pause. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def create_or_update_data_masking_policy_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - create_or_update_data_masking_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - end - - # - # Creates or updates a database data masking policy - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param parameters [DataMaskingPolicy] Parameters for creating or updating a - # data masking policy. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def create_or_update_data_masking_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - data_masking_policy_name = 'Default' - 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::ARM::SQL::Models::DataMaskingPolicy.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}' - - 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name}, - query_params: {'api-version' => api_version}, - body: request_content, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:put, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DataMaskingPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets a database data masking policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataMaskingPolicy] operation results. - # - def get_data_masking_policy(resource_group_name, server_name, database_name, custom_headers = nil) - response = get_data_masking_policy_async(resource_group_name, server_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a database data masking policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_data_masking_policy_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - get_data_masking_policy_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Gets a database data masking policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_data_masking_policy_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - data_masking_policy_name = 'Default' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}' - - 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DataMaskingPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Creates or updates a database data masking rule. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param data_masking_rule_name [String] The name of the data masking rule. - # @param parameters [DataMaskingRule] The required parameters for creating or - # updating a data masking rule. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataMaskingRule] operation results. - # - def create_or_update_data_masking_rule(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) - response = create_or_update_data_masking_rule_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # Creates or updates a database data masking rule. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param data_masking_rule_name [String] The name of the data masking rule. - # @param parameters [DataMaskingRule] The required parameters for creating or - # updating a data masking rule. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def create_or_update_data_masking_rule_with_http_info(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) - create_or_update_data_masking_rule_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers).value! - end - - # - # Creates or updates a database data masking rule. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param data_masking_rule_name [String] The name of the data masking rule. - # @param parameters [DataMaskingRule] The required parameters for creating or - # updating a data masking rule. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def create_or_update_data_masking_rule_async(resource_group_name, server_name, database_name, data_masking_rule_name, parameters, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - data_masking_policy_name = 'Default' - fail ArgumentError, 'data_masking_rule_name is nil' if data_masking_rule_name.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::ARM::SQL::Models::DataMaskingRule.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}' - - 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name,'dataMaskingRuleName' => data_masking_rule_name}, - query_params: {'api-version' => api_version}, - body: request_content, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:put, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 || status_code == 201 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DataMaskingRule.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DataMaskingRule.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets a list of database data masking rules. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DataMaskingRuleListResult] operation results. - # - def list_data_masking_rules(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_data_masking_rules_async(resource_group_name, server_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a list of database data masking rules. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_data_masking_rules_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_data_masking_rules_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Gets a list of database data masking rules. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_data_masking_rules_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - data_masking_policy_name = 'Default' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules' - - 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,'serverName' => server_name,'databaseName' => database_name,'dataMaskingPolicyName' => data_masking_policy_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DataMaskingRuleListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Updates a database geo backup policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param parameters [GeoBackupPolicy] The required parameters for creating or - # updating the geo backup policy. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [GeoBackupPolicy] operation results. - # - def create_or_update_geo_backup_policy(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_or_update_geo_backup_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # Updates a database geo backup policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param parameters [GeoBackupPolicy] The required parameters for creating or - # updating the geo backup policy. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def create_or_update_geo_backup_policy_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - create_or_update_geo_backup_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - end - - # - # Updates a database geo backup policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param parameters [GeoBackupPolicy] The required parameters for creating or - # updating the geo backup policy. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def create_or_update_geo_backup_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - geo_backup_policy_name = 'Default' - 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::ARM::SQL::Models::GeoBackupPolicy.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}' - - 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,'serverName' => server_name,'databaseName' => database_name,'geoBackupPolicyName' => geo_backup_policy_name}, - query_params: {'api-version' => api_version}, - body: request_content, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:put, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 201 || status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets a geo backup policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [GeoBackupPolicy] operation results. - # - def get_geo_backup_policy(resource_group_name, server_name, database_name, custom_headers = nil) - response = get_geo_backup_policy_async(resource_group_name, server_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a geo backup policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_geo_backup_policy_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - get_geo_backup_policy_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Gets a geo backup policy. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_geo_backup_policy_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - geo_backup_policy_name = 'Default' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}' - - 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,'serverName' => server_name,'databaseName' => database_name,'geoBackupPolicyName' => geo_backup_policy_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 a list of geo backup policies. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [GeoBackupPolicyListResult] operation results. - # - def list_geo_backup_policies(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_geo_backup_policies_async(resource_group_name, server_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns a list of geo backup policies. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_geo_backup_policies_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_geo_backup_policies_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Returns a list of geo backup policies. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_geo_backup_policies_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies' - - 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,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicyListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Imports a bacpac into a new database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [ImportRequest] The required parameters for importing a - # Bacpac into a database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ImportExportResponse] operation results. - # - def import(resource_group_name, server_name, parameters, custom_headers = nil) - response = import_async(resource_group_name, server_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [ImportRequest] The required parameters for importing a - # Bacpac into a database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def import_async(resource_group_name, server_name, parameters, custom_headers = nil) - # Send request - promise = begin_import_async(resource_group_name, server_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::ImportExportResponse.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 an import operation that imports a bacpac into an existing database. - # The existing database must be empty. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to import into - # @param parameters [ImportExtensionRequest] The required parameters for - # importing a Bacpac into a database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ImportExportResponse] operation results. - # - def create_import_operation(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to import into - # @param parameters [ImportExtensionRequest] The required parameters for - # importing a Bacpac into a database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - # Send request - promise = begin_create_import_operation_async(resource_group_name, server_name, database_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::ImportExportResponse.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 - - # - # Exports a database to a bacpac. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be exported. - # @param parameters [ExportRequest] The required parameters for exporting a - # database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ImportExportResponse] operation results. - # - def export(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = export_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be exported. - # @param parameters [ExportRequest] The required parameters for exporting a - # database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def export_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - # Send request - promise = begin_export_async(resource_group_name, server_name, database_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::ImportExportResponse.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 - - # - # Returns database metrics. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param filter [String] An OData filter expression that describes a subset of - # metrics to return. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MetricListResult] operation results. - # - def list_metrics(resource_group_name, server_name, database_name, filter, custom_headers = nil) - response = list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns database metrics. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param filter [String] An OData filter expression that describes a subset of - # metrics to return. - # @param custom_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_metrics_with_http_info(resource_group_name, server_name, database_name, filter, custom_headers = nil) - list_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers).value! - end - - # - # Returns database metrics. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param filter [String] An OData filter expression that describes a subset of - # metrics to return. - # @param [Hash{String => String}] 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_metrics_async(resource_group_name, server_name, database_name, filter, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - fail ArgumentError, 'filter is nil' if filter.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics' - - 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,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version,'$filter' => filter}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::MetricListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 database metric definitions. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MetricDefinitionListResult] operation results. - # - def list_metric_definitions(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns database metric definitions. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_metric_definitions_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Returns database metric definitions. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_metric_definitions_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions' - - 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,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::MetricDefinitionListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Deletes a database replication link. Cannot be done during failover. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be dropped. - # @param link_id [String] The ID of the replication link to be deleted. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def delete_replication_link(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - response = delete_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - nil - end - - # - # Deletes a database replication link. Cannot be done during failover. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be dropped. - # @param link_id [String] The ID of the replication link to be deleted. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def delete_replication_link_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - delete_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - end - - # - # Deletes a database replication link. Cannot be done during failover. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be dropped. - # @param link_id [String] The ID of the replication link to be deleted. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def delete_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}' - - 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:delete, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 || status_code == 204 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result - end - - promise.execute - end - - # - # Gets a database replication link. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to get the link for. - # @param link_id [String] The replication link ID to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ReplicationLink] operation results. - # - def get_replication_link(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - response = get_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a database replication link. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to get the link for. - # @param link_id [String] The replication link ID to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_replication_link_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - get_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - end - - # - # Gets a database replication link. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to get the link for. - # @param link_id [String] The replication link ID to be retrieved. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}' - - 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ReplicationLink.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Sets which replica database is primary by failing over from the current - # primary replica database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - def failover_replication_link(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - response = failover_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - nil - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @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 failover_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - # Send request - promise = begin_failover_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Sets which replica database is primary by failing over from the current - # primary replica database. This operation might result in data loss. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - def failover_replication_link_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - response = failover_replication_link_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - nil - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @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 failover_replication_link_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - # Send request - promise = begin_failover_replication_link_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Lists a database's replication links. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to retrieve links for. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ReplicationLinkListResult] operation results. - # - def list_replication_links(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_replication_links_async(resource_group_name, server_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Lists a database's replication links. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to retrieve links for. - # @param custom_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_replication_links_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_replication_links_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Lists a database's replication links. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to retrieve links for. - # @param [Hash{String => String}] 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_replication_links_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks' - - 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,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ReplicationLinkListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Pauses a data warehouse. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the data warehouse to pause. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - def pause(resource_group_name, server_name, database_name, custom_headers = nil) - response = pause_async(resource_group_name, server_name, database_name, custom_headers).value! - nil - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the data warehouse to pause. - # @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 pause_async(resource_group_name, server_name, database_name, custom_headers = nil) - # Send request - promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Resumes a data warehouse. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the data warehouse to resume. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - def resume(resource_group_name, server_name, database_name, custom_headers = nil) - response = resume_async(resource_group_name, server_name, database_name, custom_headers).value! - nil - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the data warehouse to resume. - # @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 resume_async(resource_group_name, server_name, database_name, custom_headers = nil) - # Send request - promise = begin_resume_async(resource_group_name, server_name, database_name, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Creates a new database or updates an existing database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be operated on - # (updated or created). - # @param parameters [Database] The required parameters for creating or updating - # a database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Database] operation results. - # - def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be operated on - # (updated or created). - # @param parameters [Database] The required parameters for creating or updating - # a database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::Database.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 database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be updated. - # @param parameters [DatabaseUpdate] The required parameters for updating a - # database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Database] operation results. - # - def update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be updated. - # @param parameters [DatabaseUpdate] The required parameters for updating a - # database. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - # Send request - promise = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::Database.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Deletes a database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be deleted. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def delete(resource_group_name, server_name, database_name, custom_headers = nil) - response = delete_async(resource_group_name, server_name, database_name, custom_headers).value! - nil - end - - # - # Deletes a database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be deleted. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def delete_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - delete_async(resource_group_name, server_name, database_name, custom_headers).value! - end - - # - # Deletes a database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be deleted. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def delete_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' - - 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,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:delete, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 || status_code == 204 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result - end - - promise.execute - end - - # - # Gets a database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be retrieved. - # @param expand [String] A comma separated list of child objects to expand in - # the response. Possible properties: serviceTierAdvisors, - # transparentDataEncryption. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Database] operation results. - # - def get(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) - response = get_async(resource_group_name, server_name, database_name, expand, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be retrieved. - # @param expand [String] A comma separated list of child objects to expand in - # the response. Possible properties: serviceTierAdvisors, - # transparentDataEncryption. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_with_http_info(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) - get_async(resource_group_name, server_name, database_name, expand, custom_headers).value! - end - - # - # Gets a database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database to be retrieved. - # @param expand [String] A comma separated list of child objects to expand in - # the response. Possible properties: serviceTierAdvisors, - # transparentDataEncryption. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_async(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' - - 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,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version,'$expand' => expand}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::Database.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 a list of databases in a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param expand [String] A comma separated list of child objects to expand in - # the response. Possible properties: serviceTierAdvisors, - # transparentDataEncryption. - # @param filter [String] An OData filter expression that describes a subset of - # databases to return. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DatabaseListResult] operation results. - # - def list_by_server(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) - response = list_by_server_async(resource_group_name, server_name, expand, filter, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns a list of databases in a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param expand [String] A comma separated list of child objects to expand in - # the response. Possible properties: serviceTierAdvisors, - # transparentDataEncryption. - # @param filter [String] An OData filter expression that describes a subset of - # databases to return. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_server_with_http_info(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) - list_by_server_async(resource_group_name, server_name, expand, filter, custom_headers).value! - end - - # - # Returns a list of databases in a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param expand [String] A comma separated list of child objects to expand in - # the response. Possible properties: serviceTierAdvisors, - # transparentDataEncryption. - # @param filter [String] An OData filter expression that describes a subset of - # databases to return. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_server_async(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases' - - 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,'serverName' => server_name}, - query_params: {'api-version' => api_version,'$expand' => expand,'$filter' => filter}, - 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 + def pause_async(resource_group_name, server_name, database_name, custom_headers = nil) + # Send request + promise = begin_pause_async(resource_group_name, server_name, database_name, custom_headers) - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| end - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # - # Gets a service tier advisor. + # Resumes a data warehouse. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of database. - # @param service_tier_advisor_name [String] The name of service tier advisor. + # @param database_name [String] The name of the data warehouse to resume. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServiceTierAdvisor] operation results. - # - def get_service_tier_advisor(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) - response = get_service_tier_advisor_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers).value! - response.body unless response.nil? + def resume(resource_group_name, server_name, database_name, custom_headers = nil) + response = resume_async(resource_group_name, server_name, database_name, custom_headers).value! + nil end - # - # Gets a service tier advisor. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of database. - # @param service_tier_advisor_name [String] The name of service tier advisor. + # @param database_name [String] The name of the data warehouse to resume. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def get_service_tier_advisor_with_http_info(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) - get_service_tier_advisor_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers).value! + def resume_async(resource_group_name, server_name, database_name, custom_headers = nil) + # Send request + promise = begin_resume_async(resource_group_name, server_name, database_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise end # - # Gets a service tier advisor. + # Creates a new database or updates an existing database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of database. - # @param service_tier_advisor_name [String] The name of service tier advisor. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. + # @param database_name [String] The name of the database to be operated on + # (updated or created). + # @param parameters [Database] The required parameters for creating or updating + # a database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # @return [Database] operation results. # - def get_service_tier_advisor_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - fail ArgumentError, 'service_tier_advisor_name is nil' if service_tier_advisor_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors/{serviceTierAdvisorName}' - - 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,'serverName' => server_name,'databaseName' => database_name,'serviceTierAdvisorName' => service_tier_advisor_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServiceTierAdvisor.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? end - # - # Returns service tier advisors for specified database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of database. + # @param database_name [String] The name of the database to be operated on + # (updated or created). + # @param parameters [Database] The required parameters for creating or updating + # a database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServiceTierAdvisorListResult] operation results. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def list_service_tier_advisors(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_service_tier_advisors_async(resource_group_name, server_name, database_name, custom_headers).value! - response.body unless response.nil? + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::Database.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 # - # Returns service tier advisors for specified database. + # Updates an existing database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of database. + # @param database_name [String] The name of the database to be updated. + # @param parameters [DatabaseUpdate] The required parameters for updating a + # database. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [Database] operation results. # - def list_service_tier_advisors_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_service_tier_advisors_async(resource_group_name, server_name, database_name, custom_headers).value! + def update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? end - # - # Returns service tier advisors for specified database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of database. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. + # @param database_name [String] The name of the database to be updated. + # @param parameters [DatabaseUpdate] The required parameters for updating a + # database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def list_service_tier_advisors_async(resource_group_name, server_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors' - - 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,'serverName' => server_name,'databaseName' => database_name}, - query_params: {'api-version' => 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 + def update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers) - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServiceTierAdvisorListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::Database.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) end - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # - # Creates or updates a database's transparent data encryption configuration. + # Deletes a database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which setting the - # transparent data encryption applies. - # @param parameters [TransparentDataEncryption] The required parameters for - # creating or updating transparent data encryption. + # @param database_name [String] The name of the database to be deleted. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [TransparentDataEncryption] operation results. # - def create_or_update_transparent_data_encryption_configuration(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_or_update_transparent_data_encryption_configuration_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! - response.body unless response.nil? + def delete(resource_group_name, server_name, database_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, custom_headers).value! + nil end # - # Creates or updates a database's transparent data encryption configuration. + # Deletes a database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which setting the - # transparent data encryption applies. - # @param parameters [TransparentDataEncryption] The required parameters for - # creating or updating transparent data encryption. + # @param database_name [String] The name of the database to be deleted. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_transparent_data_encryption_configuration_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - create_or_update_transparent_data_encryption_configuration_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def delete_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + delete_async(resource_group_name, server_name, database_name, custom_headers).value! end # - # Creates or updates a database's transparent data encryption configuration. + # Deletes a database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which setting the - # transparent data encryption applies. - # @param parameters [TransparentDataEncryption] The required parameters for - # creating or updating transparent data encryption. + # @param database_name [String] The name of the database to be deleted. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_transparent_data_encryption_configuration_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + def delete_async(resource_group_name, server_name, database_name, custom_headers = nil) api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? - transparent_data_encryption_name = 'current' - fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} @@ -2852,58 +642,29 @@ def create_or_update_transparent_data_encryption_configuration_async(resource_gr # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::SQL::Models::TransparentDataEncryption.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' 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,'serverName' => server_name,'databaseName' => database_name,'transparentDataEncryptionName' => transparent_data_encryption_name}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name}, query_params: {'api-version' => 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 = @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 == 201 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryption.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryption.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -2912,63 +673,68 @@ def create_or_update_transparent_data_encryption_configuration_async(resource_gr end # - # Gets a database's transparent data encryption configuration. + # Gets a database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the - # transparent data encryption applies. + # @param database_name [String] The name of the database to be retrieved. + # @param expand [String] A comma separated list of child objects to expand in + # the response. Possible properties: serviceTierAdvisors, + # transparentDataEncryption. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [TransparentDataEncryption] operation results. + # @return [Database] operation results. # - def get_transparent_data_encryption_configuration(resource_group_name, server_name, database_name, custom_headers = nil) - response = get_transparent_data_encryption_configuration_async(resource_group_name, server_name, database_name, custom_headers).value! + def get(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, expand, custom_headers).value! response.body unless response.nil? end # - # Gets a database's transparent data encryption configuration. + # Gets a database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the - # transparent data encryption applies. + # @param database_name [String] The name of the database to be retrieved. + # @param expand [String] A comma separated list of child objects to expand in + # the response. Possible properties: serviceTierAdvisors, + # transparentDataEncryption. # @param custom_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_transparent_data_encryption_configuration_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - get_transparent_data_encryption_configuration_async(resource_group_name, server_name, database_name, custom_headers).value! + def get_with_http_info(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, expand, custom_headers).value! end # - # Gets a database's transparent data encryption configuration. + # Gets a database. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the - # transparent data encryption applies. + # @param database_name [String] The name of the database to be retrieved. + # @param expand [String] A comma separated list of child objects to expand in + # the response. Possible properties: serviceTierAdvisors, + # transparentDataEncryption. # @param [Hash{String => String}] 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_transparent_data_encryption_configuration_async(resource_group_name, server_name, database_name, custom_headers = nil) + def get_async(resource_group_name, server_name, database_name, expand = nil, custom_headers = nil) api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? - transparent_data_encryption_name = 'current' request_headers = {} @@ -2976,14 +742,14 @@ def get_transparent_data_encryption_configuration_async(resource_group_name, ser # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' 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,'serverName' => server_name,'databaseName' => database_name,'transparentDataEncryptionName' => transparent_data_encryption_name}, - query_params: {'api-version' => api_version}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name}, + query_params: {'api-version' => api_version,'$expand' => expand}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -3003,7 +769,7 @@ def get_transparent_data_encryption_configuration_async(resource_group_name, ser if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryption.mapper() + result_mapper = Azure::ARM::SQL::Models::Database.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -3017,63 +783,70 @@ def get_transparent_data_encryption_configuration_async(resource_group_name, ser end # - # Returns a database's transparent data encryption operation result. + # Returns a list of databases in a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the - # transparent data encryption applies. + # @param expand [String] A comma separated list of child objects to expand in + # the response. Possible properties: serviceTierAdvisors, + # transparentDataEncryption. + # @param filter [String] An OData filter expression that describes a subset of + # databases to return. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [TransparentDataEncryptionActivityListResult] operation results. + # @return [DatabaseListResult] operation results. # - def list_transparent_data_encryption_activity(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_transparent_data_encryption_activity_async(resource_group_name, server_name, database_name, custom_headers).value! + def list_by_server(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, expand, filter, custom_headers).value! response.body unless response.nil? end # - # Returns a database's transparent data encryption operation result. + # Returns a list of databases in a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the - # transparent data encryption applies. + # @param expand [String] A comma separated list of child objects to expand in + # the response. Possible properties: serviceTierAdvisors, + # transparentDataEncryption. + # @param filter [String] An OData filter expression that describes a subset of + # databases to return. # @param custom_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_transparent_data_encryption_activity_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_transparent_data_encryption_activity_async(resource_group_name, server_name, database_name, custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, expand, filter, custom_headers).value! end # - # Returns a database's transparent data encryption operation result. + # Returns a list of databases in a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the - # transparent data encryption applies. + # @param expand [String] A comma separated list of child objects to expand in + # the response. Possible properties: serviceTierAdvisors, + # transparentDataEncryption. + # @param filter [String] An OData filter expression that describes a subset of + # databases to return. # @param [Hash{String => String}] 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_transparent_data_encryption_activity_async(resource_group_name, server_name, database_name, custom_headers = nil) + def list_by_server_async(resource_group_name, server_name, expand = nil, filter = nil, custom_headers = nil) api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - transparent_data_encryption_name = 'current' request_headers = {} @@ -3081,14 +854,14 @@ def list_transparent_data_encryption_activity_async(resource_group_name, server_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases' 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,'serverName' => server_name,'databaseName' => database_name,'transparentDataEncryptionName' => transparent_data_encryption_name}, - query_params: {'api-version' => api_version}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name}, + query_params: {'api-version' => api_version,'$expand' => expand,'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -3108,7 +881,7 @@ def list_transparent_data_encryption_activity_async(resource_group_name, server_ if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryptionActivityListResult.mapper() + result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -3122,58 +895,65 @@ def list_transparent_data_encryption_activity_async(resource_group_name, server_ end # - # Returns database usages. + # Gets a database inside of an elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. + # @param elastic_pool_name [String] The name of the elastic pool to be + # retrieved. + # @param database_name [String] The name of the database to be retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DatabaseUsageListResult] operation results. + # @return [Database] operation results. # - def list_usages(resource_group_name, server_name, database_name, custom_headers = nil) - response = list_usages_async(resource_group_name, server_name, database_name, custom_headers).value! + def get_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) + response = get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value! response.body unless response.nil? end # - # Returns database usages. + # Gets a database inside of an elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. + # @param elastic_pool_name [String] The name of the elastic pool to be + # retrieved. + # @param database_name [String] The name of the database to be retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_usages_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - list_usages_async(resource_group_name, server_name, database_name, custom_headers).value! + def get_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) + get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value! end # - # Returns database usages. + # Gets a database inside of an elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database. + # @param elastic_pool_name [String] The name of the elastic pool to be + # retrieved. + # @param database_name [String] The name of the database to be retrieved. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_usages_async(resource_group_name, server_name, database_name, custom_headers = nil) + def get_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? @@ -3182,13 +962,13 @@ def list_usages_async(resource_group_name, server_name, database_name, custom_he # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}' 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,'serverName' => server_name,'databaseName' => database_name}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'elasticPoolName' => elastic_pool_name,'databaseName' => database_name}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -3209,7 +989,7 @@ def list_usages_async(resource_group_name, server_name, database_name, custom_he if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseUsageListResult.mapper() + result_mapper = Azure::ARM::SQL::Models::Database.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -3223,63 +1003,62 @@ def list_usages_async(resource_group_name, server_name, database_name, custom_he end # - # Gets a database's blob auditing policy. + # Returns a list of databases in an elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # audit policy is defined. + # @param elastic_pool_name [String] The name of the elastic pool to be + # retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DatabaseBlobAuditingPolicy] operation results. + # @return [DatabaseListResult] operation results. # - def get_blob_auditing_policy(resource_group_name, server_name, database_name, custom_headers = nil) - response = get_blob_auditing_policy_async(resource_group_name, server_name, database_name, custom_headers).value! + def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! response.body unless response.nil? end # - # Gets a database's blob auditing policy. + # Returns a list of databases in an elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # audit policy is defined. + # @param elastic_pool_name [String] The name of the elastic pool to be + # retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_blob_auditing_policy_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) - get_blob_auditing_policy_async(resource_group_name, server_name, database_name, custom_headers).value! + def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! end # - # Gets a database's blob auditing policy. + # Returns a list of databases in an elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # audit policy is defined. + # @param elastic_pool_name [String] The name of the elastic pool to be + # retrieved. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_blob_auditing_policy_async(resource_group_name, server_name, database_name, custom_headers = nil) + def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - blob_auditing_policy_name = 'default' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' + fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? request_headers = {} @@ -3287,13 +1066,13 @@ def get_blob_auditing_policy_async(resource_group_name, server_name, database_na # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'elasticPoolName' => elastic_pool_name}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -3314,7 +1093,7 @@ def get_blob_auditing_policy_async(resource_group_name, server_name, database_na if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -3328,70 +1107,66 @@ def get_blob_auditing_policy_async(resource_group_name, server_name, database_na end # - # Creates or updates a database's blob auditing policy. + # Gets a database inside of a recommented elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # auditing policy will be defined. - # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing - # policy. + # @param recommended_elastic_pool_name [String] The name of the elastic pool to + # be retrieved. + # @param database_name [String] The name of the database to be retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DatabaseBlobAuditingPolicy] operation results. + # @return [Database] operation results. # - def create_or_update_blob_auditing_policy(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = create_or_update_blob_auditing_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def get_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) + response = get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value! response.body unless response.nil? end # - # Creates or updates a database's blob auditing policy. + # Gets a database inside of a recommented elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # auditing policy will be defined. - # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing - # policy. + # @param recommended_elastic_pool_name [String] The name of the elastic pool to + # be retrieved. + # @param database_name [String] The name of the database to be retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_blob_auditing_policy_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - create_or_update_blob_auditing_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def get_by_recommended_elastic_pool_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) + get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value! end # - # Creates or updates a database's blob auditing policy. + # Gets a database inside of a recommented elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database for which the blob - # auditing policy will be defined. - # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing - # policy. + # @param recommended_elastic_pool_name [String] The name of the elastic pool to + # be retrieved. + # @param database_name [String] The name of the database to be retrieved. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_blob_auditing_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + def get_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'recommended_elastic_pool_name is nil' if recommended_elastic_pool_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? - blob_auditing_policy_name = 'default' - fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' request_headers = {} @@ -3399,33 +1174,24 @@ def create_or_update_blob_auditing_policy_async(resource_group_name, server_name # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'recommendedElasticPoolName' => recommended_elastic_pool_name,'databaseName' => database_name}, query_params: {'api-version' => 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 = @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 || status_code == 201 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -3435,17 +1201,7 @@ def create_or_update_blob_auditing_policy_async(resource_group_name, server_name if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseBlobAuditingPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::Database.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -3459,67 +1215,62 @@ def create_or_update_blob_auditing_policy_async(resource_group_name, server_name end # - # Creates or updates a database backup long term retention policy + # Returns a list of databases inside a recommented elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database - # @param parameters [BackupLongTermRetentionPolicy] The required parameters to - # update a backup long term retention policy + # @param recommended_elastic_pool_name [String] The name of the recommended + # elastic pool to be retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupLongTermRetentionPolicy] operation results. + # @return [DatabaseListResult] operation results. # - def begin_create_or_update_long_term_retention_policy(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - response = begin_create_or_update_long_term_retention_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def list_by_recommended_elastic_pool(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + response = list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! response.body unless response.nil? end # - # Creates or updates a database backup long term retention policy + # Returns a list of databases inside a recommented elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database - # @param parameters [BackupLongTermRetentionPolicy] The required parameters to - # update a backup long term retention policy + # @param recommended_elastic_pool_name [String] The name of the recommended + # elastic pool to be retrieved. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_create_or_update_long_term_retention_policy_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) - begin_create_or_update_long_term_retention_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + def list_by_recommended_elastic_pool_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) + list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! end # - # Creates or updates a database backup long term retention policy + # Returns a list of databases inside a recommented elastic pool. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database - # @param parameters [BackupLongTermRetentionPolicy] The required parameters to - # update a backup long term retention policy + # @param recommended_elastic_pool_name [String] The name of the recommended + # elastic pool to be retrieved. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_create_or_update_long_term_retention_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + def list_by_recommended_elastic_pool_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - backup_long_term_retention_policy_name = 'Default' - fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'recommended_elastic_pool_name is nil' if recommended_elastic_pool_name.nil? request_headers = {} @@ -3527,33 +1278,24 @@ def begin_create_or_update_long_term_retention_policy_async(resource_group_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases' 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,'serverName' => server_name,'databaseName' => database_name,'backupLongTermRetentionPolicyName' => backup_long_term_retention_policy_name}, + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'recommendedElasticPoolName' => recommended_elastic_pool_name}, query_params: {'api-version' => 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 = @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 || status_code == 201 || status_code == 202 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -3563,17 +1305,7 @@ def begin_create_or_update_long_term_retention_policy_async(resource_group_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -3937,206 +1669,6 @@ def begin_export_async(resource_group_name, server_name, database_name, paramete promise.execute end - # - # Sets which replica database is primary by failing over from the current - # primary replica database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def begin_failover_replication_link(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - response = begin_failover_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - nil - end - - # - # Sets which replica database is primary by failing over from the current - # primary replica database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param custom_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_failover_replication_link_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - begin_failover_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - end - - # - # Sets which replica database is primary by failing over from the current - # primary replica database. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param [Hash{String => String}] 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_failover_replication_link_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover' - - 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, - query_params: {'api-version' => 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 || status_code == 202 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result - end - - promise.execute - end - - # - # Sets which replica database is primary by failing over from the current - # primary replica database. This operation might result in data loss. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def begin_failover_replication_link_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - response = begin_failover_replication_link_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - nil - end - - # - # Sets which replica database is primary by failing over from the current - # primary replica database. This operation might result in data loss. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param custom_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_failover_replication_link_allow_data_loss_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - begin_failover_replication_link_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! - end - - # - # Sets which replica database is primary by failing over from the current - # primary replica database. This operation might result in data loss. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param database_name [String] The name of the database that has the - # replication link to be failed over. - # @param link_id [String] The ID of the replication link to be failed over. - # @param [Hash{String => String}] 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_failover_replication_link_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss' - - 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, - query_params: {'api-version' => 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 || status_code == 202 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result - end - - promise.execute - end - # # Pauses a data warehouse. # diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pool_activities.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pool_activities.rb new file mode 100644 index 0000000000..34849af5a0 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pool_activities.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::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ElasticPoolActivities + include MsRestAzure + + # + # Creates and initializes a new instance of the ElasticPoolActivities class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Returns elastic pool activities. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param elastic_pool_name [String] The name of the elastic pool for which to + # get the current activity. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ElasticPoolActivityListResult] operation results. + # + def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns elastic pool activities. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param elastic_pool_name [String] The name of the elastic pool for which to + # get the current activity. + # @param custom_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_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! + end + + # + # Returns elastic pool activities. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param elastic_pool_name [String] The name of the elastic pool for which to + # get the current activity. + # @param [Hash{String => String}] 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_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity' + + 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,'serverName' => server_name,'elasticPoolName' => elastic_pool_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ElasticPoolActivityListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pool_database_activities.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pool_database_activities.rb new file mode 100644 index 0000000000..0844d715d1 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pool_database_activities.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::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ElasticPoolDatabaseActivities + include MsRestAzure + + # + # Creates and initializes a new instance of the ElasticPoolDatabaseActivities class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Returns activity on databases inside of an elastic pool. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param elastic_pool_name [String] The name of the elastic pool. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ElasticPoolDatabaseActivityListResult] operation results. + # + def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns activity on databases inside of an elastic pool. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param elastic_pool_name [String] The name of the elastic pool. + # @param custom_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_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! + end + + # + # Returns activity on databases inside of an elastic pool. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param elastic_pool_name [String] The name of the elastic pool. + # @param [Hash{String => String}] 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_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity' + + 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,'serverName' => server_name,'elasticPoolName' => elastic_pool_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ElasticPoolDatabaseActivityListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pools.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pools.rb index 4542a80593..2fd14512b3 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pools.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/elastic_pools.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -630,423 +630,6 @@ def list_by_server_async(resource_group_name, server_name, custom_headers = nil) promise.execute end - # - # Returns elastic pool activities. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool for which to - # get the current activity. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ElasticPoolActivityListResult] operation results. - # - def list_activity(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - response = list_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns elastic pool activities. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool for which to - # get the current activity. - # @param custom_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_activity_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - list_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! - end - - # - # Returns elastic pool activities. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool for which to - # get the current activity. - # @param [Hash{String => String}] 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_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity' - - 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,'serverName' => server_name,'elasticPoolName' => elastic_pool_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ElasticPoolActivityListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 activity on databases inside of an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ElasticPoolDatabaseActivityListResult] operation results. - # - def list_database_activity(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - response = list_database_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns activity on databases inside of an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool. - # @param custom_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_database_activity_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - list_database_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! - end - - # - # Returns activity on databases inside of an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool. - # @param [Hash{String => String}] 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_database_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity' - - 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,'serverName' => server_name,'elasticPoolName' => elastic_pool_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ElasticPoolDatabaseActivityListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets a database inside of an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool to be - # retrieved. - # @param database_name [String] The name of the database to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Database] operation results. - # - def get_database(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) - response = get_database_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a database inside of an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool to be - # retrieved. - # @param database_name [String] The name of the database to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_database_with_http_info(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) - get_database_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value! - end - - # - # Gets a database inside of an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool to be - # retrieved. - # @param database_name [String] The name of the database to be retrieved. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_database_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}' - - 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,'serverName' => server_name,'elasticPoolName' => elastic_pool_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::Database.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 a list of databases in an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool to be - # retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DatabaseListResult] operation results. - # - def list_databases(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - response = list_databases_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns a list of databases in an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool to be - # retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_databases_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - list_databases_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value! - end - - # - # Returns a list of databases in an elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param elastic_pool_name [String] The name of the elastic pool to be - # retrieved. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_databases_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases' - - 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,'serverName' => server_name,'elasticPoolName' => elastic_pool_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 elastic pool or updates an existing elastic pool. # diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/encryption_protectors.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/encryption_protectors.rb new file mode 100644 index 0000000000..efcbe0ded4 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/encryption_protectors.rb @@ -0,0 +1,498 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class EncryptionProtectors + include MsRestAzure + + # + # Creates and initializes a new instance of the EncryptionProtectors class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of server encryption protectors + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a list of server encryption protectors + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets a list of server encryption protectors + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::EncryptionProtectorListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a server encryption protector. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EncryptionProtector] operation results. + # + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a server encryption protector. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets a server encryption protector. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + encryption_protector_name = 'current' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'encryptionProtectorName' => encryption_protector_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::EncryptionProtector.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 encryption protector. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [EncryptionProtector] The requested encryption protector + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EncryptionProtector] operation results. + # + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [EncryptionProtector] The requested encryption protector + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::EncryptionProtector.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 encryption protector. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [EncryptionProtector] The requested encryption protector + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EncryptionProtector] operation results. + # + def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an existing encryption protector. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [EncryptionProtector] The requested encryption protector + # resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + end + + # + # Updates an existing encryption protector. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [EncryptionProtector] The requested encryption protector + # resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + encryption_protector_name = 'current' + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::EncryptionProtector.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'encryptionProtectorName' => encryption_protector_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::EncryptionProtector.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of server encryption protectors + # + # @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 [EncryptionProtectorListResult] operation results. + # + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of server encryption protectors + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a list of server encryption protectors + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_server_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::EncryptionProtectorListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a list of server encryption protectors + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EncryptionProtectorListResult] which provide lazy access to pages of + # the response. + # + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_server_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/failover_groups.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/failover_groups.rb index 5f67f6d0ac..0dd6aba295 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/failover_groups.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/failover_groups.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -235,7 +235,7 @@ def delete_async(resource_group_name, server_name, failover_group_name, custom_h # @param server_name [String] The name of the server containing the failover # group. # @param failover_group_name [String] The name of the failover group. - # @param parameters [FailoverGroup] The failover group parameters. + # @param parameters [FailoverGroupUpdate] The failover group parameters. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -253,7 +253,7 @@ def update(resource_group_name, server_name, failover_group_name, parameters, cu # @param server_name [String] The name of the server containing the failover # group. # @param failover_group_name [String] The name of the failover group. - # @param parameters [FailoverGroup] The failover group parameters. + # @param parameters [FailoverGroupUpdate] The failover group parameters. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -708,7 +708,7 @@ def begin_delete_async(resource_group_name, server_name, failover_group_name, cu # @param server_name [String] The name of the server containing the failover # group. # @param failover_group_name [String] The name of the failover group. - # @param parameters [FailoverGroup] The failover group parameters. + # @param parameters [FailoverGroupUpdate] The failover group parameters. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -728,7 +728,7 @@ def begin_update(resource_group_name, server_name, failover_group_name, paramete # @param server_name [String] The name of the server containing the failover # group. # @param failover_group_name [String] The name of the failover group. - # @param parameters [FailoverGroup] The failover group parameters. + # @param parameters [FailoverGroupUpdate] The failover group parameters. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -747,7 +747,7 @@ def begin_update_with_http_info(resource_group_name, server_name, failover_group # @param server_name [String] The name of the server containing the failover # group. # @param failover_group_name [String] The name of the failover group. - # @param parameters [FailoverGroup] The failover group parameters. + # @param parameters [FailoverGroupUpdate] The failover group parameters. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -771,7 +771,7 @@ def begin_update_async(resource_group_name, server_name, failover_group_name, pa request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::SQL::Models::FailoverGroup.mapper() + request_mapper = Azure::ARM::SQL::Models::FailoverGroupUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/firewall_rules.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/firewall_rules.rb index 72d649801f..d01392b03a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/firewall_rules.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/firewall_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/geo_backup_policies.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/geo_backup_policies.rb new file mode 100644 index 0000000000..30172015fb --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/geo_backup_policies.rb @@ -0,0 +1,359 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class GeoBackupPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the GeoBackupPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Updates a database geo backup policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [GeoBackupPolicy] The required parameters for creating or + # updating the geo backup policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GeoBackupPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a database geo backup policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [GeoBackupPolicy] The required parameters for creating or + # updating the geo backup policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Updates a database geo backup policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param parameters [GeoBackupPolicy] The required parameters for creating or + # updating the geo backup policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + geo_backup_policy_name = 'Default' + 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::ARM::SQL::Models::GeoBackupPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'geoBackupPolicyName' => geo_backup_policy_name}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a geo backup policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GeoBackupPolicy] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a geo backup policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a geo backup policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + geo_backup_policy_name = 'Default' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'geoBackupPolicyName' => geo_backup_policy_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a list of geo backup policies. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [GeoBackupPolicyListResult] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns a list of geo backup policies. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Returns a list of geo backup policies. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies' + + 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,'serverName' => server_name,'databaseName' => database_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::GeoBackupPolicyListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/authentication_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/authentication_type.rb index e295f2c18b..ad775412dc 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/authentication_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/authentication_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb index 1456346f7f..d57c516d93 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BackupLongTermRetentionPolicy < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The geo-location where the resource lives attr_accessor :location diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_state.rb index aaaf296683..2e94ba00f3 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb index 74bc278afc..4cfeda5287 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BackupLongTermRetentionVault < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The geo-location where the resource lives attr_accessor :location diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb index 1edc819a7b..f8181e3ee8 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/capability_status.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/capability_status.rb index 372aa758bb..b6cca73fff 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/capability_status.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/capability_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_reason.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_reason.rb index 60949b2804..1f2b732a6c 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_reason.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_request.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_request.rb index 5549d43667..b59b2b2c93 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_request.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CheckNameAvailabilityRequest include MsRestAzure - include MsRest::JSONable # @return [String] The name whose availability is to be checked. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_response.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_response.rb index a3e36a3f39..b3836ed591 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_response.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/check_name_availability_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CheckNameAvailabilityResponse include MsRestAzure - include MsRest::JSONable # @return [Boolean] True if the name is available, otherwise false. attr_accessor :available diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/create_mode.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/create_mode.rb index a463924610..fc6158af19 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/create_mode.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/create_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_function.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_function.rb index 38cf3b55c1..e24ae26924 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_function.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_function.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_policy.rb index d374656f6a..ca06c4a5fb 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DataMaskingPolicy < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [DataMaskingState] The state of the data masking policy. # Possible values include: 'Disabled', 'Enabled' attr_accessor :data_masking_state diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule.rb index a61e20d957..03a1eff1cf 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DataMaskingRule < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The rule Id. attr_accessor :data_masking_rule_id diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb index 38e9017dc2..34580a92c4 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DataMaskingRuleListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of database data masking # rules. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_state.rb index 9871e13347..5eefbcb787 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_rule_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_state.rb index c20a13d5db..64489bf991 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/data_masking_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database.rb index dbfd9de1a0..9160c85e54 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Database < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [String] Kind of database. This is metadata used for the Azure # portal experience. attr_accessor :kind diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb index f6b836777a..e38aadda18 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DatabaseBlobAuditingPolicy < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] Resource kind. attr_accessor :kind diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_edition.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_edition.rb index 01b5f14dcc..134b29dbdb 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_edition.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_edition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_list_result.rb index 4544008936..f5f2e2eb76 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DatabaseListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of databases housed in the server. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_operation.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_operation.rb new file mode 100644 index 0000000000..a06285f762 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_operation.rb @@ -0,0 +1,182 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # A database operation. + # + class DatabaseOperation < ProxyResource + + include MsRestAzure + + # @return [String] The name of the database the operation is being + # performed on. + attr_accessor :database_name + + # @return [String] The name of operation. + attr_accessor :operation + + # @return [String] The friendly name of operation. + attr_accessor :operation_friendly_name + + # @return [Integer] The percentage of the operation completed. + attr_accessor :percent_complete + + # @return [String] The name of the server. + attr_accessor :server_name + + # @return [DateTime] The operation start time. + attr_accessor :start_time + + # @return [ManagementOperationState] The operation state. Possible values + # include: 'Pending', 'InProgress', 'Succeeded', 'Failed', + # 'CancelInProgress', 'Cancelled' + attr_accessor :state + + # @return [Integer] The operation error code. + attr_accessor :error_code + + # @return [String] The operation error description. + attr_accessor :error_description + + # @return [Integer] The operation error severity. + attr_accessor :error_severity + + # @return [Boolean] Whether or not the error is a user error. + attr_accessor :is_user_error + + + # + # Mapper for DatabaseOperation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DatabaseOperation', + type: { + name: 'Composite', + class_name: 'DatabaseOperation', + 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' + } + }, + database_name: { + required: false, + read_only: true, + serialized_name: 'properties.databaseName', + type: { + name: 'String' + } + }, + operation: { + required: false, + read_only: true, + serialized_name: 'properties.operation', + type: { + name: 'String' + } + }, + operation_friendly_name: { + required: false, + read_only: true, + serialized_name: 'properties.operationFriendlyName', + type: { + name: 'String' + } + }, + percent_complete: { + required: false, + read_only: true, + serialized_name: 'properties.percentComplete', + type: { + name: 'Number' + } + }, + server_name: { + required: false, + read_only: true, + serialized_name: 'properties.serverName', + type: { + name: 'String' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + error_code: { + required: false, + read_only: true, + serialized_name: 'properties.errorCode', + type: { + name: 'Number' + } + }, + error_description: { + required: false, + read_only: true, + serialized_name: 'properties.errorDescription', + type: { + name: 'String' + } + }, + error_severity: { + required: false, + read_only: true, + serialized_name: 'properties.errorSeverity', + type: { + name: 'Number' + } + }, + is_user_error: { + required: false, + read_only: true, + serialized_name: 'properties.isUserError', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_operation_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_operation_list_result.rb new file mode 100644 index 0000000000..07a3ea875f --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_operation_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::ARM::SQL + module Models + # + # The response to a list database operations request + # + class DatabaseOperationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [DatabaseOperationListResult] 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 DatabaseOperationListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DatabaseOperationListResult', + type: { + name: 'Composite', + class_name: 'DatabaseOperationListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DatabaseOperationElementType', + type: { + name: 'Composite', + class_name: 'DatabaseOperation' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_security_alert_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_security_alert_policy.rb index 738f8a9d19..c3b2fd994d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_security_alert_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_security_alert_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DatabaseSecurityAlertPolicy < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The geo-location where the resource lives attr_accessor :location diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_update.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_update.rb index 276961efe2..e1871fc470 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_update.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_update.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Represents a database update. # - class DatabaseUpdate < MsRestAzure::Resource + class DatabaseUpdate < Resource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags. attr_accessor :tags diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage.rb index 7cb27b2e97..07d5c50b17 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # The database usages. # - class DatabaseUsage < SubResource + class DatabaseUsage include MsRestAzure - include MsRest::JSONable + # @return [String] The name of the usage metric. + attr_accessor :name + # @return [String] The name of the resource. attr_accessor :resource_name @@ -53,14 +55,6 @@ def self.mapper() name: 'String' } }, - id: { - required: false, - read_only: true, - serialized_name: 'id', - type: { - name: 'String' - } - }, resource_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage_list_result.rb index d14845ad3e..b0b5ff15eb 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/database_usage_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DatabaseUsageListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of database usages for the # database. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/edition_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/edition_capability.rb index 3f26305a28..428fe07765 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/edition_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/edition_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EditionCapability include MsRestAzure - include MsRest::JSONable # @return [String] The edition name. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool.rb index 7e0b8adc62..3576d65cf5 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPool < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [DateTime] The creation date of the elastic pool (ISO8601 # format). attr_accessor :creation_date diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity.rb index 1594ea9dad..9b019f086d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolActivity < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The geo-location where the resource lives attr_accessor :location diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb index f71cc8be42..29551a5fba 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolActivityListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of elastic pool # activities. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb index 1e9634990f..b660c26943 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolDatabaseActivity < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The geo-location where the resource lives attr_accessor :location diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb index e9cbb5be9e..8db0081aca 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolDatabaseActivityListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of elastic pool # database activities. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb index 71a800ba07..526447b987 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolDtuCapability include MsRestAzure - include MsRest::JSONable # @return [Integer] The maximum size of the database (see 'unit' for the # units). attr_accessor :limit diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition.rb index 429c1a6679..4f650063f8 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb index c29ed61356..7d306f40d7 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolEditionCapability include MsRestAzure - include MsRest::JSONable # @return [String] The elastic pool edition name. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb index 9635839757..e66455d4dd 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of elastic pools hosted in the # server. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb index 254f174841..ea3681a1bf 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolPerDatabaseMaxDtuCapability include MsRestAzure - include MsRest::JSONable # @return [Integer] The maximum DTUs per database. attr_accessor :limit diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb index cf5dcd0e08..b8dfb4b5c4 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ElasticPoolPerDatabaseMinDtuCapability include MsRestAzure - include MsRest::JSONable # @return [Integer] The maximum DTUs per database. attr_accessor :limit diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_state.rb index f590801245..c72ae149c8 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_update.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_update.rb index 95a7798888..1ae5b7d95d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_update.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/elastic_pool_update.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Represents an elastic pool update. # - class ElasticPoolUpdate < MsRestAzure::Resource + class ElasticPoolUpdate < Resource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags. attr_accessor :tags diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector.rb index e2bb778a36..e80f3f3ff2 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,10 +12,8 @@ class EncryptionProtector < ProxyResource include MsRestAzure - include MsRest::JSONable - # @return [Enum] Kind of encryption protector. This is metadata used for - # the Azure portal experience. Possible values include: '', - # 'azurekeyvault', 'servicemanaged' + # @return [String] Kind of encryption protector. This is metadata used + # for the Azure portal experience. attr_accessor :kind # @return [String] Resource location. @@ -106,7 +104,7 @@ def self.mapper() } }, server_key_type: { - required: false, + required: true, serialized_name: 'properties.serverKeyType', type: { name: 'String' diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb index ae4238a8e8..3af6d983c6 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/export_request.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/export_request.rb index b2b2e4ff30..f75af13c16 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/export_request.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/export_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ExportRequest include MsRestAzure - include MsRest::JSONable # @return [StorageKeyType] The type of the storage key to use. Possible # values include: 'StorageAccessKey', 'SharedAccessKey' attr_accessor :storage_key_type diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group.rb index e9affc1a92..2c14a0323f 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FailoverGroup < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] Resource location. attr_accessor :location @@ -102,7 +101,7 @@ def self.mapper() } }, read_write_endpoint: { - required: false, + required: true, serialized_name: 'properties.readWriteEndpoint', type: { name: 'Composite', @@ -134,7 +133,7 @@ def self.mapper() } }, partner_servers: { - required: false, + required: true, serialized_name: 'properties.partnerServers', type: { name: 'Sequence', diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_list_result.rb index 9f8fc27f50..6d8922d09b 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb index 7bf549b671..2c841c3e37 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FailoverGroupReadOnlyEndpoint include MsRestAzure - include MsRest::JSONable # @return [ReadOnlyEndpointFailoverPolicy] Failover policy of the # read-only endpoint for the failover group. Possible values include: # 'Disabled', 'Enabled' diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb index d7a4b85900..c06a21b816 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,14 +12,15 @@ class FailoverGroupReadWriteEndpoint include MsRestAzure - include MsRest::JSONable # @return [ReadWriteEndpointFailoverPolicy] Failover policy of the - # read-write endpoint for the failover group. Possible values include: - # 'Manual', 'Automatic' + # read-write endpoint for the failover group. If failoverPolicy is + # Automatic then failoverWithDataLossGracePeriodMinutes is required. + # Possible values include: 'Manual', 'Automatic' attr_accessor :failover_policy # @return [Integer] Grace period before failover with data loss is - # attempted for the read-write endpoint. + # attempted for the read-write endpoint. If failoverPolicy is Automatic + # then failoverWithDataLossGracePeriodMinutes is required. attr_accessor :failover_with_data_loss_grace_period_minutes @@ -36,7 +37,7 @@ def self.mapper() class_name: 'FailoverGroupReadWriteEndpoint', model_properties: { failover_policy: { - required: false, + required: true, serialized_name: 'failoverPolicy', type: { name: 'String' diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_replication_role.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_replication_role.rb index 311a7c9847..c83658389e 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_replication_role.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_replication_role.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_update.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_update.rb new file mode 100644 index 0000000000..87c2d0611a --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/failover_group_update.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::ARM::SQL + module Models + # + # A failover group update request. + # + class FailoverGroupUpdate + + include MsRestAzure + + # @return [FailoverGroupReadWriteEndpoint] Read-write endpoint of the + # failover group instance. + attr_accessor :read_write_endpoint + + # @return [FailoverGroupReadOnlyEndpoint] Read-only endpoint of the + # failover group instance. + attr_accessor :read_only_endpoint + + # @return [Array] List of databases in the failover group. + attr_accessor :databases + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + + # + # Mapper for FailoverGroupUpdate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverGroupUpdate', + type: { + name: 'Composite', + class_name: 'FailoverGroupUpdate', + model_properties: { + read_write_endpoint: { + required: false, + serialized_name: 'properties.readWriteEndpoint', + type: { + name: 'Composite', + class_name: 'FailoverGroupReadWriteEndpoint' + } + }, + read_only_endpoint: { + required: false, + serialized_name: 'properties.readOnlyEndpoint', + type: { + name: 'Composite', + class_name: 'FailoverGroupReadOnlyEndpoint' + } + }, + databases: { + required: false, + serialized_name: 'properties.databases', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule.rb index 78fa508065..d9b3abb321 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Represents a server firewall rule. # - class FirewallRule < SubResource + class FirewallRule < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] Kind of server that contains this firewall rule. attr_accessor :kind @@ -20,9 +19,6 @@ class FirewallRule < SubResource # rule. attr_accessor :location - # @return [String] Type of resource this is. - attr_accessor :type - # @return [String] The start IP address of the firewall rule. Must be # IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP # addresses. @@ -46,42 +42,42 @@ def self.mapper() name: 'Composite', class_name: 'FirewallRule', model_properties: { - name: { + id: { required: false, read_only: true, - serialized_name: 'name', + serialized_name: 'id', type: { name: 'String' } }, - id: { + name: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'name', type: { name: 'String' } }, - kind: { + type: { required: false, read_only: true, - serialized_name: 'kind', + serialized_name: 'type', type: { name: 'String' } }, - location: { + kind: { required: false, read_only: true, - serialized_name: 'location', + serialized_name: 'kind', type: { name: 'String' } }, - type: { + location: { required: false, read_only: true, - serialized_name: 'type', + serialized_name: 'location', type: { name: 'String' } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb index ae208e183c..a26b41cf6b 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FirewallRuleListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of server firewall rules. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy.rb index e5b60c3920..de921b7fcc 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GeoBackupPolicy < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [GeoBackupPolicyState] The state of the geo backup policy. # Possible values include: 'Disabled', 'Enabled' attr_accessor :state diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb index 9be79b64cd..af3c58dc4d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GeoBackupPolicyListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of geo backup policies. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_state.rb index 4162dd290b..f3a68805ef 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/geo_backup_policy_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/identity_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/identity_type.rb index 07b9a14784..a4a6fe259b 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/identity_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/identity_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_export_response.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_export_response.rb index 54d1927642..a4183e6ff0 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_export_response.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_export_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ImportExportResponse < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The request type of the operation. attr_accessor :request_type diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_extension_request.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_extension_request.rb index 18af62260a..f3ef31a813 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_extension_request.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_extension_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ImportExtensionRequest include MsRestAzure - include MsRest::JSONable # @return [String] The name of the extension. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_request.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_request.rb index 72c41c3980..c796c33f38 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_request.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/import_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ImportRequest < ExportRequest include MsRestAzure - include MsRest::JSONable # @return [String] The name of the database to import. attr_accessor :database_name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/location_capabilities.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/location_capabilities.rb index c8960f81f9..adc83128cc 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/location_capabilities.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/location_capabilities.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LocationCapabilities include MsRestAzure - include MsRest::JSONable # @return [String] The location name. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/management_operation_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/management_operation_state.rb new file mode 100644 index 0000000000..fafceb82e4 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/management_operation_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::ARM::SQL + module Models + # + # Defines values for ManagementOperationState + # + module ManagementOperationState + Pending = "Pending" + InProgress = "InProgress" + Succeeded = "Succeeded" + Failed = "Failed" + CancelInProgress = "CancelInProgress" + Cancelled = "Cancelled" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_capability.rb index cbaa78cb63..aa52333bc1 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MaxSizeCapability include MsRestAzure - include MsRest::JSONable # @return [Integer] The maximum size of the database (see 'unit' for the # units). attr_accessor :limit diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_units.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_units.rb index 793e3d3efc..97ee18c033 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_units.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/max_size_units.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric.rb index 0413a62ddf..c5d6241c93 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Metric include MsRestAzure - include MsRest::JSONable # @return [DateTime] The start time for the metric (ISO-8601 format). attr_accessor :start_time diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_availability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_availability.rb index c129d3131e..d2432191aa 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_availability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_availability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricAvailability include MsRestAzure - include MsRest::JSONable # @return [String] The length of retention for the database metric. attr_accessor :retention diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition.rb index 108e44c73f..95fae1b0f6 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricDefinition include MsRestAzure - include MsRest::JSONable # @return [MetricName] The name information for the metric. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition_list_result.rb index 1239dc4aa7..bc0f222953 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_definition_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricDefinitionListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of metric definitions for # the database. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_list_result.rb index 603cfbdcd9..41222eaaa7 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of metrics for the database. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_name.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_name.rb index f174ff7d2f..8bb0a5ec98 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_name.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricName include MsRestAzure - include MsRest::JSONable # @return [String] The name of the database metric. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_value.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_value.rb index b8973ebcb8..2237e95fe5 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_value.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/metric_value.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Represents database metrics. # - class MetricValue < SubResource + class MetricValue include MsRestAzure - include MsRest::JSONable # @return [Float] The number of values for the metric. attr_accessor :count @@ -44,22 +43,6 @@ def self.mapper() name: 'Composite', class_name: 'MetricValue', model_properties: { - name: { - required: false, - read_only: true, - serialized_name: 'name', - type: { - name: 'String' - } - }, - id: { - required: false, - read_only: true, - serialized_name: 'id', - type: { - name: 'String' - } - }, count: { required: false, read_only: true, diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation.rb index 98e959b0ce..0be7345edd 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,14 +12,21 @@ class Operation include MsRestAzure - include MsRest::JSONable - # @return [String] Operation name: {provider}/{resource}/{operation} + # @return [String] The name of the operation being performed on this + # particular object. attr_accessor :name - # @return [OperationDisplay] Display metadata associated with the - # operation. + # @return [OperationDisplay] The localized display information for this + # particular operation / action. attr_accessor :display + # @return [OperationOrigin] The intended executor of the operation. + # Possible values include: 'user', 'system' + attr_accessor :origin + + # @return Additional descriptions for the operation. + attr_accessor :properties + # # Mapper for Operation class as Ruby Hash. @@ -35,6 +42,7 @@ def self.mapper() model_properties: { name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -42,11 +50,35 @@ def self.mapper() }, display: { required: false, + read_only: true, serialized_name: 'display', type: { name: 'Composite', class_name: 'OperationDisplay' } + }, + origin: { + required: false, + read_only: true, + serialized_name: 'origin', + type: { + name: 'String' + } + }, + properties: { + required: false, + read_only: true, + serialized_name: 'properties', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'ObjectElementType', + type: { + name: 'Object' + } + } + } } } } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_display.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_display.rb index 6d291a2eb1..a22bbaac40 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_display.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,17 +12,20 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable - # @return [String] Service provider: Microsoft SQL Database. + # @return [String] The localized friendly form of the resource provider + # name. attr_accessor :provider - # @return [String] Resource on which the operation is performed: Server, - # Database, etc. + # @return [String] The localized friendly form of the resource type + # related to this action/operation. attr_accessor :resource - # @return [String] Type of operation: get, read, delete, etc. + # @return [String] The localized friendly name for the operation. attr_accessor :operation + # @return [String] The localized friendly description for the operation. + attr_accessor :description + # # Mapper for OperationDisplay class as Ruby Hash. @@ -31,13 +34,14 @@ class OperationDisplay def self.mapper() { required: false, - serialized_name: 'Operation_display', + serialized_name: 'OperationDisplay', type: { name: 'Composite', class_name: 'OperationDisplay', model_properties: { provider: { required: false, + read_only: true, serialized_name: 'provider', type: { name: 'String' @@ -45,6 +49,7 @@ def self.mapper() }, resource: { required: false, + read_only: true, serialized_name: 'resource', type: { name: 'String' @@ -52,10 +57,19 @@ def self.mapper() }, operation: { required: false, + read_only: true, serialized_name: 'operation', type: { name: 'String' } + }, + description: { + required: false, + read_only: true, + serialized_name: 'description', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_impact.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_impact.rb index a3d7960595..5ec924ac7a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_impact.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_impact.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationImpact include MsRestAzure - include MsRest::JSONable # @return [String] The name of the impact dimension. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_list_result.rb index 5b9a147f3e..4b02468bdb 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_list_result.rb @@ -1,27 +1,55 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::SQL module Models # - # Result of the request to list SQL operations. It contains a list of - # operations and a URL link to get the next set of results. + # Result of the request to list SQL operations. # class OperationListResult include MsRestAzure include MsRest::JSONable - # @return [Array] List of SQL operations supported by the SQL - # resource provider. + # @return [Array] Array of results. attr_accessor :value - # @return [String] URL to get the next set of operation list results if - # there are any. + # @return [String] Link to retrieve next page of results. attr_accessor :next_link + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [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. @@ -37,6 +65,7 @@ def self.mapper() model_properties: { value: { required: false, + read_only: true, serialized_name: 'value', type: { name: 'Sequence', @@ -52,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_origin.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_origin.rb new file mode 100644 index 0000000000..512fe84f4c --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/operation_origin.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::ARM::SQL + module Models + # + # Defines values for OperationOrigin + # + module OperationOrigin + User = "user" + System = "system" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/partner_info.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/partner_info.rb index 81b16f25b5..a3b0cf4918 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/partner_info.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/partner_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PartnerInfo include MsRestAzure - include MsRest::JSONable # @return [String] Resource identifier of the partner server. attr_accessor :id @@ -37,7 +36,7 @@ def self.mapper() class_name: 'PartnerInfo', model_properties: { id: { - required: false, + required: true, serialized_name: 'id', type: { name: 'String' diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/performance_level_unit.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/performance_level_unit.rb index 88da7bc3c8..20d6483ee1 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/performance_level_unit.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/performance_level_unit.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/primary_aggregation_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/primary_aggregation_type.rb index 6bdb6a7a50..9f78790fc3 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/primary_aggregation_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/primary_aggregation_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/proxy_resource.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/proxy_resource.rb index 684ea62849..c927bb5961 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/proxy_resource.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/proxy_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # ARM proxy resource. # - class ProxyResource < MsRestAzure::Resource + class ProxyResource < Resource include MsRestAzure - include MsRest::JSONable # # Mapper for ProxyResource class as Ruby Hash. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb index c1e5946fbd..07847a7e42 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_scale.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_scale.rb index 53a12d8f84..8af2d3be4d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_scale.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_scale.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb index 53aaf95c90..b211abde6b 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb index ec662defbe..b0c2158183 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecommendedElasticPool < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [ElasticPoolEdition] The edition of the recommended elastic # pool. The ElasticPoolEdition enumeration contains all the valid # editions. Possible values include: 'Basic', 'Standard', 'Premium' diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb index 45e4649ec5..be156b446a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RecommendedElasticPoolListMetricsResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of recommended # elastic pools metrics. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb index f20f782da6..2d9a17d29b 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecommendedElasticPoolListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of recommended elastic # pools hosted in the server. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb index 19dd15a65f..62439d0ab8 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecommendedElasticPoolMetric include MsRestAzure - include MsRest::JSONable # @return [DateTime] The time of metric (ISO8601 format). attr_accessor :date_time diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index.rb index dee4177bc4..3afb8c296f 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecommendedIndex < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [RecommendedIndexAction] The proposed index action. You can # create a missing index, drop an unused index, or rebuild an existing # index to improve its performance. Possible values include: 'Create', diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_action.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_action.rb index e33c645098..1da3bd6b80 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_action.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_state.rb index 3d42fab1e3..b2a194fcb0 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_type.rb index 50c6209147..1b266b2bdb 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recommended_index_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database.rb index 47842a5ce1..f1f33c110c 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecoverableDatabase < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The edition of the database attr_accessor :edition diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb index 6b40aa9ac4..285e9cadc7 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RecoverableDatabaseListResult include MsRestAzure - include MsRest::JSONable # @return [Array] A list of recoverable databases attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link.rb index 1bf0d02f2b..4fd434955a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,18 +8,14 @@ module Models # # Represents a database replication link. # - class ReplicationLink < SubResource + class ReplicationLink < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] Location of the server that contains this firewall # rule. attr_accessor :location - # @return [String] Type of resource this is. - attr_accessor :type - # @return [Boolean] Legacy value indicating whether termination is # allowed. Currently always returns true. attr_accessor :is_termination_allowed @@ -71,34 +67,34 @@ def self.mapper() name: 'Composite', class_name: 'ReplicationLink', model_properties: { - name: { + id: { required: false, read_only: true, - serialized_name: 'name', + serialized_name: 'id', type: { name: 'String' } }, - id: { + name: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'name', type: { name: 'String' } }, - location: { + type: { required: false, read_only: true, - serialized_name: 'location', + serialized_name: 'type', type: { name: 'String' } }, - type: { + location: { required: false, read_only: true, - serialized_name: 'type', + serialized_name: 'location', type: { name: 'String' } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link_list_result.rb index c61a9992ce..58de3a0297 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_link_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ReplicationLinkListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of database replication links # housed in the database. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_role.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_role.rb index c368a37c7e..63545e15b8 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_role.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_role.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_state.rb index cac362c68c..0192c39bde 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/replication_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/resource.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/resource.rb new file mode 100644 index 0000000000..3a0781454b --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/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::ARM::SQL + module Models + # + # ARM resource. + # + class Resource + + include MsRestAzure + + # @return [String] Resource ID. + attr_accessor :id + + # @return [String] Resource name. + attr_accessor :name + + # @return [String] Resource type. + attr_accessor :type + + + # + # Mapper for 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_sql/lib/generated/azure_mgmt_sql/models/resource_identity.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/resource_identity.rb index 22474a49c5..2d5c188c76 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/resource_identity.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/resource_identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceIdentity include MsRestAzure - include MsRest::JSONable # @return The Azure Active Directory principal id. attr_accessor :principal_id diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database.rb index 3d1bc970fb..e6ab7c51fc 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RestorableDroppedDatabase < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The geo-location where the resource lives attr_accessor :location diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb index 1c7564ddb1..a806e9b381 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RestorableDroppedDatabaseListResult include MsRestAzure - include MsRest::JSONable # @return [Array] A list of restorable dropped # databases attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point.rb index 3f93d14841..5bc3abc6ef 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RestorePoint < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [RestorePointType] The restore point type of the database # restore point. Possible values include: 'DISCRETE', 'CONTINUOUS' attr_accessor :restore_point_type diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_list_result.rb index 7a8800790b..2dba629bfe 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RestorePointListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of database restore points. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_type.rb index 91848a7f15..554a87ce7d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/restore_point_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sample_name.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sample_name.rb index 6505bba015..a25c2f67d9 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sample_name.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sample_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_email_account_admins.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_email_account_admins.rb index f7440ad826..02a57ba189 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_email_account_admins.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_email_account_admins.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_state.rb index d470444516..0574068da5 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_state.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_use_server_default.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_use_server_default.rb index c7ed265598..5944eacde8 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_use_server_default.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/security_alert_policy_use_server_default.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server.rb index 10bd29e2d0..c87f0cd09a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Server < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [ResourceIdentity] The Azure Active Directory identity of the # server. attr_accessor :identity diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_administrator_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_administrator_list_result.rb index 0972fd9334..0fb066f1a6 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_administrator_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_administrator_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerAdministratorListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of server Active # Directory Administrators for the server. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb index 8b82b0d1dc..aa2e4b7fa9 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # An server Active Directory Administrator. # - class ServerAzureADAdministrator < SqlSubResource + class ServerAzureADAdministrator < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The type of administrator. Default value: # 'ActiveDirectory' . attr_accessor :administrator_type @@ -39,6 +38,14 @@ def self.mapper() name: 'Composite', class_name: 'ServerAzureADAdministrator', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: false, read_only: true, @@ -47,10 +54,10 @@ def self.mapper() name: 'String' } }, - id: { + type: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'type', type: { name: 'String' } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link.rb index 3eb4a44b23..9452cedb23 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerCommunicationLink < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The state. attr_accessor :state diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb index c285ecfdcd..b8a7688cac 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerCommunicationLinkListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of server # communication links. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_policy.rb index 6bf5cd303d..b146351e4a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_policy.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerConnectionPolicy < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] Metadata used for the Azure portal experience. attr_accessor :kind diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_type.rb index 7a9af3155d..264cb7e041 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_connection_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key.rb index 727b5efe50..5bce4dfe5e 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,10 +12,8 @@ class ServerKey < ProxyResource include MsRestAzure - include MsRest::JSONable - # @return [Enum] Kind of encryption protector. This is metadata used for - # the Azure portal experience. Possible values include: '', - # 'azurekeyvault', 'servicemanaged' + # @return [String] Kind of encryption protector. This is metadata used + # for the Azure portal experience. attr_accessor :kind # @return [String] Resource location. @@ -99,7 +97,7 @@ def self.mapper() } }, server_key_type: { - required: false, + required: true, serialized_name: 'properties.serverKeyType', type: { name: 'String' diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_list_result.rb index 5af9c08736..782b627bc4 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_type.rb index 7947d19f21..860f3ff723 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_list_result.rb index 11158b7d6a..8af91744c7 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_update.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_update.rb index c1ba16b04c..b9abbe1ef8 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_update.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_update.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerUpdate include MsRestAzure - include MsRest::JSONable # @return [String] Administrator username for the server. Once created it # cannot be changed. attr_accessor :administrator_login diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage.rb index 2fa697cbc9..f814b859a0 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerUsage include MsRestAzure - include MsRest::JSONable # @return [String] Name of the server usage metric. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage_list_result.rb index e07635b4de..f6888dae35 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_usage_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerUsageListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of server metrics for the server. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_version_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_version_capability.rb index df08020a2e..4f59ad1242 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_version_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/server_version_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServerVersionCapability include MsRestAzure - include MsRest::JSONable # @return [String] The server version name. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective.rb index a10ed02330..2e7f24ae75 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Represents a database service objective. # - class ServiceObjective < SubResource + class ServiceObjective < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The name for the service objective. attr_accessor :service_objective_name @@ -43,6 +42,14 @@ def self.mapper() name: 'Composite', class_name: 'ServiceObjective', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: false, read_only: true, @@ -51,10 +58,10 @@ def self.mapper() name: 'String' } }, - id: { + type: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'type', type: { name: 'String' } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_capability.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_capability.rb index 91fb3f4f40..0fdfe31252 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_capability.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServiceObjectiveCapability include MsRestAzure - include MsRest::JSONable # @return [String] The service objective name. attr_accessor :name diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_list_result.rb index be4fa64a22..f09ae86031 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServiceObjectiveListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of database service # objectives. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_name.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_name.rb index e7c7ccb103..b5fbbc195c 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_name.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_objective_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor.rb index 2daa7b65ec..55ff4dcfcd 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Represents a Service Tier Advisor. # - class ServiceTierAdvisor < SubResource + class ServiceTierAdvisor < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [DateTime] The observation period start (ISO8601 format). attr_accessor :observation_period_start @@ -98,6 +97,14 @@ def self.mapper() name: 'Composite', class_name: 'ServiceTierAdvisor', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: false, read_only: true, @@ -106,10 +113,10 @@ def self.mapper() name: 'String' } }, - id: { + type: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'type', type: { name: 'String' } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb index 4cd9881093..1e2f8451ec 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServiceTierAdvisorListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of service tier advisors # for specified database. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/slo_usage_metric.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/slo_usage_metric.rb index 61ca79846c..0903c661ad 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/slo_usage_metric.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/slo_usage_metric.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SloUsageMetric include MsRestAzure - include MsRest::JSONable # @return [ServiceObjectiveName] The serviceLevelObjective for SLO usage # metric. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', # 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/storage_key_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/storage_key_type.rb index 3086aeb91e..bb1cf24a27 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/storage_key_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/storage_key_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent.rb new file mode 100644 index 0000000000..4f95827067 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent.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::ARM::SQL + module Models + # + # An Azure SQL Database sync agent. + # + class SyncAgent < ProxyResource + + include MsRestAzure + + # @return [String] Name of the sync agent. + attr_accessor :sync_agent_name + + # @return [String] ARM resource id of the sync database in the sync + # agent. + attr_accessor :sync_database_id + + # @return [DateTime] Last alive time of the sync agent. + attr_accessor :last_alive_time + + # @return [SyncAgentState] State of the sync agent. Possible values + # include: 'Online', 'Offline', 'NeverConnected' + attr_accessor :state + + # @return [Boolean] If the sync agent version is up to date. + attr_accessor :is_up_to_date + + # @return [DateTime] Expiration time of the sync agent version. + attr_accessor :expiry_time + + # @return [String] Version of the sync agent. + attr_accessor :version + + + # + # Mapper for SyncAgent class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncAgent', + type: { + name: 'Composite', + class_name: 'SyncAgent', + 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' + } + }, + sync_agent_name: { + required: false, + read_only: true, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + sync_database_id: { + required: false, + serialized_name: 'properties.syncDatabaseId', + type: { + name: 'String' + } + }, + last_alive_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastAliveTime', + type: { + name: 'DateTime' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + is_up_to_date: { + required: false, + read_only: true, + serialized_name: 'properties.isUpToDate', + type: { + name: 'Boolean' + } + }, + expiry_time: { + required: false, + read_only: true, + serialized_name: 'properties.expiryTime', + type: { + name: 'DateTime' + } + }, + version: { + required: false, + read_only: true, + serialized_name: 'properties.version', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_key_properties.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_key_properties.rb new file mode 100644 index 0000000000..f0414faaad --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_key_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::ARM::SQL + module Models + # + # Properties of an Azure SQL Database sync agent key. + # + class SyncAgentKeyProperties + + include MsRestAzure + + # @return [String] Key of sync agent. + attr_accessor :sync_agent_key + + + # + # Mapper for SyncAgentKeyProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncAgentKeyProperties', + type: { + name: 'Composite', + class_name: 'SyncAgentKeyProperties', + model_properties: { + sync_agent_key: { + required: false, + read_only: true, + serialized_name: 'syncAgentKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb new file mode 100644 index 0000000000..ca1cbc907d --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database.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::ARM::SQL + module Models + # + # An Azure SQL Database sync agent linked database. + # + class SyncAgentLinkedDatabase < ProxyResource + + include MsRestAzure + + # @return [SyncMemberDbType] Type of the sync agent linked database. + # Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase' + attr_accessor :database_type + + # @return [String] Id of the sync agent linked database. + attr_accessor :database_id + + # @return [String] Description of the sync agent linked database. + attr_accessor :description + + # @return [String] Server name of the sync agent linked database. + attr_accessor :server_name + + # @return [String] Database name of the sync agent linked database. + attr_accessor :database_name + + # @return [String] User name of the sync agent linked database. + attr_accessor :user_name + + + # + # Mapper for SyncAgentLinkedDatabase class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncAgentLinkedDatabase', + type: { + name: 'Composite', + class_name: 'SyncAgentLinkedDatabase', + 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' + } + }, + database_type: { + required: false, + read_only: true, + serialized_name: 'properties.databaseType', + type: { + name: 'String' + } + }, + database_id: { + required: false, + read_only: true, + serialized_name: 'properties.databaseId', + type: { + name: 'String' + } + }, + description: { + required: false, + read_only: true, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + server_name: { + required: false, + read_only: true, + serialized_name: 'properties.serverName', + type: { + name: 'String' + } + }, + database_name: { + required: false, + read_only: true, + serialized_name: 'properties.databaseName', + type: { + name: 'String' + } + }, + user_name: { + required: false, + read_only: true, + serialized_name: 'properties.userName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb new file mode 100644 index 0000000000..d8d6a80887 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # A list of sync agent linked databases. + # + class SyncAgentLinkedDatabaseListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [SyncAgentLinkedDatabaseListResult] 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 SyncAgentLinkedDatabaseListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncAgentLinkedDatabaseListResult', + type: { + name: 'Composite', + class_name: 'SyncAgentLinkedDatabaseListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncAgentLinkedDatabaseElementType', + type: { + name: 'Composite', + class_name: 'SyncAgentLinkedDatabase' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_list_result.rb new file mode 100644 index 0000000000..cde733552f --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # A list of sync agents. + # + class SyncAgentListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [SyncAgentListResult] 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 SyncAgentListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncAgentListResult', + type: { + name: 'Composite', + class_name: 'SyncAgentListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncAgentElementType', + type: { + name: 'Composite', + class_name: 'SyncAgent' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_state.rb new file mode 100644 index 0000000000..16f445b367 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_agent_state.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # Defines values for SyncAgentState + # + module SyncAgentState + Online = "Online" + Offline = "Offline" + NeverConnected = "NeverConnected" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_conflict_resolution_policy.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_conflict_resolution_policy.rb new file mode 100644 index 0000000000..0e934f23aa --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_conflict_resolution_policy.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::ARM::SQL + module Models + # + # Defines values for SyncConflictResolutionPolicy + # + module SyncConflictResolutionPolicy + HubWin = "HubWin" + MemberWin = "MemberWin" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb new file mode 100644 index 0000000000..e2b240fea7 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_database_id_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::ARM::SQL + module Models + # + # A list of sync database ID properties. + # + class SyncDatabaseIdListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [SyncDatabaseIdListResult] 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 SyncDatabaseIdListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncDatabaseIdListResult', + type: { + name: 'Composite', + class_name: 'SyncDatabaseIdListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncDatabaseIdPropertiesElementType', + type: { + name: 'Composite', + class_name: 'SyncDatabaseIdProperties' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_database_id_properties.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_database_id_properties.rb new file mode 100644 index 0000000000..5333f9a700 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_database_id_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::ARM::SQL + module Models + # + # Properties of the sync database id. + # + class SyncDatabaseIdProperties + + include MsRestAzure + + # @return [String] ARM resource id of sync database. + attr_accessor :id + + + # + # Mapper for SyncDatabaseIdProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncDatabaseIdProperties', + type: { + name: 'Composite', + class_name: 'SyncDatabaseIdProperties', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_direction.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_direction.rb new file mode 100644 index 0000000000..1060cd9452 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_direction.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::ARM::SQL + module Models + # + # Defines values for SyncDirection + # + module SyncDirection + Bidirectional = "Bidirectional" + OneWayMemberToHub = "OneWayMemberToHub" + OneWayHubToMember = "OneWayHubToMember" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb new file mode 100644 index 0000000000..ab959d9960 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties.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::ARM::SQL + module Models + # + # Properties of the database full schema. + # + class SyncFullSchemaProperties + + include MsRestAzure + + # @return [Array] List of tables in the database + # full schema. + attr_accessor :tables + + # @return [DateTime] Last update time of the database schema. + attr_accessor :last_update_time + + + # + # Mapper for SyncFullSchemaProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncFullSchemaProperties', + type: { + name: 'Composite', + class_name: 'SyncFullSchemaProperties', + model_properties: { + tables: { + required: false, + read_only: true, + serialized_name: 'tables', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncFullSchemaTableElementType', + type: { + name: 'Composite', + class_name: 'SyncFullSchemaTable' + } + } + } + }, + last_update_time: { + required: false, + read_only: true, + serialized_name: 'lastUpdateTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb new file mode 100644 index 0000000000..51dcb40754 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties_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::ARM::SQL + module Models + # + # A list of sync schema properties. + # + class SyncFullSchemaPropertiesListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [SyncFullSchemaPropertiesListResult] 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 SyncFullSchemaPropertiesListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncFullSchemaPropertiesListResult', + type: { + name: 'Composite', + class_name: 'SyncFullSchemaPropertiesListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncFullSchemaPropertiesElementType', + type: { + name: 'Composite', + class_name: 'SyncFullSchemaProperties' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_table.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_table.rb new file mode 100644 index 0000000000..f7cfa99990 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_table.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::ARM::SQL + module Models + # + # Properties of the table in the database full schema. + # + class SyncFullSchemaTable + + include MsRestAzure + + # @return [Array] List of columns in the table + # of database full schema. + attr_accessor :columns + + # @return [String] Error id of the table. + attr_accessor :error_id + + # @return [Boolean] If there is error in the table. + attr_accessor :has_error + + # @return [String] Name of the table. + attr_accessor :name + + # @return [String] Quoted name of the table. + attr_accessor :quoted_name + + + # + # Mapper for SyncFullSchemaTable class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncFullSchemaTable', + type: { + name: 'Composite', + class_name: 'SyncFullSchemaTable', + model_properties: { + columns: { + required: false, + read_only: true, + serialized_name: 'columns', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncFullSchemaTableColumnElementType', + type: { + name: 'Composite', + class_name: 'SyncFullSchemaTableColumn' + } + } + } + }, + error_id: { + required: false, + read_only: true, + serialized_name: 'errorId', + type: { + name: 'String' + } + }, + has_error: { + required: false, + read_only: true, + serialized_name: 'hasError', + type: { + name: 'Boolean' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + quoted_name: { + required: false, + read_only: true, + serialized_name: 'quotedName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb new file mode 100644 index 0000000000..3f91b39da0 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb @@ -0,0 +1,111 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # Properties of the column in the table of database full schema. + # + class SyncFullSchemaTableColumn + + include MsRestAzure + + # @return [String] Data size of the column. + attr_accessor :data_size + + # @return [String] Data type of the column. + attr_accessor :data_type + + # @return [String] Error id of the column. + attr_accessor :error_id + + # @return [Boolean] If there is error in the table. + attr_accessor :has_error + + # @return [Boolean] If it is the primary key of the table. + attr_accessor :is_primary_key + + # @return [String] Name of the column. + attr_accessor :name + + # @return [String] Quoted name of the column. + attr_accessor :quoted_name + + + # + # Mapper for SyncFullSchemaTableColumn class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncFullSchemaTableColumn', + type: { + name: 'Composite', + class_name: 'SyncFullSchemaTableColumn', + model_properties: { + data_size: { + required: false, + read_only: true, + serialized_name: 'dataSize', + type: { + name: 'String' + } + }, + data_type: { + required: false, + read_only: true, + serialized_name: 'dataType', + type: { + name: 'String' + } + }, + error_id: { + required: false, + read_only: true, + serialized_name: 'errorId', + type: { + name: 'String' + } + }, + has_error: { + required: false, + read_only: true, + serialized_name: 'hasError', + type: { + name: 'Boolean' + } + }, + is_primary_key: { + required: false, + read_only: true, + serialized_name: 'isPrimaryKey', + type: { + name: 'Boolean' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + quoted_name: { + required: false, + read_only: true, + serialized_name: 'quotedName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group.rb new file mode 100644 index 0000000000..d6c29e020e --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group.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::ARM::SQL + module Models + # + # An Azure SQL Database sync group. + # + class SyncGroup < ProxyResource + + include MsRestAzure + + # @return [Integer] Sync interval of the sync group. + attr_accessor :interval + + # @return [DateTime] Last sync time of the sync group. + attr_accessor :last_sync_time + + # @return [SyncConflictResolutionPolicy] Conflict resolution policy of + # the sync group. Possible values include: 'HubWin', 'MemberWin' + attr_accessor :conflict_resolution_policy + + # @return [String] ARM resource id of the sync database in the sync + # group. + attr_accessor :sync_database_id + + # @return [String] User name for the sync group hub database credential. + attr_accessor :hub_database_user_name + + # @return [String] Password for the sync group hub database credential. + attr_accessor :hub_database_password + + # @return [SyncGroupState] Sync state of the sync group. Possible values + # include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + attr_accessor :sync_state + + # @return [SyncGroupSchema] Sync schema of the sync group. + attr_accessor :schema + + + # + # Mapper for SyncGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncGroup', + type: { + name: 'Composite', + class_name: 'SyncGroup', + 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' + } + }, + interval: { + required: false, + serialized_name: 'properties.interval', + type: { + name: 'Number' + } + }, + last_sync_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastSyncTime', + type: { + name: 'DateTime' + } + }, + conflict_resolution_policy: { + required: false, + serialized_name: 'properties.conflictResolutionPolicy', + type: { + name: 'String' + } + }, + sync_database_id: { + required: false, + serialized_name: 'properties.syncDatabaseId', + type: { + name: 'String' + } + }, + hub_database_user_name: { + required: false, + serialized_name: 'properties.hubDatabaseUserName', + type: { + name: 'String' + } + }, + hub_database_password: { + required: false, + serialized_name: 'properties.hubDatabasePassword', + type: { + name: 'String' + } + }, + sync_state: { + required: false, + read_only: true, + serialized_name: 'properties.syncState', + type: { + name: 'String' + } + }, + schema: { + required: false, + serialized_name: 'properties.schema', + type: { + name: 'Composite', + class_name: 'SyncGroupSchema' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_list_result.rb new file mode 100644 index 0000000000..2588049f8e --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # A list of sync groups. + # + class SyncGroupListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [SyncGroupListResult] 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 SyncGroupListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncGroupListResult', + type: { + name: 'Composite', + class_name: 'SyncGroupListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncGroupElementType', + type: { + name: 'Composite', + class_name: 'SyncGroup' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb new file mode 100644 index 0000000000..7528fff7bd --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_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::ARM::SQL + module Models + # + # A list of sync group log properties. + # + class SyncGroupLogListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [SyncGroupLogListResult] 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 SyncGroupLogListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncGroupLogListResult', + type: { + name: 'Composite', + class_name: 'SyncGroupLogListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncGroupLogPropertiesElementType', + type: { + name: 'Composite', + class_name: 'SyncGroupLogProperties' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_properties.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_properties.rb new file mode 100644 index 0000000000..5907208335 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_properties.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::ARM::SQL + module Models + # + # Properties of an Azure SQL Database sync group log. + # + class SyncGroupLogProperties + + include MsRestAzure + + # @return [DateTime] Timestamp of the sync group log. + attr_accessor :timestamp + + # @return [SyncGroupLogType] Type of the sync group log. Possible values + # include: 'All', 'Error', 'Warning', 'Success' + attr_accessor :type + + # @return [String] Source of the sync group log. + attr_accessor :source + + # @return [String] Details of the sync group log. + attr_accessor :details + + # @return TracingId of the sync group log. + attr_accessor :tracing_id + + # @return [String] OperationStatus of the sync group log. + attr_accessor :operation_status + + + # + # Mapper for SyncGroupLogProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncGroupLogProperties', + type: { + name: 'Composite', + class_name: 'SyncGroupLogProperties', + model_properties: { + timestamp: { + required: false, + read_only: true, + serialized_name: 'timestamp', + type: { + name: 'DateTime' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + source: { + required: false, + read_only: true, + serialized_name: 'source', + type: { + name: 'String' + } + }, + details: { + required: false, + read_only: true, + serialized_name: 'details', + type: { + name: 'String' + } + }, + tracing_id: { + required: false, + read_only: true, + serialized_name: 'tracingId', + type: { + name: 'String' + } + }, + operation_status: { + required: false, + read_only: true, + serialized_name: 'operationStatus', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_type.rb new file mode 100644 index 0000000000..bc4471bb6c --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_log_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::ARM::SQL + module Models + # + # Defines values for SyncGroupLogType + # + module SyncGroupLogType + All = "All" + Error = "Error" + Warning = "Warning" + Success = "Success" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema.rb new file mode 100644 index 0000000000..462dc298a9 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # Properties of sync group schema. + # + class SyncGroupSchema + + include MsRestAzure + + # @return [Array] List of tables in sync group + # schema. + attr_accessor :tables + + # @return [String] Name of master sync member where the schema is from. + attr_accessor :master_sync_member_name + + + # + # Mapper for SyncGroupSchema class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncGroupSchema', + type: { + name: 'Composite', + class_name: 'SyncGroupSchema', + model_properties: { + tables: { + required: false, + serialized_name: 'tables', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncGroupSchemaTableElementType', + type: { + name: 'Composite', + class_name: 'SyncGroupSchemaTable' + } + } + } + }, + master_sync_member_name: { + required: false, + serialized_name: 'masterSyncMemberName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema_table.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema_table.rb new file mode 100644 index 0000000000..5f8aa2deb6 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema_table.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # Properties of table in sync group schema. + # + class SyncGroupSchemaTable + + include MsRestAzure + + # @return [Array] List of columns in sync + # group schema. + attr_accessor :columns + + # @return [String] Quoted name of sync group schema table. + attr_accessor :quoted_name + + + # + # Mapper for SyncGroupSchemaTable class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncGroupSchemaTable', + type: { + name: 'Composite', + class_name: 'SyncGroupSchemaTable', + model_properties: { + columns: { + required: false, + serialized_name: 'columns', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncGroupSchemaTableColumnElementType', + type: { + name: 'Composite', + class_name: 'SyncGroupSchemaTableColumn' + } + } + } + }, + quoted_name: { + required: false, + serialized_name: 'quotedName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb new file mode 100644 index 0000000000..96666c2b9a --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_schema_table_column.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::ARM::SQL + module Models + # + # Properties of column in sync group table. + # + class SyncGroupSchemaTableColumn + + include MsRestAzure + + # @return [String] Quoted name of sync group table column. + attr_accessor :quoted_name + + # @return [String] Data size of the column. + attr_accessor :data_size + + # @return [String] Data type of the column. + attr_accessor :data_type + + + # + # Mapper for SyncGroupSchemaTableColumn class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncGroupSchemaTableColumn', + type: { + name: 'Composite', + class_name: 'SyncGroupSchemaTableColumn', + model_properties: { + quoted_name: { + required: false, + serialized_name: 'quotedName', + type: { + name: 'String' + } + }, + data_size: { + required: false, + serialized_name: 'dataSize', + type: { + name: 'String' + } + }, + data_type: { + required: false, + serialized_name: 'dataType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_state.rb new file mode 100644 index 0000000000..f81faf59f2 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_group_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::ARM::SQL + module Models + # + # Defines values for SyncGroupState + # + module SyncGroupState + NotReady = "NotReady" + Error = "Error" + Warning = "Warning" + Progressing = "Progressing" + Good = "Good" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member.rb new file mode 100644 index 0000000000..1574de51e3 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member.rb @@ -0,0 +1,159 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # An Azure SQL Database sync member. + # + class SyncMember < ProxyResource + + include MsRestAzure + + # @return [SyncMemberDbType] Database type of the sync member. Possible + # values include: 'AzureSqlDatabase', 'SqlServerDatabase' + attr_accessor :database_type + + # @return [String] ARM resource id of the sync agent in the sync member. + attr_accessor :sync_agent_id + + # @return SQL Server database id of the sync member. + attr_accessor :sql_server_database_id + + # @return [String] Server name of the member database in the sync member + attr_accessor :server_name + + # @return [String] Database name of the member database in the sync + # member. + attr_accessor :database_name + + # @return [String] User name of the member database in the sync member. + attr_accessor :user_name + + # @return [String] Password of the member database in the sync member. + attr_accessor :password + + # @return [SyncDirection] Sync direction of the sync member. Possible + # values include: 'Bidirectional', 'OneWayMemberToHub', + # 'OneWayHubToMember' + attr_accessor :sync_direction + + # @return [SyncMemberState] Sync state of the sync member. Possible + # values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + # 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + # 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + # 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + # 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', + # 'Reprovisioning', 'ReprovisionFailed', 'UnReprovisioned' + attr_accessor :sync_state + + + # + # Mapper for SyncMember class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncMember', + type: { + name: 'Composite', + class_name: 'SyncMember', + 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' + } + }, + database_type: { + required: false, + serialized_name: 'properties.databaseType', + type: { + name: 'String' + } + }, + sync_agent_id: { + required: false, + serialized_name: 'properties.syncAgentId', + type: { + name: 'String' + } + }, + sql_server_database_id: { + required: false, + serialized_name: 'properties.sqlServerDatabaseId', + type: { + name: 'String' + } + }, + server_name: { + required: false, + serialized_name: 'properties.serverName', + type: { + name: 'String' + } + }, + database_name: { + required: false, + serialized_name: 'properties.databaseName', + type: { + name: 'String' + } + }, + user_name: { + required: false, + serialized_name: 'properties.userName', + type: { + name: 'String' + } + }, + password: { + required: false, + serialized_name: 'properties.password', + type: { + name: 'String' + } + }, + sync_direction: { + required: false, + serialized_name: 'properties.syncDirection', + type: { + name: 'String' + } + }, + sync_state: { + required: false, + read_only: true, + serialized_name: 'properties.syncState', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_db_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_db_type.rb new file mode 100644 index 0000000000..1fced87175 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_db_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::ARM::SQL + module Models + # + # Defines values for SyncMemberDbType + # + module SyncMemberDbType + AzureSqlDatabase = "AzureSqlDatabase" + SqlServerDatabase = "SqlServerDatabase" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_list_result.rb new file mode 100644 index 0000000000..bc92b9b0db --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_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::ARM::SQL + module Models + # + # A list of Azure SQL Database sync members. + # + class SyncMemberListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Array of results. + attr_accessor :value + + # @return [String] Link to retrieve next page of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [SyncMemberListResult] 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 SyncMemberListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SyncMemberListResult', + type: { + name: 'Composite', + class_name: 'SyncMemberListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SyncMemberElementType', + type: { + name: 'Composite', + class_name: 'SyncMember' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_state.rb new file mode 100644 index 0000000000..0bf65df52c --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/sync_member_state.rb @@ -0,0 +1,32 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + module Models + # + # Defines values for SyncMemberState + # + module SyncMemberState + SyncInProgress = "SyncInProgress" + SyncSucceeded = "SyncSucceeded" + SyncFailed = "SyncFailed" + DisabledTombstoneCleanup = "DisabledTombstoneCleanup" + DisabledBackupRestore = "DisabledBackupRestore" + SyncSucceededWithWarnings = "SyncSucceededWithWarnings" + SyncCancelling = "SyncCancelling" + SyncCancelled = "SyncCancelled" + UnProvisioned = "UnProvisioned" + Provisioning = "Provisioning" + Provisioned = "Provisioned" + ProvisionFailed = "ProvisionFailed" + DeProvisioning = "DeProvisioning" + DeProvisioned = "DeProvisioned" + DeProvisionFailed = "DeProvisionFailed" + Reprovisioning = "Reprovisioning" + ReprovisionFailed = "ReprovisionFailed" + UnReprovisioned = "UnReprovisioned" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/tracked_resource.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/tracked_resource.rb index cdd4a87c31..99dfee6c19 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/tracked_resource.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/tracked_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # ARM tracked top level resource. # - class TrackedResource < MsRestAzure::Resource + class TrackedResource < Resource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags. attr_accessor :tags diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption.rb index 422ee51e0f..dcb8ff38f6 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # Represents a database transparent data encryption configuration. # - class TransparentDataEncryption < SubResource + class TransparentDataEncryption < ProxyResource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource location. + attr_accessor :location + # @return [TransparentDataEncryptionStatus] The status of the database # transparent data encryption. Possible values include: 'Enabled', # 'Disabled' @@ -31,6 +33,14 @@ def self.mapper() name: 'Composite', class_name: 'TransparentDataEncryption', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: false, read_only: true, @@ -39,10 +49,18 @@ def self.mapper() name: 'String' } }, - id: { + type: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + read_only: true, + serialized_name: 'location', type: { name: 'String' } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb index 0a88ca7201..4177f607cd 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # Represents a database transparent data encryption Scan. # - class TransparentDataEncryptionActivity < SubResource + class TransparentDataEncryptionActivity < ProxyResource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource location. + attr_accessor :location + # @return [TransparentDataEncryptionActivityStatus] The status of the # database. Possible values include: 'Encrypting', 'Decrypting' attr_accessor :status @@ -34,6 +36,14 @@ def self.mapper() name: 'Composite', class_name: 'TransparentDataEncryptionActivity', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, name: { required: false, read_only: true, @@ -42,10 +52,18 @@ def self.mapper() name: 'String' } }, - id: { + type: { required: false, read_only: true, - serialized_name: 'id', + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + read_only: true, + serialized_name: 'location', type: { name: 'String' } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb index 4911cdd5c0..fdaeff1cb7 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class TransparentDataEncryptionActivityListResult include MsRestAzure - include MsRest::JSONable # @return [Array] The list of database # transparent data encryption activities. attr_accessor :value diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_status.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_status.rb index 22c640e966..f7b2753e9d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_status.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_status.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_status.rb index f7cbd4ef8b..9d768990a0 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_status.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_definition_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_definition_type.rb index f5f5cbfd75..411572c7bb 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_definition_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_definition_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_type.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_type.rb index bb6839c689..71328219f3 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_type.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/unit_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule.rb index ef04d52d33..64f6bb6f0a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,10 +12,18 @@ class VirtualNetworkRule < ProxyResource include MsRestAzure - include MsRest::JSONable - # @return [String] The resource ID of the virtual network subnet + # @return [String] The ARM resource id of the virtual network subnet. attr_accessor :virtual_network_subnet_id + # @return [Boolean] Create firewall rule before the virtual network has + # vnet service endpoint enabled. + attr_accessor :ignore_missing_vnet_service_endpoint + + # @return [VirtualNetworkRuleState] Virtual Network Rule State. Possible + # values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', + # 'Unknown' + attr_accessor :state + # # Mapper for VirtualNetworkRule class as Ruby Hash. @@ -54,11 +62,26 @@ def self.mapper() } }, virtual_network_subnet_id: { - required: false, + required: true, serialized_name: 'properties.virtualNetworkSubnetId', type: { name: 'String' } + }, + ignore_missing_vnet_service_endpoint: { + required: false, + serialized_name: 'properties.ignoreMissingVnetServiceEndpoint', + type: { + name: 'Boolean' + } + }, + state: { + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb index 2e2759e574..b0207df3cc 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule_state.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule_state.rb new file mode 100644 index 0000000000..92c82408b9 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/models/virtual_network_rule_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::ARM::SQL + module Models + # + # Defines values for VirtualNetworkRuleState + # + module VirtualNetworkRuleState + Initializing = "Initializing" + InProgress = "InProgress" + Ready = "Ready" + Deleting = "Deleting" + Unknown = "Unknown" + end + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/module_definition.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/module_definition.rb index 0fbbad403b..7a03a5ce8b 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/module_definition.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/operations.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/operations.rb index 777a8c8d2a..57086d8bed 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/operations.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -30,11 +30,11 @@ def initialize(client) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [OperationListResult] operation results. + # @return [Array] operation results. # def list(custom_headers = nil) - response = list_async(custom_headers).value! - response.body unless response.nil? + first_page = list_as_lazy(custom_headers) + first_page.get_all_items end # @@ -58,7 +58,7 @@ def list_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(custom_headers = nil) - api_version = '2014-04-01' + api_version = '2015-05-01-preview' request_headers = {} @@ -105,5 +105,112 @@ def list_async(custom_headers = nil) promise.execute end + # + # Lists all of the available SQL Rest 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 [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 SQL Rest 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_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 SQL Rest 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_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::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 SQL Rest API operations. + # + # @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_sql/lib/generated/azure_mgmt_sql/recommended_elastic_pools.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/recommended_elastic_pools.rb index 6fca827f29..6d28997bf0 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/recommended_elastic_pools.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/recommended_elastic_pools.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -128,114 +128,6 @@ def get_async(resource_group_name, server_name, recommended_elastic_pool_name, c promise.execute end - # - # Gets a database inside of a recommented elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param recommended_elastic_pool_name [String] The name of the elastic pool to - # be retrieved. - # @param database_name [String] The name of the database to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Database] operation results. - # - def get_databases(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) - response = get_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a database inside of a recommented elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param recommended_elastic_pool_name [String] The name of the elastic pool to - # be retrieved. - # @param database_name [String] The name of the database to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_databases_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) - get_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value! - end - - # - # Gets a database inside of a recommented elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param recommended_elastic_pool_name [String] The name of the elastic pool to - # be retrieved. - # @param database_name [String] The name of the database to be retrieved. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'recommended_elastic_pool_name is nil' if recommended_elastic_pool_name.nil? - fail ArgumentError, 'database_name is nil' if database_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}' - - 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,'serverName' => server_name,'recommendedElasticPoolName' => recommended_elastic_pool_name,'databaseName' => database_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::Database.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 recommended elastic pools. # @@ -334,111 +226,7 @@ def list_by_server_async(resource_group_name, server_name, custom_headers = nil) end # - # Returns a list of databases inside a recommented elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param recommended_elastic_pool_name [String] The name of the recommended - # elastic pool to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DatabaseListResult] operation results. - # - def list_databases(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) - response = list_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns a list of databases inside a recommented elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param recommended_elastic_pool_name [String] The name of the recommended - # elastic pool to be retrieved. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_databases_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) - list_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value! - end - - # - # Returns a list of databases inside a recommented elastic pool. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param recommended_elastic_pool_name [String] The name of the recommended - # elastic pool to be retrieved. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'recommended_elastic_pool_name is nil' if recommended_elastic_pool_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases' - - 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,'serverName' => server_name,'recommendedElasticPoolName' => recommended_elastic_pool_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 a recommented elastic pool metrics. + # Returns recommented elastic pool metrics. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -457,7 +245,7 @@ def list_metrics(resource_group_name, server_name, recommended_elastic_pool_name end # - # Returns a recommented elastic pool metrics. + # Returns recommented elastic pool metrics. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -475,7 +263,7 @@ def list_metrics_with_http_info(resource_group_name, server_name, recommended_el end # - # Returns a recommented elastic pool metrics. + # Returns recommented elastic pool metrics. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/recoverable_databases.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/recoverable_databases.rb index 682ef32b18..f15de91f5d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/recoverable_databases.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/recoverable_databases.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/replication_links.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/replication_links.rb new file mode 100644 index 0000000000..c56406cc0f --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/replication_links.rb @@ -0,0 +1,629 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ReplicationLinks + include MsRestAzure + + # + # Creates and initializes a new instance of the ReplicationLinks class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Deletes a database replication link. Cannot be done during failover. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be dropped. + # @param link_id [String] The ID of the replication link to be deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + nil + end + + # + # Deletes a database replication link. Cannot be done during failover. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be dropped. + # @param link_id [String] The ID of the replication link to be deleted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + delete_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + end + + # + # Deletes a database replication link. Cannot be done during failover. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be dropped. + # @param link_id [String] The ID of the replication link to be deleted. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}' + + 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a database replication link. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to get the link for. + # @param link_id [String] The replication link ID to be retrieved. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationLink] operation results. + # + def get(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database replication link. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to get the link for. + # @param link_id [String] The replication link ID to be retrieved. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + end + + # + # Gets a database replication link. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to get the link for. + # @param link_id [String] The replication link ID to be retrieved. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}' + + 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ReplicationLink.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def failover(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = failover_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @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 failover_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + # Send request + promise = begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. This operation might result in data loss. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @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 failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + # Send request + promise = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists a database's replication links. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to retrieve links for. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ReplicationLinkListResult] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists a database's replication links. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to retrieve links for. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Lists a database's replication links. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to retrieve links for. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks' + + 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,'serverName' => server_name,'databaseName' => database_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ReplicationLinkListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_failover(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + nil + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param custom_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_failover_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + begin_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param [Hash{String => String}] 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_failover_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover' + + 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, + query_params: {'api-version' => 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 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. This operation might result in data loss. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_failover_allow_data_loss(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + response = begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + nil + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. This operation might result in data loss. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param custom_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_failover_allow_data_loss_with_http_info(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + begin_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers).value! + end + + # + # Sets which replica database is primary by failing over from the current + # primary replica database. This operation might result in data loss. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database that has the + # replication link to be failed over. + # @param link_id [String] The ID of the replication link to be failed over. + # @param [Hash{String => String}] 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_failover_allow_data_loss_async(resource_group_name, server_name, database_name, link_id, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'link_id is nil' if link_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.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss' + + 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,'serverName' => server_name,'databaseName' => database_name,'linkId' => link_id}, + query_params: {'api-version' => 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 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/restorable_dropped_databases.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/restorable_dropped_databases.rb index 1d2860de20..06fff42cf6 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/restorable_dropped_databases.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/restorable_dropped_databases.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/restore_points.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/restore_points.rb new file mode 100644 index 0000000000..5578fc2e57 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/restore_points.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::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class RestorePoints + include MsRestAzure + + # + # Creates and initializes a new instance of the RestorePoints class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a list of database restore points. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to get available + # restore points. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RestorePointListResult] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a list of database restore points. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to get available + # restore points. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a list of database restore points. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database to get available + # restore points. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::RestorePointListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_azure_adadministrators.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_azure_adadministrators.rb index 1f190c8c2c..bedb82eb5a 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_azure_adadministrators.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_azure_adadministrators.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -231,8 +231,8 @@ def get_async(resource_group_name, server_name, custom_headers = nil) # # @return [ServerAdministratorListResult] operation results. # - def list(resource_group_name, server_name, custom_headers = nil) - response = list_async(resource_group_name, server_name, custom_headers).value! + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end @@ -248,8 +248,8 @@ def list(resource_group_name, server_name, custom_headers = nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(resource_group_name, server_name, custom_headers = nil) - list_async(resource_group_name, server_name, custom_headers).value! + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! end # @@ -264,7 +264,7 @@ def list_with_http_info(resource_group_name, server_name, custom_headers = nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(resource_group_name, server_name, custom_headers = nil) + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_communication_links.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_communication_links.rb index f90238268a..4db3cf9119 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_communication_links.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_communication_links.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_connection_policies.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_connection_policies.rb new file mode 100644 index 0000000000..c2c9513fa7 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_connection_policies.rb @@ -0,0 +1,250 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ServerConnectionPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the ServerConnectionPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Creates or updates the server's connection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerConnectionPolicy] The required parameters for + # updating a secure connection policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerConnectionPolicy] operation results. + # + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the server's connection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerConnectionPolicy] The required parameters for + # updating a secure connection policy. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! + end + + # + # Creates or updates the server's connection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerConnectionPolicy] The required parameters for + # updating a secure connection policy. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + connection_policy_name = 'default' + 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::ARM::SQL::Models::ServerConnectionPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}' + + 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,'serverName' => server_name,'connectionPolicyName' => connection_policy_name}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 server's secure connection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerConnectionPolicy] operation results. + # + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the server's secure connection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Gets the server's secure connection policy. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + connection_policy_name = 'default' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}' + + 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,'serverName' => server_name,'connectionPolicyName' => connection_policy_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_keys.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_keys.rb index 11824fa519..13e3d7cd3d 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_keys.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_keys.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -25,7 +25,7 @@ def initialize(client) attr_reader :client # - # Returns a list of server keys. + # Gets a list of server keys. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -42,7 +42,7 @@ def list_by_server(resource_group_name, server_name, custom_headers = nil) end # - # Returns a list of server keys. + # Gets a list of server keys. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -58,7 +58,7 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade end # - # Returns a list of server keys. + # Gets a list of server keys. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -122,7 +122,7 @@ def list_by_server_async(resource_group_name, server_name, custom_headers = nil) end # - # Returns a server key. + # Gets a server key. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -140,7 +140,7 @@ def get(resource_group_name, server_name, key_name, custom_headers = nil) end # - # Returns a server key. + # Gets a server key. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -157,7 +157,7 @@ def get_with_http_info(resource_group_name, server_name, key_name, custom_header end # - # Returns a server key. + # Gets a server key. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -556,7 +556,7 @@ def begin_delete_async(resource_group_name, server_name, key_name, custom_header end # - # Returns a list of server keys. + # Gets a list of server keys. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -571,7 +571,7 @@ def list_by_server_next(next_page_link, custom_headers = nil) end # - # Returns a list of server keys. + # Gets a list of server keys. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -585,7 +585,7 @@ def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) end # - # Returns a list of server keys. + # Gets a list of server keys. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -643,7 +643,7 @@ def list_by_server_next_async(next_page_link, custom_headers = nil) end # - # Returns a list of server keys. + # Gets a list of server keys. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_usages.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_usages.rb new file mode 100644 index 0000000000..b7c7b8cf5c --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/server_usages.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::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ServerUsages + include MsRestAzure + + # + # Creates and initializes a new instance of the ServerUsages class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Returns server usages. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServerUsageListResult] operation results. + # + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns server usages. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Returns server usages. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages' + + 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,'serverName' => server_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServerUsageListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/servers.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/servers.rb index 630de86e12..b0564c8e56 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/servers.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/servers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -25,210 +25,47 @@ def initialize(client) attr_reader :client # - # Gets a server backup long term retention vault - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [BackupLongTermRetentionVault] operation results. - # - def get_backup_long_term_retention_vault(resource_group_name, server_name, custom_headers = nil) - response = get_backup_long_term_retention_vault_async(resource_group_name, server_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a server backup long term retention vault - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_backup_long_term_retention_vault_with_http_info(resource_group_name, server_name, custom_headers = nil) - get_backup_long_term_retention_vault_async(resource_group_name, server_name, custom_headers).value! - end - - # - # Gets a server backup long term retention vault - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_backup_long_term_retention_vault_async(resource_group_name, server_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - backup_long_term_retention_vault_name = 'RegisteredVault' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}' - - 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,'serverName' => server_name,'backupLongTermRetentionVaultName' => backup_long_term_retention_vault_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Updates a server backup long term retention vault - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [BackupLongTermRetentionVault] The required parameters to - # update a backup long term retention vault - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [BackupLongTermRetentionVault] operation results. - # - def create_backup_long_term_retention_vault(resource_group_name, server_name, parameters, custom_headers = nil) - response = create_backup_long_term_retention_vault_async(resource_group_name, server_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [BackupLongTermRetentionVault] The required parameters to - # update a backup long term retention vault - # @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_backup_long_term_retention_vault_async(resource_group_name, server_name, parameters, custom_headers = nil) - # Send request - promise = begin_create_backup_long_term_retention_vault_async(resource_group_name, server_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionVault.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 the server's connection policy. + # Determines whether a resource can be created with the specified name. # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [ServerConnectionPolicy] The required parameters for - # updating a secure connection policy. + # @param parameters [CheckNameAvailabilityRequest] The parameters to request + # for name availability. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServerConnectionPolicy] operation results. + # @return [CheckNameAvailabilityResponse] operation results. # - def create_or_update_connection_policy(resource_group_name, server_name, parameters, custom_headers = nil) - response = create_or_update_connection_policy_async(resource_group_name, server_name, parameters, 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 # - # Creates or updates the server's connection policy. + # Determines whether a resource can be created with the specified name. # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [ServerConnectionPolicy] The required parameters for - # updating a secure connection policy. + # @param parameters [CheckNameAvailabilityRequest] The parameters to request + # for name availability. # @param custom_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_connection_policy_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) - create_or_update_connection_policy_async(resource_group_name, server_name, parameters, custom_headers).value! + def check_name_availability_with_http_info(parameters, custom_headers = nil) + check_name_availability_async(parameters, custom_headers).value! end # - # Creates or updates the server's connection policy. + # Determines whether a resource can be created with the specified name. # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [ServerConnectionPolicy] The required parameters for - # updating a secure connection policy. + # @param parameters [CheckNameAvailabilityRequest] The parameters to request + # for name availability. # @param [Hash{String => String}] 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_connection_policy_async(resource_group_name, server_name, parameters, custom_headers = nil) + def check_name_availability_async(parameters, custom_headers = nil) api_version = '2014-04-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - connection_policy_name = 'default' fail ArgumentError, 'parameters is nil' if parameters.nil? @@ -241,29 +78,29 @@ def create_or_update_connection_policy_async(resource_group_name, server_name, p request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper() + request_mapper = Azure::ARM::SQL::Models::CheckNameAvailabilityRequest.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/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,'resourceGroupName' => resource_group_name,'serverName' => server_name,'connectionPolicyName' => connection_policy_name}, + path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 == 201 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -273,17 +110,7 @@ def create_or_update_connection_policy_async(resource_group_name, server_name, p if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::CheckNameAvailabilityResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -297,56 +124,41 @@ def create_or_update_connection_policy_async(resource_group_name, server_name, p end # - # Gets the server's secure connection policy. + # Gets a list of all servers in the subscription. # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServerConnectionPolicy] operation results. + # @return [Array] operation results. # - def get_connection_policy(resource_group_name, server_name, custom_headers = nil) - response = get_connection_policy_async(resource_group_name, server_name, custom_headers).value! - response.body unless response.nil? + def list(custom_headers = nil) + first_page = list_as_lazy(custom_headers) + first_page.get_all_items end # - # Gets the server's secure connection policy. + # Gets a list of all servers in the subscription. # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_connection_policy_with_http_info(resource_group_name, server_name, custom_headers = nil) - get_connection_policy_async(resource_group_name, server_name, custom_headers).value! + def list_with_http_info(custom_headers = nil) + list_async(custom_headers).value! end # - # Gets the server's secure connection policy. + # Gets a list of all servers in the subscription. # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_connection_policy_async(resource_group_name, server_name, custom_headers = nil) - api_version = '2014-04-01' + def list_async(custom_headers = nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - connection_policy_name = 'default' + api_version = '2015-05-01-preview' request_headers = {} @@ -354,13 +166,13 @@ def get_connection_policy_async(resource_group_name, server_name, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}' + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers' 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,'serverName' => server_name,'connectionPolicyName' => connection_policy_name}, + path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -381,7 +193,7 @@ def get_connection_policy_async(resource_group_name, server_name, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper() + result_mapper = Azure::ARM::SQL::Models::ServerListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -395,62 +207,51 @@ def get_connection_policy_async(resource_group_name, server_name, custom_headers end # - # Gets a database service objective. + # Gets a list of servers in a resource groups. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param service_objective_name [String] The name of the service objective to - # retrieve. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServiceObjective] operation results. + # @return [Array] operation results. # - def get_service_objective(resource_group_name, server_name, service_objective_name, custom_headers = nil) - response = get_service_objective_async(resource_group_name, server_name, service_objective_name, custom_headers).value! - response.body unless response.nil? + def list_by_resource_group(resource_group_name, custom_headers = nil) + first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers) + first_page.get_all_items end # - # Gets a database service objective. + # Gets a list of servers in a resource groups. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param service_objective_name [String] The name of the service objective to - # retrieve. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_service_objective_with_http_info(resource_group_name, server_name, service_objective_name, custom_headers = nil) - get_service_objective_async(resource_group_name, server_name, service_objective_name, 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 # - # Gets a database service objective. + # Gets a list of servers in a resource groups. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param service_objective_name [String] The name of the service objective to - # retrieve. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_service_objective_async(resource_group_name, server_name, service_objective_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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, 'server_name is nil' if server_name.nil? - fail ArgumentError, 'service_objective_name is nil' if service_objective_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' request_headers = {} @@ -458,13 +259,13 @@ def get_service_objective_async(resource_group_name, server_name, service_object # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers' 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,'serverName' => server_name,'serviceObjectiveName' => service_objective_name}, + path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -485,7 +286,7 @@ def get_service_objective_async(resource_group_name, server_name, service_object if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServiceObjective.mapper() + result_mapper = Azure::ARM::SQL::Models::ServerListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -499,7 +300,7 @@ def get_service_objective_async(resource_group_name, server_name, service_object end # - # Returns database service objectives. + # Gets a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -508,15 +309,15 @@ def get_service_objective_async(resource_group_name, server_name, service_object # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ServiceObjectiveListResult] operation results. + # @return [Server] operation results. # - def list_service_objectives(resource_group_name, server_name, custom_headers = nil) - response = list_service_objectives_async(resource_group_name, server_name, custom_headers).value! + def get(resource_group_name, server_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, custom_headers).value! response.body unless response.nil? end # - # Returns database service objectives. + # Gets a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -527,12 +328,12 @@ def list_service_objectives(resource_group_name, server_name, custom_headers = n # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_service_objectives_with_http_info(resource_group_name, server_name, custom_headers = nil) - list_service_objectives_async(resource_group_name, server_name, custom_headers).value! + def get_with_http_info(resource_group_name, server_name, custom_headers = nil) + get_async(resource_group_name, server_name, custom_headers).value! end # - # Returns database service objectives. + # Gets a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource @@ -543,1002 +344,36 @@ def list_service_objectives_with_http_info(resource_group_name, server_name, cus # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_service_objectives_async(resource_group_name, server_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + def get_async(resource_group_name, server_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives' - - 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,'serverName' => server_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServiceObjectiveListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Determines whether a resource can be created with the specified name. - # - # @param parameters [CheckNameAvailabilityRequest] The parameters to request - # for name availability. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [CheckNameAvailabilityResponse] 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 - - # - # Determines whether a resource can be created with the specified name. - # - # @param parameters [CheckNameAvailabilityRequest] The parameters to request - # for name availability. - # @param custom_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 - - # - # Determines whether a resource can be created with the specified name. - # - # @param parameters [CheckNameAvailabilityRequest] The parameters to request - # for name availability. - # @param [Hash{String => String}] 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) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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::ARM::SQL::Models::CheckNameAvailabilityRequest.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/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' => 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::ARM::SQL::Models::CheckNameAvailabilityResponse.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 server usages. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [ServerUsageListResult] operation results. - # - def list_usages(resource_group_name, server_name, custom_headers = nil) - response = list_usages_async(resource_group_name, server_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns server usages. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_usages_with_http_info(resource_group_name, server_name, custom_headers = nil) - list_usages_async(resource_group_name, server_name, custom_headers).value! - end - - # - # Returns server usages. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_usages_async(resource_group_name, server_name, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages' - - 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,'serverName' => server_name}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServerUsageListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 a list of the server encryption protectors - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Array] operation results. - # - def list_encryption_protectors(resource_group_name, server_name, custom_headers = nil) - first_page = list_encryption_protectors_as_lazy(resource_group_name, server_name, custom_headers) - first_page.get_all_items - end - - # - # Returns a list of the server encryption protectors - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_encryption_protectors_with_http_info(resource_group_name, server_name, custom_headers = nil) - list_encryption_protectors_async(resource_group_name, server_name, custom_headers).value! - end - - # - # Returns a list of the server encryption protectors - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_encryption_protectors_async(resource_group_name, server_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::EncryptionProtectorListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 server encryption protector. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [EncryptionProtector] operation results. - # - def get_encryption_protector(resource_group_name, server_name, custom_headers = nil) - response = get_encryption_protector_async(resource_group_name, server_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns the server encryption protector. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_encryption_protector_with_http_info(resource_group_name, server_name, custom_headers = nil) - get_encryption_protector_async(resource_group_name, server_name, custom_headers).value! - end - - # - # Returns the server encryption protector. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_encryption_protector_async(resource_group_name, server_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - encryption_protector_name = 'current' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'encryptionProtectorName' => encryption_protector_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::EncryptionProtector.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 encryption protector. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [EncryptionProtector] The requested encryption protector - # resource state. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [EncryptionProtector] operation results. - # - def create_or_update_encryption_protector(resource_group_name, server_name, parameters, custom_headers = nil) - response = create_or_update_encryption_protector_async(resource_group_name, server_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [EncryptionProtector] The requested encryption protector - # resource state. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def create_or_update_encryption_protector_async(resource_group_name, server_name, parameters, custom_headers = nil) - # Send request - promise = begin_create_or_update_encryption_protector_async(resource_group_name, server_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::EncryptionProtector.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Gets a list of all servers in the subscription. - # - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Array] operation results. - # - def list(custom_headers = nil) - first_page = list_as_lazy(custom_headers) - first_page.get_all_items - end - - # - # Gets a list of all servers in the subscription. - # - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_with_http_info(custom_headers = nil) - list_async(custom_headers).value! - end - - # - # Gets a list of all servers in the subscription. - # - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_async(custom_headers = nil) - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers' - - 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' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServerListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets a list of servers in a resource groups. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Array] operation results. - # - def list_by_resource_group(resource_group_name, custom_headers = nil) - first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers) - first_page.get_all_items - end - - # - # Gets a list of servers in a resource groups. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) - list_by_resource_group_async(resource_group_name, custom_headers).value! - end - - # - # Gets a list of servers in a resource groups. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_resource_group_async(resource_group_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers' - - 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' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::ServerListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Gets a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Server] operation results. - # - def get(resource_group_name, server_name, custom_headers = nil) - response = get_async(resource_group_name, server_name, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def get_with_http_info(resource_group_name, server_name, custom_headers = nil) - get_async(resource_group_name, server_name, custom_headers).value! - end - - # - # Gets a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def get_async(resource_group_name, server_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::Server.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - - # - # Creates or updates a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [Server] The requested server resource state. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Server] operation results. - # - def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) - response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [Server] The requested server resource state. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) - # Send request - promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::Server.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Deletes a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - def delete(resource_group_name, server_name, custom_headers = nil) - response = delete_async(resource_group_name, server_name, custom_headers).value! - nil - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def delete_async(resource_group_name, server_name, custom_headers = nil) - # Send request - promise = begin_delete_async(resource_group_name, server_name, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Updates a server. - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [ServerUpdate] The requested server resource state. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Server] operation results. - # - def update(resource_group_name, server_name, parameters, custom_headers = nil) - response = update_async(resource_group_name, server_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [ServerUpdate] The requested server resource state. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def update_async(resource_group_name, server_name, parameters, custom_headers = nil) - # Send request - promise = begin_update_async(resource_group_name, server_name, parameters, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::SQL::Models::Server.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 a server backup long term retention vault - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [BackupLongTermRetentionVault] The required parameters to - # update a backup long term retention vault - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [BackupLongTermRetentionVault] operation results. - # - def begin_create_backup_long_term_retention_vault(resource_group_name, server_name, parameters, custom_headers = nil) - response = begin_create_backup_long_term_retention_vault_async(resource_group_name, server_name, parameters, custom_headers).value! - response.body unless response.nil? - end - - # - # Updates a server backup long term retention vault - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [BackupLongTermRetentionVault] The required parameters to - # update a backup long term retention vault - # @param custom_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_backup_long_term_retention_vault_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) - begin_create_backup_long_term_retention_vault_async(resource_group_name, server_name, parameters, custom_headers).value! - end - - # - # Updates a server backup long term retention vault - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param parameters [BackupLongTermRetentionVault] The required parameters to - # update a backup long term retention vault - # @param [Hash{String => String}] 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_backup_long_term_retention_vault_async(resource_group_name, server_name, parameters, custom_headers = nil) - api_version = '2014-04-01' - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - backup_long_term_retention_vault_name = 'RegisteredVault' - 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::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}' + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}' 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,'serverName' => server_name,'backupLongTermRetentionVaultName' => backup_long_term_retention_vault_name}, + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 || status_code == 201 || status_code == 202 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -1548,17 +383,7 @@ def begin_create_backup_long_term_retention_vault_async(resource_group_name, ser if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::BackupLongTermRetentionVault.mapper() + result_mapper = Azure::ARM::SQL::Models::Server.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -1572,117 +397,141 @@ def begin_create_backup_long_term_retention_vault_async(resource_group_name, ser end # - # Updates an existing encryption protector. + # Creates or updates a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param parameters [EncryptionProtector] The requested encryption protector - # resource state. + # @param parameters [Server] The requested server resource state. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EncryptionProtector] operation results. + # @return [Server] operation results. # - def begin_create_or_update_encryption_protector(resource_group_name, server_name, parameters, custom_headers = nil) - response = begin_create_or_update_encryption_protector_async(resource_group_name, server_name, parameters, custom_headers).value! + def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value! response.body unless response.nil? end - # - # Updates an existing encryption protector. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param parameters [EncryptionProtector] The requested encryption protector - # resource state. + # @param parameters [Server] The requested server resource state. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def begin_create_or_update_encryption_protector_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil) - begin_create_or_update_encryption_protector_async(resource_group_name, server_name, parameters, custom_headers).value! + def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::Server.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 encryption protector. + # Deletes a server. # # @param resource_group_name [String] The name of the resource group that # contains the resource. You can obtain this value from the Azure Resource # Manager API or the portal. # @param server_name [String] The name of the server. - # @param parameters [EncryptionProtector] The requested encryption protector - # resource state. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - def begin_create_or_update_encryption_protector_async(resource_group_name, server_name, parameters, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'server_name is nil' if server_name.nil? - encryption_protector_name = 'current' - fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2015-05-01-preview' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + def delete(resource_group_name, server_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, custom_headers).value! + nil + end - request_headers['Content-Type'] = 'application/json; charset=utf-8' + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, server_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, server_name, custom_headers) - # Serialize Request - request_mapper = Azure::ARM::SQL::Models::EncryptionProtector.mapper() - request_content = @client.serialize(request_mapper, parameters) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}' + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end - request_url = @base_url || @client.base_url + promise + end - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'encryptionProtectorName' => encryption_protector_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - body: request_content, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:put, path_template, options) + # + # Updates a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerUpdate] The requested server resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Server] operation results. + # + def update(resource_group_name, server_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, parameters, custom_headers).value! + response.body unless response.nil? + end - 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 + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param parameters [ServerUpdate] The requested server resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_async(resource_group_name, server_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, server_name, parameters, custom_headers) - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::EncryptionProtector.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::Server.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) end - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # @@ -2001,93 +850,6 @@ def begin_update_async(resource_group_name, server_name, parameters, custom_head promise.execute end - # - # Returns a list of the server encryption protectors - # - # @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 [EncryptionProtectorListResult] operation results. - # - def list_encryption_protectors_next(next_page_link, custom_headers = nil) - response = list_encryption_protectors_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Returns a list of the server encryption protectors - # - # @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_encryption_protectors_next_with_http_info(next_page_link, custom_headers = nil) - list_encryption_protectors_next_async(next_page_link, custom_headers).value! - end - - # - # Returns a list of the server encryption protectors - # - # @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_encryption_protectors_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:get, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::SQL::Models::EncryptionProtectorListResult.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - - result - end - - promise.execute - end - # # Gets a list of all servers in the subscription. # @@ -2262,30 +1024,6 @@ def list_by_resource_group_next_async(next_page_link, custom_headers = nil) promise.execute end - # - # Returns a list of the server encryption protectors - # - # @param resource_group_name [String] The name of the resource group that - # contains the resource. You can obtain this value from the Azure Resource - # Manager API or the portal. - # @param server_name [String] The name of the server. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [EncryptionProtectorListResult] which provide lazy access to pages of - # the response. - # - def list_encryption_protectors_as_lazy(resource_group_name, server_name, custom_headers = nil) - response = list_encryption_protectors_async(resource_group_name, server_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_encryption_protectors_next_async(next_page_link, custom_headers) - end - page - end - end - # # Gets a list of all servers in the subscription. # diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/service_objectives.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/service_objectives.rb new file mode 100644 index 0000000000..6e9c56f1cb --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/service_objectives.rb @@ -0,0 +1,229 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ServiceObjectives + include MsRestAzure + + # + # Creates and initializes a new instance of the ServiceObjectives class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a database service objective. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param service_objective_name [String] The name of the service objective to + # retrieve. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServiceObjective] operation results. + # + def get(resource_group_name, server_name, service_objective_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, service_objective_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database service objective. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param service_objective_name [String] The name of the service objective to + # retrieve. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, service_objective_name, custom_headers = nil) + get_async(resource_group_name, server_name, service_objective_name, custom_headers).value! + end + + # + # Gets a database service objective. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param service_objective_name [String] The name of the service objective to + # retrieve. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, service_objective_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'service_objective_name is nil' if service_objective_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}' + + 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,'serverName' => server_name,'serviceObjectiveName' => service_objective_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServiceObjective.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 database service objectives. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServiceObjectiveListResult] operation results. + # + def list_by_server(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns database service objectives. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Returns database service objectives. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives' + + 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,'serverName' => server_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServiceObjectiveListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/service_tier_advisors.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/service_tier_advisors.rb new file mode 100644 index 0000000000..e9271c73dc --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/service_tier_advisors.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::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class ServiceTierAdvisors + include MsRestAzure + + # + # Creates and initializes a new instance of the ServiceTierAdvisors class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a service tier advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of database. + # @param service_tier_advisor_name [String] The name of service tier advisor. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServiceTierAdvisor] operation results. + # + def get(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a service tier advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of database. + # @param service_tier_advisor_name [String] The name of service tier advisor. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers).value! + end + + # + # Gets a service tier advisor. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of database. + # @param service_tier_advisor_name [String] The name of service tier advisor. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, service_tier_advisor_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'service_tier_advisor_name is nil' if service_tier_advisor_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors/{serviceTierAdvisorName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'serviceTierAdvisorName' => service_tier_advisor_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServiceTierAdvisor.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 service tier advisors for specified database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ServiceTierAdvisorListResult] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns service tier advisors for specified database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of database. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Returns service tier advisors for specified database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of database. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors' + + 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,'serverName' => server_name,'databaseName' => database_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::ServiceTierAdvisorListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sql_management_client.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sql_management_client.rb index 565af17b44..048cb463f3 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sql_management_client.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sql_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -32,11 +32,15 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # is generated and included in each request. Default is true. attr_accessor :generate_client_request_id - # @return [Databases] databases - attr_reader :databases + # @return [BackupLongTermRetentionPolicies] + # backup_long_term_retention_policies + attr_reader :backup_long_term_retention_policies - # @return [Servers] servers - attr_reader :servers + # @return [BackupLongTermRetentionVaults] backup_long_term_retention_vaults + attr_reader :backup_long_term_retention_vaults + + # @return [RestorePoints] restore_points + attr_reader :restore_points # @return [RecoverableDatabases] recoverable_databases attr_reader :recoverable_databases @@ -47,14 +51,33 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # @return [Capabilities] capabilities attr_reader :capabilities + # @return [ServerConnectionPolicies] server_connection_policies + attr_reader :server_connection_policies + + # @return [DatabaseThreatDetectionPolicies] + # database_threat_detection_policies + attr_reader :database_threat_detection_policies + + # @return [DataMaskingPolicies] data_masking_policies + attr_reader :data_masking_policies + + # @return [DataMaskingRules] data_masking_rules + attr_reader :data_masking_rules + # @return [FirewallRules] firewall_rules attr_reader :firewall_rules + # @return [GeoBackupPolicies] geo_backup_policies + attr_reader :geo_backup_policies + + # @return [Databases] databases + attr_reader :databases + # @return [ElasticPools] elastic_pools attr_reader :elastic_pools - # @return [Operations] operations - attr_reader :operations + # @return [ReplicationLinks] replication_links + attr_reader :replication_links # @return [ServerAzureADAdministrators] server_azure_adadministrators attr_reader :server_azure_adadministrators @@ -62,18 +85,67 @@ class SqlManagementClient < MsRestAzure::AzureServiceClient # @return [ServerCommunicationLinks] server_communication_links attr_reader :server_communication_links + # @return [ServiceObjectives] service_objectives + attr_reader :service_objectives + + # @return [Servers] servers + attr_reader :servers + + # @return [ElasticPoolActivities] elastic_pool_activities + attr_reader :elastic_pool_activities + + # @return [ElasticPoolDatabaseActivities] elastic_pool_database_activities + attr_reader :elastic_pool_database_activities + # @return [RecommendedElasticPools] recommended_elastic_pools attr_reader :recommended_elastic_pools + # @return [ServiceTierAdvisors] service_tier_advisors + attr_reader :service_tier_advisors + + # @return [TransparentDataEncryptions] transparent_data_encryptions + attr_reader :transparent_data_encryptions + + # @return [TransparentDataEncryptionActivities] + # transparent_data_encryption_activities + attr_reader :transparent_data_encryption_activities + + # @return [ServerUsages] server_usages + attr_reader :server_usages + + # @return [DatabaseUsages] database_usages + attr_reader :database_usages + + # @return [DatabaseBlobAuditingPolicies] database_blob_auditing_policies + attr_reader :database_blob_auditing_policies + + # @return [EncryptionProtectors] encryption_protectors + attr_reader :encryption_protectors + # @return [FailoverGroups] failover_groups attr_reader :failover_groups + # @return [Operations] operations + attr_reader :operations + # @return [ServerKeys] server_keys attr_reader :server_keys + # @return [SyncAgents] sync_agents + attr_reader :sync_agents + + # @return [SyncGroups] sync_groups + attr_reader :sync_groups + + # @return [SyncMembers] sync_members + attr_reader :sync_members + # @return [VirtualNetworkRules] virtual_network_rules attr_reader :virtual_network_rules + # @return [DatabaseOperations] database_operations + attr_reader :database_operations + # # Creates initializes a new instance of the SqlManagementClient class. # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @@ -87,20 +159,43 @@ def initialize(credentials = nil, base_url = nil, options = nil) fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials - @databases = Databases.new(self) - @servers = Servers.new(self) + @backup_long_term_retention_policies = BackupLongTermRetentionPolicies.new(self) + @backup_long_term_retention_vaults = BackupLongTermRetentionVaults.new(self) + @restore_points = RestorePoints.new(self) @recoverable_databases = RecoverableDatabases.new(self) @restorable_dropped_databases = RestorableDroppedDatabases.new(self) @capabilities = Capabilities.new(self) + @server_connection_policies = ServerConnectionPolicies.new(self) + @database_threat_detection_policies = DatabaseThreatDetectionPolicies.new(self) + @data_masking_policies = DataMaskingPolicies.new(self) + @data_masking_rules = DataMaskingRules.new(self) @firewall_rules = FirewallRules.new(self) + @geo_backup_policies = GeoBackupPolicies.new(self) + @databases = Databases.new(self) @elastic_pools = ElasticPools.new(self) - @operations = Operations.new(self) + @replication_links = ReplicationLinks.new(self) @server_azure_adadministrators = ServerAzureADAdministrators.new(self) @server_communication_links = ServerCommunicationLinks.new(self) + @service_objectives = ServiceObjectives.new(self) + @servers = Servers.new(self) + @elastic_pool_activities = ElasticPoolActivities.new(self) + @elastic_pool_database_activities = ElasticPoolDatabaseActivities.new(self) @recommended_elastic_pools = RecommendedElasticPools.new(self) + @service_tier_advisors = ServiceTierAdvisors.new(self) + @transparent_data_encryptions = TransparentDataEncryptions.new(self) + @transparent_data_encryption_activities = TransparentDataEncryptionActivities.new(self) + @server_usages = ServerUsages.new(self) + @database_usages = DatabaseUsages.new(self) + @database_blob_auditing_policies = DatabaseBlobAuditingPolicies.new(self) + @encryption_protectors = EncryptionProtectors.new(self) @failover_groups = FailoverGroups.new(self) + @operations = Operations.new(self) @server_keys = ServerKeys.new(self) + @sync_agents = SyncAgents.new(self) + @sync_groups = SyncGroups.new(self) + @sync_members = SyncMembers.new(self) @virtual_network_rules = VirtualNetworkRules.new(self) + @database_operations = DatabaseOperations.new(self) @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_agents.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_agents.rb new file mode 100644 index 0000000000..fe9070a797 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_agents.rb @@ -0,0 +1,983 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class SyncAgents + include MsRestAzure + + # + # Creates and initializes a new instance of the SyncAgents class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgent] operation results. + # + def get(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + get_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + end + + # + # Gets a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'syncAgentName' => sync_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncAgent.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param parameters [SyncAgent] The requested sync agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgent] operation results. + # + def create_or_update(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param parameters [SyncAgent] The requested sync agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::SyncAgent.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists sync agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_server(resource_group_name, server_name, custom_headers = nil) + first_page = list_by_server_as_lazy(resource_group_name, server_name, custom_headers) + first_page.get_all_items + end + + # + # Lists sync agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil) + list_by_server_async(resource_group_name, server_name, custom_headers).value! + end + + # + # Lists sync agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_server_async(resource_group_name, server_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncAgentListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Generates a sync agent key. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgentKeyProperties] operation results. + # + def generate_key(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Generates a sync agent key. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def generate_key_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + end + + # + # Generates a sync agent key. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def generate_key_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'syncAgentName' => sync_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::SQL::Models::SyncAgentKeyProperties.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 databases linked to a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_linked_databases(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + first_page = list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers) + first_page.get_all_items + end + + # + # Lists databases linked to a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_linked_databases_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + end + + # + # Lists databases linked to a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'syncAgentName' => sync_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncAgentLinkedDatabaseListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param parameters [SyncAgent] The requested sync agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgent] operation results. + # + def begin_create_or_update(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param parameters [SyncAgent] The requested sync agent resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers).value! + end + + # + # Creates or updates a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param parameters [SyncAgent] The requested sync agent resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, sync_agent_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::SyncAgent.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'syncAgentName' => sync_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncAgent.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncAgent.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + nil + end + + # + # Deletes a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + end + + # + # Deletes a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'sync_agent_name is nil' if sync_agent_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'syncAgentName' => sync_agent_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists sync agents in a server. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgentListResult] operation results. + # + def list_by_server_next(next_page_link, custom_headers = nil) + response = list_by_server_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists sync agents in a server. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_server_next_with_http_info(next_page_link, custom_headers = nil) + list_by_server_next_async(next_page_link, custom_headers).value! + end + + # + # Lists sync agents in a server. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_server_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncAgentListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 databases linked to a sync agent. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgentLinkedDatabaseListResult] operation results. + # + def list_linked_databases_next(next_page_link, custom_headers = nil) + response = list_linked_databases_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists databases linked to a sync agent. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_linked_databases_next_with_http_info(next_page_link, custom_headers = nil) + list_linked_databases_next_async(next_page_link, custom_headers).value! + end + + # + # Lists databases linked to a sync agent. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_linked_databases_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncAgentLinkedDatabaseListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 sync agents in a server. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgentListResult] which provide lazy access to pages of the + # response. + # + def list_by_server_as_lazy(resource_group_name, server_name, custom_headers = nil) + response = list_by_server_async(resource_group_name, server_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_server_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists databases linked to a sync agent. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server on which the sync agent is + # hosted. + # @param sync_agent_name [String] The name of the sync agent. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncAgentLinkedDatabaseListResult] which provide lazy access to + # pages of the response. + # + def list_linked_databases_as_lazy(resource_group_name, server_name, sync_agent_name, custom_headers = nil) + response = list_linked_databases_async(resource_group_name, server_name, sync_agent_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_linked_databases_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_groups.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_groups.rb new file mode 100644 index 0000000000..649d307a54 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_groups.rb @@ -0,0 +1,1863 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class SyncGroups + include MsRestAzure + + # + # Creates and initializes a new instance of the SyncGroups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a collection of sync database ids. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @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_sync_database_ids(location_name, custom_headers = nil) + first_page = list_sync_database_ids_as_lazy(location_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a collection of sync database ids. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param custom_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_sync_database_ids_with_http_info(location_name, custom_headers = nil) + list_sync_database_ids_async(location_name, custom_headers).value! + end + + # + # Gets a collection of sync database ids. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param [Hash{String => String}] 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_sync_database_ids_async(location_name, custom_headers = nil) + fail ArgumentError, 'location_name is nil' if location_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncDatabaseIdListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Refreshes a hub database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @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 refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + # Send request + promise = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets a collection of hub database schemas. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + first_page = list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a collection of hub database schemas. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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_hub_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + end + + # + # Gets a collection of hub database schemas. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncFullSchemaPropertiesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a collection of sync group logs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param start_time [String] Get logs generated after this time. + # @param end_time [String] Get logs generated before this time. + # @param type [Enum] The types of logs to retrieve. Possible values include: + # 'All', 'Error', 'Warning', 'Success' + # @param continuation_token [String] The continuation token for this operation. + # @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_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) + first_page = list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token, custom_headers) + first_page.get_all_items + end + + # + # Gets a collection of sync group logs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param start_time [String] Get logs generated after this time. + # @param end_time [String] Get logs generated before this time. + # @param type [Enum] The types of logs to retrieve. Possible values include: + # 'All', 'Error', 'Warning', 'Success' + # @param continuation_token [String] The continuation token for this 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_logs_with_http_info(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) + list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token, custom_headers).value! + end + + # + # Gets a collection of sync group logs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param start_time [String] Get logs generated after this time. + # @param end_time [String] Get logs generated before this time. + # @param type [Enum] The types of logs to retrieve. Possible values include: + # 'All', 'Error', 'Warning', 'Success' + # @param continuation_token [String] The continuation token for this 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_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'start_time is nil' if start_time.nil? + fail ArgumentError, 'end_time is nil' if end_time.nil? + fail ArgumentError, 'type is nil' if type.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'startTime' => start_time,'endTime' => end_time,'type' => type,'continuationToken' => continuation_token,'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncGroupLogListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Cancels a sync group synchronization. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def cancel_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + nil + end + + # + # Cancels a sync group synchronization. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + end + + # + # Cancels a sync group synchronization. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Triggers a sync group synchronization. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def trigger_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + nil + end + + # + # Triggers a sync group synchronization. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 trigger_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + end + + # + # Triggers a sync group synchronization. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroup] operation results. + # + def get(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + end + + # + # Gets a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroup] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::SyncGroup.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroup] operation results. + # + def update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::SyncGroup.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists sync groups under a hub database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil) + first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers) + first_page.get_all_items + end + + # + # Lists sync groups under a hub database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Lists sync groups under a hub database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Refreshes a hub database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + nil + end + + # + # Refreshes a hub database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 begin_refresh_hub_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + end + + # + # Refreshes a hub database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates or updates a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroup] operation results. + # + def begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! + end + + # + # Creates or updates a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::SyncGroup.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + nil + end + + # + # Deletes a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + end + + # + # Deletes a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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 begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroup] operation results. + # + def begin_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers).value! + end + + # + # Updates a sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param parameters [SyncGroup] The requested sync group resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::SyncGroup.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::SQL::Models::SyncGroup.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a collection of sync database ids. + # + # @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 [SyncDatabaseIdListResult] operation results. + # + def list_sync_database_ids_next(next_page_link, custom_headers = nil) + response = list_sync_database_ids_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a collection of sync database ids. + # + # @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_sync_database_ids_next_with_http_info(next_page_link, custom_headers = nil) + list_sync_database_ids_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a collection of sync database ids. + # + # @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_sync_database_ids_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncDatabaseIdListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a collection of hub database schemas. + # + # @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 [SyncFullSchemaPropertiesListResult] operation results. + # + def list_hub_schemas_next(next_page_link, custom_headers = nil) + response = list_hub_schemas_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a collection of hub database schemas. + # + # @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_hub_schemas_next_with_http_info(next_page_link, custom_headers = nil) + list_hub_schemas_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a collection of hub database schemas. + # + # @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_hub_schemas_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncFullSchemaPropertiesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a collection of sync group logs. + # + # @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 [SyncGroupLogListResult] operation results. + # + def list_logs_next(next_page_link, custom_headers = nil) + response = list_logs_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a collection of sync group logs. + # + # @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_logs_next_with_http_info(next_page_link, custom_headers = nil) + list_logs_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a collection of sync group logs. + # + # @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_logs_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncGroupLogListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 sync groups under a hub database. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroupListResult] operation results. + # + def list_by_database_next(next_page_link, custom_headers = nil) + response = list_by_database_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists sync groups under a hub database. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_database_next_with_http_info(next_page_link, custom_headers = nil) + list_by_database_next_async(next_page_link, custom_headers).value! + end + + # + # Lists sync groups under a hub database. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_database_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a collection of sync database ids. + # + # @param location_name [String] The name of the region where the resource is + # located. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncDatabaseIdListResult] which provide lazy access to pages of the + # response. + # + def list_sync_database_ids_as_lazy(location_name, custom_headers = nil) + response = list_sync_database_ids_async(location_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_sync_database_ids_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets a collection of hub database schemas. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncFullSchemaPropertiesListResult] which provide lazy access to + # pages of the response. + # + def list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_hub_schemas_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets a collection of sync group logs. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param start_time [String] Get logs generated after this time. + # @param end_time [String] Get logs generated before this time. + # @param type [Enum] The types of logs to retrieve. Possible values include: + # 'All', 'Error', 'Warning', 'Success' + # @param continuation_token [String] The continuation token for this operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroupLogListResult] which provide lazy access to pages of the + # response. + # + def list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token = nil, custom_headers = nil) + response = list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_logs_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists sync groups under a hub database. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncGroupListResult] which provide lazy access to pages of the + # response. + # + def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_database_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_members.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_members.rb new file mode 100644 index 0000000000..42bfb6bb49 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/sync_members.rb @@ -0,0 +1,1290 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class SyncMembers + include MsRestAzure + + # + # Creates and initializes a new instance of the SyncMembers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Gets a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncMember] operation results. + # + def get(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + end + + # + # Gets a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'sync_member_name is nil' if sync_member_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'syncMemberName' => sync_member_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncMember.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncMember] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::SyncMember.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates an existing sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncMember] operation results. + # + def update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::SQL::Models::SyncMember.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Lists sync members in the given sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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_sync_group(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + first_page = list_by_sync_group_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers) + first_page.get_all_items + end + + # + # Lists sync members in the given sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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_sync_group_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + end + + # + # Lists sync members in the given sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync 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_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncMemberListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @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_member_schemas(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + first_page = list_member_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers) + first_page.get_all_items + end + + # + # Gets a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_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_member_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + end + + # + # Gets a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param [Hash{String => String}] 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_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'sync_member_name is nil' if sync_member_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/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,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'syncMemberName' => sync_member_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncFullSchemaPropertiesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Refreshes a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def refresh_member_schema(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @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 refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + # Send request + promise = begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncMember] operation results. + # + def begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! + end + + # + # Creates or updates a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'sync_member_name is nil' if sync_member_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::SyncMember.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'syncMemberName' => sync_member_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncMember.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncMember.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + nil + end + + # + # Deletes a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + end + + # + # Deletes a sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'sync_member_name is nil' if sync_member_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'syncMemberName' => sync_member_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates an existing sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncMember] operation results. + # + def begin_update(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + response = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates an existing sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers).value! + end + + # + # Updates an existing sync member. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param parameters [SyncMember] The requested sync member resource state. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'sync_member_name is nil' if sync_member_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::SQL::Models::SyncMember.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'syncMemberName' => sync_member_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::SQL::Models::SyncMember.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Refreshes a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_refresh_member_schema(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + nil + end + + # + # Refreshes a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_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_refresh_member_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + begin_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + end + + # + # Refreshes a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param [Hash{String => String}] 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_refresh_member_schema_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? + fail ArgumentError, 'sync_member_name is nil' if sync_member_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2015-05-01-preview' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'syncMemberName' => sync_member_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Lists sync members in the given sync 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 [SyncMemberListResult] operation results. + # + def list_by_sync_group_next(next_page_link, custom_headers = nil) + response = list_by_sync_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists sync members in the given sync 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_sync_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_sync_group_next_async(next_page_link, custom_headers).value! + end + + # + # Lists sync members in the given sync 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_sync_group_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncMemberListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a sync member database schema. + # + # @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 [SyncFullSchemaPropertiesListResult] operation results. + # + def list_member_schemas_next(next_page_link, custom_headers = nil) + response = list_member_schemas_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a sync member database schema. + # + # @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_member_schemas_next_with_http_info(next_page_link, custom_headers = nil) + list_member_schemas_next_async(next_page_link, custom_headers).value! + end + + # + # Gets a sync member database schema. + # + # @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_member_schemas_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::SyncFullSchemaPropertiesListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 sync members in the given sync group. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncMemberListResult] which provide lazy access to pages of the + # response. + # + def list_by_sync_group_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers = nil) + response = list_by_sync_group_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_sync_group_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets a sync member database schema. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database on which the sync + # group is hosted. + # @param sync_group_name [String] The name of the sync group on which the sync + # member is hosted. + # @param sync_member_name [String] The name of the sync member. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SyncFullSchemaPropertiesListResult] which provide lazy access to + # pages of the response. + # + def list_member_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers = nil) + response = list_member_schemas_async(resource_group_name, server_name, database_name, sync_group_name, sync_member_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_member_schemas_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb new file mode 100644 index 0000000000..c984aa7fd9 --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb @@ -0,0 +1,133 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class TransparentDataEncryptionActivities + include MsRestAzure + + # + # Creates and initializes a new instance of the TransparentDataEncryptionActivities class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Returns a database's transparent data encryption operation result. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # transparent data encryption applies. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TransparentDataEncryptionActivityListResult] operation results. + # + def list_by_configuration(resource_group_name, server_name, database_name, custom_headers = nil) + response = list_by_configuration_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns a database's transparent data encryption operation result. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # transparent data encryption applies. + # @param custom_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_configuration_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + list_by_configuration_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Returns a database's transparent data encryption operation result. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # transparent data encryption applies. + # @param [Hash{String => String}] 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_configuration_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + transparent_data_encryption_name = 'current' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults' + + 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,'serverName' => server_name,'databaseName' => database_name,'transparentDataEncryptionName' => transparent_data_encryption_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryptionActivityListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/transparent_data_encryptions.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/transparent_data_encryptions.rb new file mode 100644 index 0000000000..1aa90171bc --- /dev/null +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/transparent_data_encryptions.rb @@ -0,0 +1,264 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::SQL + # + # The Azure SQL Database management API provides a RESTful set of web + # services that interact with Azure SQL Database services to manage your + # databases. The API enables you to create, retrieve, update, and delete + # databases. + # + class TransparentDataEncryptions + include MsRestAzure + + # + # Creates and initializes a new instance of the TransparentDataEncryptions class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [SqlManagementClient] reference to the SqlManagementClient + attr_reader :client + + # + # Creates or updates a database's transparent data encryption configuration. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which setting the + # transparent data encryption applies. + # @param parameters [TransparentDataEncryption] The required parameters for + # creating or updating transparent data encryption. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TransparentDataEncryption] operation results. + # + def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a database's transparent data encryption configuration. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which setting the + # transparent data encryption applies. + # @param parameters [TransparentDataEncryption] The required parameters for + # creating or updating transparent data encryption. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value! + end + + # + # Creates or updates a database's transparent data encryption configuration. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which setting the + # transparent data encryption applies. + # @param parameters [TransparentDataEncryption] The required parameters for + # creating or updating transparent data encryption. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + transparent_data_encryption_name = 'current' + 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::ARM::SQL::Models::TransparentDataEncryption.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'transparentDataEncryptionName' => transparent_data_encryption_name}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryption.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryption.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a database's transparent data encryption configuration. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # transparent data encryption applies. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TransparentDataEncryption] operation results. + # + def get(resource_group_name, server_name, database_name, custom_headers = nil) + response = get_async(resource_group_name, server_name, database_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a database's transparent data encryption configuration. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # transparent data encryption applies. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil) + get_async(resource_group_name, server_name, database_name, custom_headers).value! + end + + # + # Gets a database's transparent data encryption configuration. + # + # @param resource_group_name [String] The name of the resource group that + # contains the resource. You can obtain this value from the Azure Resource + # Manager API or the portal. + # @param server_name [String] The name of the server. + # @param database_name [String] The name of the database for which the + # transparent data encryption applies. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, server_name, database_name, custom_headers = nil) + api_version = '2014-04-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'server_name is nil' if server_name.nil? + fail ArgumentError, 'database_name is nil' if database_name.nil? + transparent_data_encryption_name = 'current' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}' + + 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,'serverName' => server_name,'databaseName' => database_name,'transparentDataEncryptionName' => transparent_data_encryption_name}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::SQL::Models::TransparentDataEncryption.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/version.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/version.rb index c8294282cc..da165d8d66 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/version.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::SQL - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/virtual_network_rules.rb b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/virtual_network_rules.rb index 66f13e4c8e..2b02b48fdf 100644 --- a/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/virtual_network_rules.rb +++ b/management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/virtual_network_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stor_simple8000_series/.rspec b/management/azure_mgmt_stor_simple8000_series/.rspec new file mode 100644 index 0000000000..4e33a322b5 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/.rspec @@ -0,0 +1,3 @@ +--require spec_helper +--color +--format documentation diff --git a/management/azure_mgmt_stor_simple8000_series/LICENSE.txt b/management/azure_mgmt_stor_simple8000_series/LICENSE.txt new file mode 100644 index 0000000000..d5b09a3830 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/management/azure_mgmt_stor_simple8000_series/Rakefile b/management/azure_mgmt_stor_simple8000_series/Rakefile new file mode 100644 index 0000000000..ccbf835904 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/Rakefile @@ -0,0 +1,5 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require "bundler/gem_tasks" diff --git a/management/azure_mgmt_stor_simple8000_series/azure_mgmt_stor_simple8000_series.gemspec b/management/azure_mgmt_stor_simple8000_series/azure_mgmt_stor_simple8000_series.gemspec new file mode 100644 index 0000000000..dda954b6d9 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/azure_mgmt_stor_simple8000_series.gemspec @@ -0,0 +1,34 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require 'generated/azure_mgmt_stor_simple8000_series/module_definition' +require 'generated/azure_mgmt_stor_simple8000_series/version' + +Gem::Specification.new do |spec| + spec.name = 'azure_mgmt_stor_simple8000_series' + spec.version = Azure::ARM::StorSimple8000Series::VERSION + spec.authors = 'Microsoft Corporation' + spec.email = 'azrubyteam@microsoft.com' + spec.description = 'Microsoft Azure Stor Simple 8000 Series Library for Ruby' + spec.summary = 'Official Ruby client library to consume Microsoft Azure Stor Simple 8000 Series.' + spec.homepage = 'https://aka.ms/azure-sdk-for-ruby' + spec.license = 'MIT' + + spec.files = Dir["LICENSE.txt", "lib/**/*"] + spec.bindir = 'bin' + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.required_ruby_version = '>= 2.0.0' + + spec.add_development_dependency 'bundler', '~> 1.9' + spec.add_development_dependency 'rake', '~> 10' + spec.add_development_dependency 'rspec', '~> 3' + spec.add_development_dependency 'dotenv', '~> 2' + + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/azure_mgmt_stor_simple8000_series.rb b/management/azure_mgmt_stor_simple8000_series/lib/azure_mgmt_stor_simple8000_series.rb new file mode 100644 index 0000000000..28efcc8f0f --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/azure_mgmt_stor_simple8000_series.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'generated/azure_mgmt_stor_simple8000_series' + + diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series.rb new file mode 100644 index 0000000000..a36ac8d286 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series.rb @@ -0,0 +1,202 @@ +# encoding: 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 'generated/azure_mgmt_stor_simple8000_series/module_definition' +require 'ms_rest_azure' + +module Azure::ARM::StorSimple8000Series + autoload :Operations, 'generated/azure_mgmt_stor_simple8000_series/operations.rb' + autoload :Managers, 'generated/azure_mgmt_stor_simple8000_series/managers.rb' + autoload :AccessControlRecords, 'generated/azure_mgmt_stor_simple8000_series/access_control_records.rb' + autoload :Alerts, 'generated/azure_mgmt_stor_simple8000_series/alerts.rb' + autoload :BandwidthSettings, 'generated/azure_mgmt_stor_simple8000_series/bandwidth_settings.rb' + autoload :CloudAppliances, 'generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb' + autoload :Devices, 'generated/azure_mgmt_stor_simple8000_series/devices.rb' + autoload :DeviceSettings, 'generated/azure_mgmt_stor_simple8000_series/device_settings.rb' + autoload :BackupPolicies, 'generated/azure_mgmt_stor_simple8000_series/backup_policies.rb' + autoload :BackupSchedules, 'generated/azure_mgmt_stor_simple8000_series/backup_schedules.rb' + autoload :Backups, 'generated/azure_mgmt_stor_simple8000_series/backups.rb' + autoload :HardwareComponentGroups, 'generated/azure_mgmt_stor_simple8000_series/hardware_component_groups.rb' + autoload :Jobs, 'generated/azure_mgmt_stor_simple8000_series/jobs.rb' + autoload :VolumeContainers, 'generated/azure_mgmt_stor_simple8000_series/volume_containers.rb' + autoload :Volumes, 'generated/azure_mgmt_stor_simple8000_series/volumes.rb' + autoload :StorageAccountCredentials, 'generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb' + autoload :StorSimple8000SeriesManagementClient, 'generated/azure_mgmt_stor_simple8000_series/stor_simple8000series_management_client.rb' + + module Models + autoload :TargetEligibilityResult, 'generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result.rb' + autoload :FailoverTarget, 'generated/azure_mgmt_stor_simple8000_series/models/failover_target.rb' + autoload :AccessControlRecordList, 'generated/azure_mgmt_stor_simple8000_series/models/access_control_record_list.rb' + autoload :FailoverTargetsList, 'generated/azure_mgmt_stor_simple8000_series/models/failover_targets_list.rb' + autoload :AlertSource, 'generated/azure_mgmt_stor_simple8000_series/models/alert_source.rb' + autoload :Feature, 'generated/azure_mgmt_stor_simple8000_series/models/feature.rb' + autoload :RemoteManagementSettings, 'generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings.rb' + autoload :FailoverRequest, 'generated/azure_mgmt_stor_simple8000_series/models/failover_request.rb' + autoload :AlertList, 'generated/azure_mgmt_stor_simple8000_series/models/alert_list.rb' + autoload :VolumeFailoverMetadata, 'generated/azure_mgmt_stor_simple8000_series/models/volume_failover_metadata.rb' + autoload :AsymmetricEncryptedSecret, 'generated/azure_mgmt_stor_simple8000_series/models/asymmetric_encrypted_secret.rb' + autoload :VolumeContainerFailoverMetadata, 'generated/azure_mgmt_stor_simple8000_series/models/volume_container_failover_metadata.rb' + autoload :AvailableProviderOperation, 'generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation.rb' + autoload :FailoverSetEligibilityResult, 'generated/azure_mgmt_stor_simple8000_series/models/failover_set_eligibility_result.rb' + autoload :BackupElement, 'generated/azure_mgmt_stor_simple8000_series/models/backup_element.rb' + autoload :FailoverSet, 'generated/azure_mgmt_stor_simple8000_series/models/failover_set.rb' + autoload :BackupFilter, 'generated/azure_mgmt_stor_simple8000_series/models/backup_filter.rb' + autoload :FailoverSetsList, 'generated/azure_mgmt_stor_simple8000_series/models/failover_sets_list.rb' + autoload :VolumeContainerList, 'generated/azure_mgmt_stor_simple8000_series/models/volume_container_list.rb' + autoload :TargetEligibilityErrorMessage, 'generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_error_message.rb' + autoload :ScheduleRecurrence, 'generated/azure_mgmt_stor_simple8000_series/models/schedule_recurrence.rb' + autoload :SymmetricEncryptedSecret, 'generated/azure_mgmt_stor_simple8000_series/models/symmetric_encrypted_secret.rb' + autoload :NicIPv6, 'generated/azure_mgmt_stor_simple8000_series/models/nic_ipv6.rb' + autoload :Time, 'generated/azure_mgmt_stor_simple8000_series/models/time.rb' + autoload :AcsConfiguration, 'generated/azure_mgmt_stor_simple8000_series/models/acs_configuration.rb' + autoload :StorageAccountCredentialList, 'generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential_list.rb' + autoload :AlertErrorDetails, 'generated/azure_mgmt_stor_simple8000_series/models/alert_error_details.rb' + autoload :BaseModel, 'generated/azure_mgmt_stor_simple8000_series/models/base_model.rb' + autoload :PublicKey, 'generated/azure_mgmt_stor_simple8000_series/models/public_key.rb' + autoload :ClearAlertRequest, 'generated/azure_mgmt_stor_simple8000_series/models/clear_alert_request.rb' + autoload :FeatureFilter, 'generated/azure_mgmt_stor_simple8000_series/models/feature_filter.rb' + autoload :CloudAppliance, 'generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance.rb' + autoload :FeatureList, 'generated/azure_mgmt_stor_simple8000_series/models/feature_list.rb' + autoload :SendTestAlertEmailRequest, 'generated/azure_mgmt_stor_simple8000_series/models/send_test_alert_email_request.rb' + autoload :HardwareComponent, 'generated/azure_mgmt_stor_simple8000_series/models/hardware_component.rb' + autoload :CloudApplianceSettings, 'generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_settings.rb' + autoload :NetworkSettingsPatch, 'generated/azure_mgmt_stor_simple8000_series/models/network_settings_patch.rb' + autoload :NetworkInterfaceData0Settings, 'generated/azure_mgmt_stor_simple8000_series/models/network_interface_data0settings.rb' + autoload :HardwareComponentGroupList, 'generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group_list.rb' + autoload :Resource, 'generated/azure_mgmt_stor_simple8000_series/models/resource.rb' + autoload :JobErrorItem, 'generated/azure_mgmt_stor_simple8000_series/models/job_error_item.rb' + autoload :DeviceDetails, 'generated/azure_mgmt_stor_simple8000_series/models/device_details.rb' + autoload :JobErrorDetails, 'generated/azure_mgmt_stor_simple8000_series/models/job_error_details.rb' + autoload :RemoteManagementSettingsPatch, 'generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings_patch.rb' + autoload :JobStage, 'generated/azure_mgmt_stor_simple8000_series/models/job_stage.rb' + autoload :DevicePatch, 'generated/azure_mgmt_stor_simple8000_series/models/device_patch.rb' + autoload :WebproxySettings, 'generated/azure_mgmt_stor_simple8000_series/models/webproxy_settings.rb' + autoload :DNSSettings, 'generated/azure_mgmt_stor_simple8000_series/models/dnssettings.rb' + autoload :JobFilter, 'generated/azure_mgmt_stor_simple8000_series/models/job_filter.rb' + autoload :JobList, 'generated/azure_mgmt_stor_simple8000_series/models/job_list.rb' + autoload :AvailableProviderOperationList, 'generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_list.rb' + autoload :Key, 'generated/azure_mgmt_stor_simple8000_series/models/key.rb' + autoload :BackupList, 'generated/azure_mgmt_stor_simple8000_series/models/backup_list.rb' + autoload :ListFailoverTargetsRequest, 'generated/azure_mgmt_stor_simple8000_series/models/list_failover_targets_request.rb' + autoload :BackupScheduleList, 'generated/azure_mgmt_stor_simple8000_series/models/backup_schedule_list.rb' + autoload :ManagerIntrinsicSettings, 'generated/azure_mgmt_stor_simple8000_series/models/manager_intrinsic_settings.rb' + autoload :BandwidthSettingList, 'generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting_list.rb' + autoload :ManagerSku, 'generated/azure_mgmt_stor_simple8000_series/models/manager_sku.rb' + autoload :CloneRequest, 'generated/azure_mgmt_stor_simple8000_series/models/clone_request.rb' + autoload :NetworkAdapterList, 'generated/azure_mgmt_stor_simple8000_series/models/network_adapter_list.rb' + autoload :CloudApplianceConfigurationList, 'generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration_list.rb' + autoload :NetworkAdapters, 'generated/azure_mgmt_stor_simple8000_series/models/network_adapters.rb' + autoload :SecuritySettingsPatch, 'generated/azure_mgmt_stor_simple8000_series/models/security_settings_patch.rb' + autoload :ManagerList, 'generated/azure_mgmt_stor_simple8000_series/models/manager_list.rb' + autoload :DeviceRolloverDetails, 'generated/azure_mgmt_stor_simple8000_series/models/device_rollover_details.rb' + autoload :ManagerPatch, 'generated/azure_mgmt_stor_simple8000_series/models/manager_patch.rb' + autoload :DimensionFilter, 'generated/azure_mgmt_stor_simple8000_series/models/dimension_filter.rb' + autoload :MetricAvailablity, 'generated/azure_mgmt_stor_simple8000_series/models/metric_availablity.rb' + autoload :AvailableProviderOperationDisplay, 'generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_display.rb' + autoload :MetricData, 'generated/azure_mgmt_stor_simple8000_series/models/metric_data.rb' + autoload :BackupPolicyList, 'generated/azure_mgmt_stor_simple8000_series/models/backup_policy_list.rb' + autoload :MetricName, 'generated/azure_mgmt_stor_simple8000_series/models/metric_name.rb' + autoload :ChapSettings, 'generated/azure_mgmt_stor_simple8000_series/models/chap_settings.rb' + autoload :MetricDimension, 'generated/azure_mgmt_stor_simple8000_series/models/metric_dimension.rb' + autoload :SecondaryDNSSettings, 'generated/azure_mgmt_stor_simple8000_series/models/secondary_dnssettings.rb' + autoload :MetricDefinition, 'generated/azure_mgmt_stor_simple8000_series/models/metric_definition.rb' + autoload :DeviceList, 'generated/azure_mgmt_stor_simple8000_series/models/device_list.rb' + autoload :MetricDefinitionList, 'generated/azure_mgmt_stor_simple8000_series/models/metric_definition_list.rb' + autoload :VolumeList, 'generated/azure_mgmt_stor_simple8000_series/models/volume_list.rb' + autoload :MetricNameFilter, 'generated/azure_mgmt_stor_simple8000_series/models/metric_name_filter.rb' + autoload :VmImage, 'generated/azure_mgmt_stor_simple8000_series/models/vm_image.rb' + autoload :MetricFilter, 'generated/azure_mgmt_stor_simple8000_series/models/metric_filter.rb' + autoload :AlertFilter, 'generated/azure_mgmt_stor_simple8000_series/models/alert_filter.rb' + autoload :Metrics, 'generated/azure_mgmt_stor_simple8000_series/models/metrics.rb' + autoload :DataStatistics, 'generated/azure_mgmt_stor_simple8000_series/models/data_statistics.rb' + autoload :MetricList, 'generated/azure_mgmt_stor_simple8000_series/models/metric_list.rb' + autoload :BandwidthSchedule, 'generated/azure_mgmt_stor_simple8000_series/models/bandwidth_schedule.rb' + autoload :NicIPv4, 'generated/azure_mgmt_stor_simple8000_series/models/nic_ipv4.rb' + autoload :AccessControlRecord, 'generated/azure_mgmt_stor_simple8000_series/models/access_control_record.rb' + autoload :Alert, 'generated/azure_mgmt_stor_simple8000_series/models/alert.rb' + autoload :AlertSettings, 'generated/azure_mgmt_stor_simple8000_series/models/alert_settings.rb' + autoload :Backup, 'generated/azure_mgmt_stor_simple8000_series/models/backup.rb' + autoload :BackupPolicy, 'generated/azure_mgmt_stor_simple8000_series/models/backup_policy.rb' + autoload :BackupSchedule, 'generated/azure_mgmt_stor_simple8000_series/models/backup_schedule.rb' + autoload :BandwidthSetting, 'generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting.rb' + autoload :CloudApplianceConfiguration, 'generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration.rb' + autoload :ConfigureDeviceRequest, 'generated/azure_mgmt_stor_simple8000_series/models/configure_device_request.rb' + autoload :ControllerPowerStateChangeRequest, 'generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_change_request.rb' + autoload :Device, 'generated/azure_mgmt_stor_simple8000_series/models/device.rb' + autoload :EncryptionSettings, 'generated/azure_mgmt_stor_simple8000_series/models/encryption_settings.rb' + autoload :HardwareComponentGroup, 'generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group.rb' + autoload :Job, 'generated/azure_mgmt_stor_simple8000_series/models/job.rb' + autoload :Manager, 'generated/azure_mgmt_stor_simple8000_series/models/manager.rb' + autoload :ManagerExtendedInfo, 'generated/azure_mgmt_stor_simple8000_series/models/manager_extended_info.rb' + autoload :NetworkSettings, 'generated/azure_mgmt_stor_simple8000_series/models/network_settings.rb' + autoload :SecuritySettings, 'generated/azure_mgmt_stor_simple8000_series/models/security_settings.rb' + autoload :StorageAccountCredential, 'generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential.rb' + autoload :TimeSettings, 'generated/azure_mgmt_stor_simple8000_series/models/time_settings.rb' + autoload :Updates, 'generated/azure_mgmt_stor_simple8000_series/models/updates.rb' + autoload :Volume, 'generated/azure_mgmt_stor_simple8000_series/models/volume.rb' + autoload :VolumeContainer, 'generated/azure_mgmt_stor_simple8000_series/models/volume_container.rb' + autoload :AlertScope, 'generated/azure_mgmt_stor_simple8000_series/models/alert_scope.rb' + autoload :AlertSourceType, 'generated/azure_mgmt_stor_simple8000_series/models/alert_source_type.rb' + autoload :AlertSeverity, 'generated/azure_mgmt_stor_simple8000_series/models/alert_severity.rb' + autoload :AlertStatus, 'generated/azure_mgmt_stor_simple8000_series/models/alert_status.rb' + autoload :AlertEmailNotificationStatus, 'generated/azure_mgmt_stor_simple8000_series/models/alert_email_notification_status.rb' + autoload :EncryptionAlgorithm, 'generated/azure_mgmt_stor_simple8000_series/models/encryption_algorithm.rb' + autoload :BackupType, 'generated/azure_mgmt_stor_simple8000_series/models/backup_type.rb' + autoload :BackupJobCreationType, 'generated/azure_mgmt_stor_simple8000_series/models/backup_job_creation_type.rb' + autoload :VolumeType, 'generated/azure_mgmt_stor_simple8000_series/models/volume_type.rb' + autoload :ScheduledBackupStatus, 'generated/azure_mgmt_stor_simple8000_series/models/scheduled_backup_status.rb' + autoload :BackupPolicyCreationType, 'generated/azure_mgmt_stor_simple8000_series/models/backup_policy_creation_type.rb' + autoload :RecurrenceType, 'generated/azure_mgmt_stor_simple8000_series/models/recurrence_type.rb' + autoload :DayOfWeek, 'generated/azure_mgmt_stor_simple8000_series/models/day_of_week.rb' + autoload :ScheduleStatus, 'generated/azure_mgmt_stor_simple8000_series/models/schedule_status.rb' + autoload :Kind, 'generated/azure_mgmt_stor_simple8000_series/models/kind.rb' + autoload :ControllerPowerStateAction, 'generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_action.rb' + autoload :ControllerId, 'generated/azure_mgmt_stor_simple8000_series/models/controller_id.rb' + autoload :ControllerStatus, 'generated/azure_mgmt_stor_simple8000_series/models/controller_status.rb' + autoload :DeviceConfigurationStatus, 'generated/azure_mgmt_stor_simple8000_series/models/device_configuration_status.rb' + autoload :DeviceStatus, 'generated/azure_mgmt_stor_simple8000_series/models/device_status.rb' + autoload :DeviceType, 'generated/azure_mgmt_stor_simple8000_series/models/device_type.rb' + autoload :VirtualMachineApiType, 'generated/azure_mgmt_stor_simple8000_series/models/virtual_machine_api_type.rb' + autoload :AuthorizationEligibility, 'generated/azure_mgmt_stor_simple8000_series/models/authorization_eligibility.rb' + autoload :AuthorizationStatus, 'generated/azure_mgmt_stor_simple8000_series/models/authorization_status.rb' + autoload :InEligibilityCategory, 'generated/azure_mgmt_stor_simple8000_series/models/in_eligibility_category.rb' + autoload :EncryptionStatus, 'generated/azure_mgmt_stor_simple8000_series/models/encryption_status.rb' + autoload :KeyRolloverStatus, 'generated/azure_mgmt_stor_simple8000_series/models/key_rollover_status.rb' + autoload :TargetEligibilityStatus, 'generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_status.rb' + autoload :TargetEligibilityResultCode, 'generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result_code.rb' + autoload :FeatureSupportStatus, 'generated/azure_mgmt_stor_simple8000_series/models/feature_support_status.rb' + autoload :HardwareComponentStatus, 'generated/azure_mgmt_stor_simple8000_series/models/hardware_component_status.rb' + autoload :JobStatus, 'generated/azure_mgmt_stor_simple8000_series/models/job_status.rb' + autoload :JobType, 'generated/azure_mgmt_stor_simple8000_series/models/job_type.rb' + autoload :ManagerType, 'generated/azure_mgmt_stor_simple8000_series/models/manager_type.rb' + autoload :MetricUnit, 'generated/azure_mgmt_stor_simple8000_series/models/metric_unit.rb' + autoload :MetricAggregationType, 'generated/azure_mgmt_stor_simple8000_series/models/metric_aggregation_type.rb' + autoload :NetInterfaceId, 'generated/azure_mgmt_stor_simple8000_series/models/net_interface_id.rb' + autoload :NetInterfaceStatus, 'generated/azure_mgmt_stor_simple8000_series/models/net_interface_status.rb' + autoload :ISCSIAndCloudStatus, 'generated/azure_mgmt_stor_simple8000_series/models/iscsiand_cloud_status.rb' + autoload :NetworkMode, 'generated/azure_mgmt_stor_simple8000_series/models/network_mode.rb' + autoload :AuthenticationType, 'generated/azure_mgmt_stor_simple8000_series/models/authentication_type.rb' + autoload :RemoteManagementModeConfiguration, 'generated/azure_mgmt_stor_simple8000_series/models/remote_management_mode_configuration.rb' + autoload :SslStatus, 'generated/azure_mgmt_stor_simple8000_series/models/ssl_status.rb' + autoload :VolumeStatus, 'generated/azure_mgmt_stor_simple8000_series/models/volume_status.rb' + autoload :OperationStatus, 'generated/azure_mgmt_stor_simple8000_series/models/operation_status.rb' + autoload :BackupStatus, 'generated/azure_mgmt_stor_simple8000_series/models/backup_status.rb' + autoload :MonitoringStatus, 'generated/azure_mgmt_stor_simple8000_series/models/monitoring_status.rb' + autoload :OwnerShipStatus, 'generated/azure_mgmt_stor_simple8000_series/models/owner_ship_status.rb' + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/access_control_records.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/access_control_records.rb new file mode 100644 index 0000000000..31c7237547 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/access_control_records.rb @@ -0,0 +1,507 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # AccessControlRecords + # + class AccessControlRecords + include MsRestAzure + + # + # Creates and initializes a new instance of the AccessControlRecords class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Retrieves all the access control records in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessControlRecordList] operation results. + # + def list_by_manager(resource_group_name, manager_name, custom_headers = nil) + response = list_by_manager_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the access control records in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_manager_with_http_info(resource_group_name, manager_name, custom_headers = nil) + list_by_manager_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Retrieves all the access control records in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_manager_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/accessControlRecords' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AccessControlRecordList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified access control record name. + # + # @param access_control_record_name [String] Name of access control record to + # be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessControlRecord] operation results. + # + def get(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(access_control_record_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the properties of the specified access control record name. + # + # @param access_control_record_name [String] Name of access control record to + # be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + get_async(access_control_record_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the properties of the specified access control record name. + # + # @param access_control_record_name [String] Name of access control record to + # be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'access_control_record_name is nil' if access_control_record_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/accessControlRecords/{accessControlRecordName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'accessControlRecordName' => access_control_record_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AccessControlRecord.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 access control record. + # + # @param access_control_record_name [String] The name of the access control + # record. + # @param parameters [AccessControlRecord] The access control record to be added + # or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessControlRecord] operation results. + # + def create_or_update(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param access_control_record_name [String] The name of the access control + # record. + # @param parameters [AccessControlRecord] The access control record to be added + # or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::AccessControlRecord.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the access control record. + # + # @param access_control_record_name [String] The name of the access control + # record to delete. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(access_control_record_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param access_control_record_name [String] The name of the access control + # record to delete. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(access_control_record_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or Updates an access control record. + # + # @param access_control_record_name [String] The name of the access control + # record. + # @param parameters [AccessControlRecord] The access control record to be added + # or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AccessControlRecord] operation results. + # + def begin_create_or_update(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_async(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or Updates an access control record. + # + # @param access_control_record_name [String] The name of the access control + # record. + # @param parameters [AccessControlRecord] The access control record to be added + # or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_async(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or Updates an access control record. + # + # @param access_control_record_name [String] The name of the access control + # record. + # @param parameters [AccessControlRecord] The access control record to be added + # or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(access_control_record_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'access_control_record_name is nil' if access_control_record_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::AccessControlRecord.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.StorSimple/managers/{managerName}/accessControlRecords/{accessControlRecordName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'accessControlRecordName' => access_control_record_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AccessControlRecord.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 access control record. + # + # @param access_control_record_name [String] The name of the access control + # record to delete. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(access_control_record_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the access control record. + # + # @param access_control_record_name [String] The name of the access control + # record to delete. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(access_control_record_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the access control record. + # + # @param access_control_record_name [String] The name of the access control + # record to delete. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(access_control_record_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'access_control_record_name is nil' if access_control_record_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/accessControlRecords/{accessControlRecordName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'accessControlRecordName' => access_control_record_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/alerts.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/alerts.rb new file mode 100644 index 0000000000..6ce502ecda --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/alerts.rb @@ -0,0 +1,422 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # Alerts + # + class Alerts + include MsRestAzure + + # + # Creates and initializes a new instance of the Alerts class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Retrieves all the alerts in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @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_manager(resource_group_name, manager_name, filter = nil, custom_headers = nil) + first_page = list_by_manager_as_lazy(resource_group_name, manager_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieves all the alerts in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_manager_with_http_info(resource_group_name, manager_name, filter = nil, custom_headers = nil) + list_by_manager_async(resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Retrieves all the alerts in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_manager_async(resource_group_name, manager_name, filter = nil, 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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/alerts' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AlertList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Clear the alerts. + # + # @param parameters [ClearAlertRequest] The clear alert request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def clear(parameters, resource_group_name, manager_name, custom_headers = nil) + response = clear_async(parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Clear the alerts. + # + # @param parameters [ClearAlertRequest] The clear alert request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def clear_with_http_info(parameters, resource_group_name, manager_name, custom_headers = nil) + clear_async(parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Clear the alerts. + # + # @param parameters [ClearAlertRequest] The clear alert request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def clear_async(parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::ClearAlertRequest.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.StorSimple/managers/{managerName}/clearAlerts' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 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 + + # + # Sends a test alert email. + # + # @param device_name [String] The device name + # @param parameters [SendTestAlertEmailRequest] The send test alert email + # request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def send_test_email(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = send_test_email_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Sends a test alert email. + # + # @param device_name [String] The device name + # @param parameters [SendTestAlertEmailRequest] The send test alert email + # request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def send_test_email_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + send_test_email_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Sends a test alert email. + # + # @param device_name [String] The device name + # @param parameters [SendTestAlertEmailRequest] The send test alert email + # request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def send_test_email_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::SendTestAlertEmailRequest.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.StorSimple/managers/{managerName}/devices/{deviceName}/sendTestAlertEmail' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 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 + + # + # Retrieves all the alerts in a manager. + # + # @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 [AlertList] operation results. + # + def list_by_manager_next(next_page_link, custom_headers = nil) + response = list_by_manager_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the alerts in a manager. + # + # @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_manager_next_with_http_info(next_page_link, custom_headers = nil) + list_by_manager_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieves all the alerts in a manager. + # + # @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_manager_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AlertList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieves all the alerts in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AlertList] which provide lazy access to pages of the response. + # + def list_by_manager_as_lazy(resource_group_name, manager_name, filter = nil, custom_headers = nil) + response = list_by_manager_async(resource_group_name, manager_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_manager_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backup_policies.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backup_policies.rb new file mode 100644 index 0000000000..8657ef548d --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backup_policies.rb @@ -0,0 +1,655 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # BackupPolicies + # + class BackupPolicies + include MsRestAzure + + # + # Creates and initializes a new instance of the BackupPolicies class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Gets all the backup policies in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupPolicyList] operation results. + # + def list_by_device(device_name, resource_group_name, manager_name, custom_headers = nil) + response = list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the backup policies in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_device_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets all the backup policies in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_device_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupPolicyList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified backup policy name. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of backup policy to be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupPolicy] operation results. + # + def get(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the properties of the specified backup policy name. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of backup policy to be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + get_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the properties of the specified backup policy name. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of backup policy to be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy to be + # created/updated. + # @param parameters [BackupPolicy] The backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupPolicy] operation results. + # + def create_or_update(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy to be + # created/updated. + # @param parameters [BackupPolicy] The backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupPolicy.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Backup the backup policy now. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_type [String] The backup Type. This can be cloudSnapshot or + # localSnapshot. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def backup_now(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers = nil) + response = backup_now_async(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_type [String] The backup Type. This can be cloudSnapshot or + # localSnapshot. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def backup_now_async(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_backup_now_async(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates the backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy to be + # created/updated. + # @param parameters [BackupPolicy] The backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupPolicy] operation results. + # + def begin_create_or_update(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_async(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy to be + # created/updated. + # @param parameters [BackupPolicy] The backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_async(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy to be + # created/updated. + # @param parameters [BackupPolicy] The backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(device_name, backup_policy_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::BackupPolicy.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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The name of the backup policy. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Backup the backup policy now. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_type [String] The backup Type. This can be cloudSnapshot or + # localSnapshot. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_backup_now(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers = nil) + response = begin_backup_now_async(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Backup the backup policy now. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_type [String] The backup Type. This can be cloudSnapshot or + # localSnapshot. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_backup_now_with_http_info(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers = nil) + begin_backup_now_async(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers).value! + end + + # + # Backup the backup policy now. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_type [String] The backup Type. This can be cloudSnapshot or + # localSnapshot. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_backup_now_async(device_name, backup_policy_name, backup_type, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil? + fail ArgumentError, 'backup_type is nil' if backup_type.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}/backup' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'backupType' => backup_type,'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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backup_schedules.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backup_schedules.rb new file mode 100644 index 0000000000..3ef6b848b3 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backup_schedules.rb @@ -0,0 +1,532 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # BackupSchedules + # + class BackupSchedules + include MsRestAzure + + # + # Creates and initializes a new instance of the BackupSchedules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Gets all the backup schedules in a backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupScheduleList] operation results. + # + def list_by_backup_policy(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + response = list_by_backup_policy_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the backup schedules in a backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_backup_policy_with_http_info(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + list_by_backup_policy_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets all the backup schedules in a backup policy. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_backup_policy_async(device_name, backup_policy_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}/schedules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupScheduleList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified backup schedule name. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name of the backup schedule to be + # fetched + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupSchedule] operation results. + # + def get(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the properties of the specified backup schedule name. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name of the backup schedule to be + # fetched + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + get_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the properties of the specified backup schedule name. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name of the backup schedule to be + # fetched + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil? + fail ArgumentError, 'backup_schedule_name is nil' if backup_schedule_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}/schedules/{backupScheduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'backupScheduleName' => backup_schedule_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupSchedule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The backup schedule name. + # @param parameters [BackupSchedule] The backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupSchedule] operation results. + # + def create_or_update(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The backup schedule name. + # @param parameters [BackupSchedule] The backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupSchedule.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name the backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name the backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates the backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The backup schedule name. + # @param parameters [BackupSchedule] The backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupSchedule] operation results. + # + def begin_create_or_update(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_async(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The backup schedule name. + # @param parameters [BackupSchedule] The backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_async(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The backup schedule name. + # @param parameters [BackupSchedule] The backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(device_name, backup_policy_name, backup_schedule_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil? + fail ArgumentError, 'backup_schedule_name is nil' if backup_schedule_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::BackupSchedule.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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}/schedules/{backupScheduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'backupScheduleName' => backup_schedule_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupSchedule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name the backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name the backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the backup schedule. + # + # @param device_name [String] The device name + # @param backup_policy_name [String] The backup policy name. + # @param backup_schedule_name [String] The name the backup schedule. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(device_name, backup_policy_name, backup_schedule_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil? + fail ArgumentError, 'backup_schedule_name is nil' if backup_schedule_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}/schedules/{backupScheduleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupPolicyName' => backup_policy_name,'backupScheduleName' => backup_schedule_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backups.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backups.rb new file mode 100644 index 0000000000..818b7c537c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/backups.rb @@ -0,0 +1,645 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # Backups + # + class Backups + include MsRestAzure + + # + # Creates and initializes a new instance of the Backups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Retrieves all the backups in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @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_device(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + first_page = list_by_device_as_lazy(device_name, resource_group_name, manager_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Retrieves all the backups in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_device_with_http_info(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + list_by_device_async(device_name, resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Retrieves all the backups in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_device_async(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 backup. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(device_name, backup_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(device_name, backup_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Clones the backup element as a new volume. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param backup_element_name [String] The backup element name. + # @param parameters [CloneRequest] The clone request object. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def clone(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = clone_async(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param backup_element_name [String] The backup element name. + # @param parameters [CloneRequest] The clone request object. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def clone_async(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_clone_async(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Restores the backup on the device. + # + # @param device_name [String] The device name + # @param backup_name [String] The backupSet name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def restore(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + response = restore_async(device_name, backup_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param backup_name [String] The backupSet name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def restore_async(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_restore_async(device_name, backup_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the backup. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(device_name, backup_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the backup. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(device_name, backup_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the backup. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_name is nil' if backup_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backups/{backupName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Clones the backup element as a new volume. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param backup_element_name [String] The backup element name. + # @param parameters [CloneRequest] The clone request object. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_clone(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_clone_async(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Clones the backup element as a new volume. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param backup_element_name [String] The backup element name. + # @param parameters [CloneRequest] The clone request object. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_clone_with_http_info(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_clone_async(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Clones the backup element as a new volume. + # + # @param device_name [String] The device name + # @param backup_name [String] The backup name. + # @param backup_element_name [String] The backup element name. + # @param parameters [CloneRequest] The clone request object. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_clone_async(device_name, backup_name, backup_element_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_name is nil' if backup_name.nil? + fail ArgumentError, 'backup_element_name is nil' if backup_element_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::CloneRequest.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.StorSimple/managers/{managerName}/devices/{deviceName}/backups/{backupName}/elements/{backupElementName}/clone' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupName' => backup_name,'backupElementName' => backup_element_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Restores the backup on the device. + # + # @param device_name [String] The device name + # @param backup_name [String] The backupSet name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_restore(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_restore_async(device_name, backup_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Restores the backup on the device. + # + # @param device_name [String] The device name + # @param backup_name [String] The backupSet name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_restore_with_http_info(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + begin_restore_async(device_name, backup_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Restores the backup on the device. + # + # @param device_name [String] The device name + # @param backup_name [String] The backupSet name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_restore_async(device_name, backup_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'backup_name is nil' if backup_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/backups/{backupName}/restore' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Retrieves all the backups in a device. + # + # @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 [BackupList] operation results. + # + def list_by_device_next(next_page_link, custom_headers = nil) + response = list_by_device_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the backups in a device. + # + # @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_device_next_with_http_info(next_page_link, custom_headers = nil) + list_by_device_next_async(next_page_link, custom_headers).value! + end + + # + # Retrieves all the backups in a device. + # + # @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_device_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BackupList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieves all the backups in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupList] which provide lazy access to pages of the response. + # + def list_by_device_as_lazy(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + response = list_by_device_async(device_name, resource_group_name, manager_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_device_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/bandwidth_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/bandwidth_settings.rb new file mode 100644 index 0000000000..d1007f03bf --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/bandwidth_settings.rb @@ -0,0 +1,497 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # BandwidthSettings + # + class BandwidthSettings + include MsRestAzure + + # + # Creates and initializes a new instance of the BandwidthSettings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Retrieves all the bandwidth setting in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BandwidthSettingList] operation results. + # + def list_by_manager(resource_group_name, manager_name, custom_headers = nil) + response = list_by_manager_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the bandwidth setting in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_manager_with_http_info(resource_group_name, manager_name, custom_headers = nil) + list_by_manager_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Retrieves all the bandwidth setting in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_manager_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/bandwidthSettings' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BandwidthSettingList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified bandwidth setting name. + # + # @param bandwidth_setting_name [String] The name of bandwidth setting to be + # fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BandwidthSetting] operation results. + # + def get(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the properties of the specified bandwidth setting name. + # + # @param bandwidth_setting_name [String] The name of bandwidth setting to be + # fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + get_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the properties of the specified bandwidth setting name. + # + # @param bandwidth_setting_name [String] The name of bandwidth setting to be + # fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'bandwidth_setting_name is nil' if bandwidth_setting_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/bandwidthSettings/{bandwidthSettingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'bandwidthSettingName' => bandwidth_setting_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BandwidthSetting.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 bandwidth setting + # + # @param bandwidth_setting_name [String] The bandwidth setting name. + # @param parameters [BandwidthSetting] The bandwidth setting to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BandwidthSetting] operation results. + # + def create_or_update(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param bandwidth_setting_name [String] The bandwidth setting name. + # @param parameters [BandwidthSetting] The bandwidth setting to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::BandwidthSetting.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the bandwidth setting + # + # @param bandwidth_setting_name [String] The name of the bandwidth setting. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param bandwidth_setting_name [String] The name of the bandwidth setting. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates the bandwidth setting + # + # @param bandwidth_setting_name [String] The bandwidth setting name. + # @param parameters [BandwidthSetting] The bandwidth setting to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BandwidthSetting] operation results. + # + def begin_create_or_update(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_async(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the bandwidth setting + # + # @param bandwidth_setting_name [String] The bandwidth setting name. + # @param parameters [BandwidthSetting] The bandwidth setting to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_async(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the bandwidth setting + # + # @param bandwidth_setting_name [String] The bandwidth setting name. + # @param parameters [BandwidthSetting] The bandwidth setting to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(bandwidth_setting_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'bandwidth_setting_name is nil' if bandwidth_setting_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::BandwidthSetting.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.StorSimple/managers/{managerName}/bandwidthSettings/{bandwidthSettingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'bandwidthSettingName' => bandwidth_setting_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::BandwidthSetting.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 bandwidth setting + # + # @param bandwidth_setting_name [String] The name of the bandwidth setting. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the bandwidth setting + # + # @param bandwidth_setting_name [String] The name of the bandwidth setting. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the bandwidth setting + # + # @param bandwidth_setting_name [String] The name of the bandwidth setting. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(bandwidth_setting_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'bandwidth_setting_name is nil' if bandwidth_setting_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/bandwidthSettings/{bandwidthSettingName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'bandwidthSettingName' => bandwidth_setting_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb new file mode 100644 index 0000000000..e26cf84a66 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb @@ -0,0 +1,249 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # CloudAppliances + # + class CloudAppliances + include MsRestAzure + + # + # Creates and initializes a new instance of the CloudAppliances class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Lists supported cloud appliance models and supported configurations. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CloudApplianceConfigurationList] operation results. + # + def list_supported_configurations(resource_group_name, manager_name, custom_headers = nil) + response = list_supported_configurations_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists supported cloud appliance models and supported configurations. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_supported_configurations_with_http_info(resource_group_name, manager_name, custom_headers = nil) + list_supported_configurations_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Lists supported cloud appliance models and supported configurations. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_supported_configurations_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/cloudApplianceConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::CloudApplianceConfigurationList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Provisions cloud appliance. + # + # @param parameters [CloudAppliance] The cloud appliance + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def provision(parameters, resource_group_name, manager_name, custom_headers = nil) + response = provision_async(parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param parameters [CloudAppliance] The cloud appliance + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def provision_async(parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_provision_async(parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Provisions cloud appliance. + # + # @param parameters [CloudAppliance] The cloud appliance + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_provision(parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_provision_async(parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Provisions cloud appliance. + # + # @param parameters [CloudAppliance] The cloud appliance + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_provision_with_http_info(parameters, resource_group_name, manager_name, custom_headers = nil) + begin_provision_async(parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Provisions cloud appliance. + # + # @param parameters [CloudAppliance] The cloud appliance + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_provision_async(parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::CloudAppliance.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.StorSimple/managers/{managerName}/provisionCloudAppliance' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/device_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/device_settings.rb new file mode 100644 index 0000000000..7f1ac9669d --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/device_settings.rb @@ -0,0 +1,1150 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # DeviceSettings + # + class DeviceSettings + include MsRestAzure + + # + # Creates and initializes a new instance of the DeviceSettings class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Gets the alert settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AlertSettings] operation results. + # + def get_alert_settings(device_name, resource_group_name, manager_name, custom_headers = nil) + response = get_alert_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the alert settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_alert_settings_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + get_alert_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the alert settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_alert_settings_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/alertSettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AlertSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 alert settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [AlertSettings] The alert settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AlertSettings] operation results. + # + def create_or_update_alert_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param parameters [AlertSettings] The alert settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::AlertSettings.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 network settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkSettings] operation results. + # + def get_network_settings(device_name, resource_group_name, manager_name, custom_headers = nil) + response = get_network_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the network settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_network_settings_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + get_network_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the network settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_network_settings_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/networkSettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::NetworkSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 network settings on the specified device. + # + # @param device_name [String] The device name + # @param parameters [NetworkSettingsPatch] The network settings to be updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkSettings] operation results. + # + def update_network_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param parameters [NetworkSettingsPatch] The network settings to be updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::NetworkSettings.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 + + # + # Returns the Security properties of the specified device name. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecuritySettings] operation results. + # + def get_security_settings(device_name, resource_group_name, manager_name, custom_headers = nil) + response = get_security_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the Security properties of the specified device name. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_security_settings_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + get_security_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the Security properties of the specified device name. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_security_settings_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/securitySettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::SecuritySettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Patch Security properties of the specified device name. + # + # @param device_name [String] The device name + # @param parameters [SecuritySettingsPatch] The security settings properties to + # be patched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecuritySettings] operation results. + # + def update_security_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param parameters [SecuritySettingsPatch] The security settings properties to + # be patched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::SecuritySettings.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 + + # + # sync Remote management Certificate between appliance and Service + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def sync_remotemanagement_certificate(device_name, resource_group_name, manager_name, custom_headers = nil) + response = sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the time settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TimeSettings] operation results. + # + def get_time_settings(device_name, resource_group_name, manager_name, custom_headers = nil) + response = get_time_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the time settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_time_settings_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + get_time_settings_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the time settings of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_time_settings_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/timeSettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::TimeSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 time settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [TimeSettings] The time settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TimeSettings] operation results. + # + def create_or_update_time_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_time_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param parameters [TimeSettings] The time settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_time_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_time_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::TimeSettings.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 the alert settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [AlertSettings] The alert settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AlertSettings] operation results. + # + def begin_create_or_update_alert_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the alert settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [AlertSettings] The alert settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_alert_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the alert settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [AlertSettings] The alert settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_alert_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::AlertSettings.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.StorSimple/managers/{managerName}/devices/{deviceName}/alertSettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AlertSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 network settings on the specified device. + # + # @param device_name [String] The device name + # @param parameters [NetworkSettingsPatch] The network settings to be updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkSettings] operation results. + # + def begin_update_network_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the network settings on the specified device. + # + # @param device_name [String] The device name + # @param parameters [NetworkSettingsPatch] The network settings to be updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_network_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Updates the network settings on the specified device. + # + # @param device_name [String] The device name + # @param parameters [NetworkSettingsPatch] The network settings to be updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_network_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::NetworkSettingsPatch.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.StorSimple/managers/{managerName}/devices/{deviceName}/networkSettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::NetworkSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Patch Security properties of the specified device name. + # + # @param device_name [String] The device name + # @param parameters [SecuritySettingsPatch] The security settings properties to + # be patched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecuritySettings] operation results. + # + def begin_update_security_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Patch Security properties of the specified device name. + # + # @param device_name [String] The device name + # @param parameters [SecuritySettingsPatch] The security settings properties to + # be patched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_security_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Patch Security properties of the specified device name. + # + # @param device_name [String] The device name + # @param parameters [SecuritySettingsPatch] The security settings properties to + # be patched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_security_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::SecuritySettingsPatch.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.StorSimple/managers/{managerName}/devices/{deviceName}/securitySettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::SecuritySettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # sync Remote management Certificate between appliance and Service + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_sync_remotemanagement_certificate(device_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # sync Remote management Certificate between appliance and Service + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_sync_remotemanagement_certificate_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # sync Remote management Certificate between appliance and Service + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_sync_remotemanagement_certificate_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/securitySettings/default/syncRemoteManagementCertificate' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates or updates the time settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [TimeSettings] The time settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TimeSettings] operation results. + # + def begin_create_or_update_time_settings(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_time_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the time settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [TimeSettings] The time settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_time_settings_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_time_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the time settings of the specified device. + # + # @param device_name [String] The device name + # @param parameters [TimeSettings] The time settings to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_time_settings_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::TimeSettings.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.StorSimple/managers/{managerName}/devices/{deviceName}/timeSettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::TimeSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/devices.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/devices.rb new file mode 100644 index 0000000000..adbeb17b72 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/devices.rb @@ -0,0 +1,1724 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # Devices + # + class Devices + include MsRestAzure + + # + # Creates and initializes a new instance of the Devices class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Complete minimal setup before using the device. + # + # @param parameters [ConfigureDeviceRequest] The minimal properties to + # configure a device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def configure(parameters, resource_group_name, manager_name, custom_headers = nil) + response = configure_async(parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param parameters [ConfigureDeviceRequest] The minimal properties to + # configure a device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def configure_async(parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_configure_async(parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Returns the list of devices for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param expand [String] Specify $expand=details to populate additional fields + # related to the device or $expand=rolloverdetails to populate additional + # fields related to the service data encryption key rollover on device + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DeviceList] operation results. + # + def list_by_manager(resource_group_name, manager_name, expand = nil, custom_headers = nil) + response = list_by_manager_async(resource_group_name, manager_name, expand, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the list of devices for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param expand [String] Specify $expand=details to populate additional fields + # related to the device or $expand=rolloverdetails to populate additional + # fields related to the service data encryption key rollover on device + # @param custom_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_manager_with_http_info(resource_group_name, manager_name, expand = nil, custom_headers = nil) + list_by_manager_async(resource_group_name, manager_name, expand, custom_headers).value! + end + + # + # Returns the list of devices for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param expand [String] Specify $expand=details to populate additional fields + # related to the device or $expand=rolloverdetails to populate additional + # fields related to the service data encryption key rollover on device + # @param [Hash{String => String}] 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_manager_async(resource_group_name, manager_name, expand = nil, 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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$expand' => expand}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::DeviceList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param expand [String] Specify $expand=details to populate additional fields + # related to the device or $expand=rolloverdetails to populate additional + # fields related to the service data encryption key rollover on device + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Device] operation results. + # + def get(device_name, resource_group_name, manager_name, expand = nil, custom_headers = nil) + response = get_async(device_name, resource_group_name, manager_name, expand, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the properties of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param expand [String] Specify $expand=details to populate additional fields + # related to the device or $expand=rolloverdetails to populate additional + # fields related to the service data encryption key rollover on device + # @param custom_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(device_name, resource_group_name, manager_name, expand = nil, custom_headers = nil) + get_async(device_name, resource_group_name, manager_name, expand, custom_headers).value! + end + + # + # Returns the properties of the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param expand [String] Specify $expand=details to populate additional fields + # related to the device or $expand=rolloverdetails to populate additional + # fields related to the service data encryption key rollover on device + # @param [Hash{String => String}] 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(device_name, resource_group_name, manager_name, expand = nil, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$expand' => expand}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Device.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(device_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(device_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(device_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Patches the device. + # + # @param device_name [String] The device name + # @param parameters [DevicePatch] Patch representation of the device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Device] operation results. + # + def update(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = update_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Patches the device. + # + # @param device_name [String] The device name + # @param parameters [DevicePatch] Patch representation of the device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def update_with_http_info(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + update_async(device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Patches the device. + # + # @param device_name [String] The device name + # @param parameters [DevicePatch] Patch representation of the device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::DevicePatch.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.StorSimple/managers/{managerName}/devices/{deviceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Device.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Authorizes the specified device for service data encryption key rollover. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def authorize_for_service_encryption_key_rollover(device_name, resource_group_name, manager_name, custom_headers = nil) + response = authorize_for_service_encryption_key_rollover_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Authorizes the specified device for service data encryption key rollover. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def authorize_for_service_encryption_key_rollover_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + authorize_for_service_encryption_key_rollover_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Authorizes the specified device for service data encryption key rollover. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def authorize_for_service_encryption_key_rollover_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/authorizeForServiceEncryptionKeyRollover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 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 + + # + # Deactivates the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def deactivate(device_name, resource_group_name, manager_name, custom_headers = nil) + response = deactivate_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def deactivate_async(device_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_deactivate_async(device_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Downloads and installs the updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def install_updates(device_name, resource_group_name, manager_name, custom_headers = nil) + response = install_updates_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def install_updates_async(device_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Returns all failover sets for a given device and their eligibility for + # participating in a failover. A failover set refers to a set of volume + # containers that need to be failed-over as a single unit to maintain data + # integrity. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FailoverSetsList] operation results. + # + def list_failover_sets(device_name, resource_group_name, manager_name, custom_headers = nil) + response = list_failover_sets_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns all failover sets for a given device and their eligibility for + # participating in a failover. A failover set refers to a set of volume + # containers that need to be failed-over as a single unit to maintain data + # integrity. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_failover_sets_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + list_failover_sets_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns all failover sets for a given device and their eligibility for + # participating in a failover. A failover set refers to a set of volume + # containers that need to be failed-over as a single unit to maintain data + # integrity. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_failover_sets_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/listFailoverSets' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::FailoverSetsList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 metrics for the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricList] operation results. + # + def list_metrics(device_name, resource_group_name, manager_name, filter, custom_headers = nil) + response = list_metrics_async(device_name, resource_group_name, manager_name, filter, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metrics for the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_metrics_with_http_info(device_name, resource_group_name, manager_name, filter, custom_headers = nil) + list_metrics_async(device_name, resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Gets the metrics for the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_metrics_async(device_name, resource_group_name, manager_name, filter, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + + + request_headers = {} + + # Set Headers + request_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.StorSimple/managers/{managerName}/devices/{deviceName}/metrics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 metric definitions for the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricDefinitionList] operation results. + # + def list_metric_definition(device_name, resource_group_name, manager_name, custom_headers = nil) + response = list_metric_definition_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metric definitions for the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_metric_definition_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + list_metric_definition_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the metric definitions for the specified device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_metric_definition_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/metricsDefinitions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricDefinitionList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Scans for updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def scan_for_updates(device_name, resource_group_name, manager_name, custom_headers = nil) + response = scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Returns the update summary of the specified device name. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Updates] operation results. + # + def get_update_summary(device_name, resource_group_name, manager_name, custom_headers = nil) + response = get_update_summary_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the update summary of the specified device name. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_update_summary_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + get_update_summary_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the update summary of the specified device name. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_update_summary_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/updateSummary/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Updates.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Failovers a set of volume containers from a specified source device to a + # target device. + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [FailoverRequest] FailoverRequest containing the source + # device and the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def failover(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [FailoverRequest] FailoverRequest containing the source + # device and the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Given a list of volume containers to be failed over from a source device, + # this method returns the eligibility result, as a failover target, for all + # devices under that resource. + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [ListFailoverTargetsRequest] ListFailoverTargetsRequest + # containing the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FailoverTargetsList] operation results. + # + def list_failover_targets(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = list_failover_targets_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Given a list of volume containers to be failed over from a source device, + # this method returns the eligibility result, as a failover target, for all + # devices under that resource. + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [ListFailoverTargetsRequest] ListFailoverTargetsRequest + # containing the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_failover_targets_with_http_info(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + list_failover_targets_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Given a list of volume containers to be failed over from a source device, + # this method returns the eligibility result, as a failover target, for all + # devices under that resource. + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [ListFailoverTargetsRequest] ListFailoverTargetsRequest + # containing the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_failover_targets_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'source_device_name is nil' if source_device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::ListFailoverTargetsRequest.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.StorSimple/managers/{managerName}/devices/{sourceDeviceName}/listFailoverTargets' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'sourceDeviceName' => source_device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::FailoverTargetsList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Complete minimal setup before using the device. + # + # @param parameters [ConfigureDeviceRequest] The minimal properties to + # configure a device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_configure(parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_configure_async(parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Complete minimal setup before using the device. + # + # @param parameters [ConfigureDeviceRequest] The minimal properties to + # configure a device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_configure_with_http_info(parameters, resource_group_name, manager_name, custom_headers = nil) + begin_configure_async(parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Complete minimal setup before using the device. + # + # @param parameters [ConfigureDeviceRequest] The minimal properties to + # configure a device. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_configure_async(parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::ConfigureDeviceRequest.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.StorSimple/managers/{managerName}/configureDevice' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 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 + + # + # Deletes the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(device_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Deactivates the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_deactivate(device_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_deactivate_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deactivates the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_deactivate_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + begin_deactivate_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deactivates the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_deactivate_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/deactivate' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Downloads and installs the updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_install_updates(device_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Downloads and installs the updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_install_updates_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Downloads and installs the updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_install_updates_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/installUpdates' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Scans for updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_scan_for_updates(device_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Scans for updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_scan_for_updates_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Scans for updates on the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_scan_for_updates_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/scanForUpdates' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Failovers a set of volume containers from a specified source device to a + # target device. + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [FailoverRequest] FailoverRequest containing the source + # device and the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_failover(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Failovers a set of volume containers from a specified source device to a + # target device. + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [FailoverRequest] FailoverRequest containing the source + # device and the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_failover_with_http_info(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Failovers a set of volume containers from a specified source device to a + # target device. + # + # @param source_device_name [String] The source device name on which failover + # is performed. + # @param parameters [FailoverRequest] FailoverRequest containing the source + # device and the list of volume containers to be failed over. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_failover_async(source_device_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'source_device_name is nil' if source_device_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::FailoverRequest.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.StorSimple/managers/{managerName}/devices/{sourceDeviceName}/failover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'sourceDeviceName' => source_device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 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 + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/hardware_component_groups.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/hardware_component_groups.rb new file mode 100644 index 0000000000..415e0261a2 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/hardware_component_groups.rb @@ -0,0 +1,275 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # HardwareComponentGroups + # + class HardwareComponentGroups + include MsRestAzure + + # + # Creates and initializes a new instance of the HardwareComponentGroups class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Lists the hardware component groups at device-level. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HardwareComponentGroupList] operation results. + # + def list_by_device(device_name, resource_group_name, manager_name, custom_headers = nil) + response = list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the hardware component groups at device-level. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_device_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Lists the hardware component groups at device-level. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_device_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/hardwareComponentGroups' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::HardwareComponentGroupList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Changes the power state of the controller. + # + # @param device_name [String] The device name + # @param hardware_component_group_name [String] The hardware component group + # name. + # @param parameters [ControllerPowerStateChangeRequest] The controller power + # state change request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def change_controller_power_state(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param hardware_component_group_name [String] The hardware component group + # name. + # @param parameters [ControllerPowerStateChangeRequest] The controller power + # state change request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Changes the power state of the controller. + # + # @param device_name [String] The device name + # @param hardware_component_group_name [String] The hardware component group + # name. + # @param parameters [ControllerPowerStateChangeRequest] The controller power + # state change request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_change_controller_power_state(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Changes the power state of the controller. + # + # @param device_name [String] The device name + # @param hardware_component_group_name [String] The hardware component group + # name. + # @param parameters [ControllerPowerStateChangeRequest] The controller power + # state change request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_change_controller_power_state_with_http_info(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Changes the power state of the controller. + # + # @param device_name [String] The device name + # @param hardware_component_group_name [String] The hardware component group + # name. + # @param parameters [ControllerPowerStateChangeRequest] The controller power + # state change request. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_change_controller_power_state_async(device_name, hardware_component_group_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'hardware_component_group_name is nil' if hardware_component_group_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::ControllerPowerStateChangeRequest.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.StorSimple/managers/{managerName}/devices/{deviceName}/hardwareComponentGroups/{hardwareComponentGroupName}/changeControllerPowerState' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'hardwareComponentGroupName' => hardware_component_group_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 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 + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/jobs.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/jobs.rb new file mode 100644 index 0000000000..2de540962e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/jobs.rb @@ -0,0 +1,681 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # Jobs + # + class Jobs + include MsRestAzure + + # + # Creates and initializes a new instance of the Jobs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Gets all the jobs for specified device. With optional OData query parameters, + # a filtered set of jobs is returned. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @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_device(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + first_page = list_by_device_as_lazy(device_name, resource_group_name, manager_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets all the jobs for specified device. With optional OData query parameters, + # a filtered set of jobs is returned. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_device_with_http_info(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + list_by_device_async(device_name, resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Gets all the jobs for specified device. With optional OData query parameters, + # a filtered set of jobs is returned. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_device_async(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/jobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::JobList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 specified job name. + # + # @param device_name [String] The device name + # @param job_name [String] The job Name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Job] operation results. + # + def get(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(device_name, job_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the details of the specified job name. + # + # @param device_name [String] The device name + # @param job_name [String] The job Name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + get_async(device_name, job_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the details of the specified job name. + # + # @param device_name [String] The device name + # @param job_name [String] The job Name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/jobs/{jobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Job.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Cancels a job on the device. + # + # @param device_name [String] The device name + # @param job_name [String] The jobName. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def cancel(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + response = cancel_async(device_name, job_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param job_name [String] The jobName. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def cancel_async(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_cancel_async(device_name, job_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets all the jobs for the specified manager. With optional OData query + # parameters, a filtered set of jobs is returned. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @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_manager(resource_group_name, manager_name, filter = nil, custom_headers = nil) + first_page = list_by_manager_as_lazy(resource_group_name, manager_name, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets all the jobs for the specified manager. With optional OData query + # parameters, a filtered set of jobs is returned. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_manager_with_http_info(resource_group_name, manager_name, filter = nil, custom_headers = nil) + list_by_manager_async(resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Gets all the jobs for the specified manager. With optional OData query + # parameters, a filtered set of jobs is returned. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_manager_async(resource_group_name, manager_name, filter = nil, 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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/jobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::JobList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Cancels a job on the device. + # + # @param device_name [String] The device name + # @param job_name [String] The jobName. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_cancel(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_cancel_async(device_name, job_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Cancels a job on the device. + # + # @param device_name [String] The device name + # @param job_name [String] The jobName. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_cancel_with_http_info(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + begin_cancel_async(device_name, job_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Cancels a job on the device. + # + # @param device_name [String] The device name + # @param job_name [String] The jobName. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_cancel_async(device_name, job_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/jobs/{jobName}/cancel' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets all the jobs for specified device. With optional OData query parameters, + # a filtered set of jobs is returned. + # + # @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 [JobList] operation results. + # + def list_by_device_next(next_page_link, custom_headers = nil) + response = list_by_device_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the jobs for specified device. With optional OData query parameters, + # a filtered set of jobs is returned. + # + # @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_device_next_with_http_info(next_page_link, custom_headers = nil) + list_by_device_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the jobs for specified device. With optional OData query parameters, + # a filtered set of jobs is returned. + # + # @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_device_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::JobList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the jobs for the specified manager. With optional OData query + # parameters, a filtered set of jobs is returned. + # + # @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 [JobList] operation results. + # + def list_by_manager_next(next_page_link, custom_headers = nil) + response = list_by_manager_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the jobs for the specified manager. With optional OData query + # parameters, a filtered set of jobs is returned. + # + # @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_manager_next_with_http_info(next_page_link, custom_headers = nil) + list_by_manager_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the jobs for the specified manager. With optional OData query + # parameters, a filtered set of jobs is returned. + # + # @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_manager_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::JobList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the jobs for specified device. With optional OData query parameters, + # a filtered set of jobs is returned. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobList] which provide lazy access to pages of the response. + # + def list_by_device_as_lazy(device_name, resource_group_name, manager_name, filter = nil, custom_headers = nil) + response = list_by_device_async(device_name, resource_group_name, manager_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_device_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all the jobs for the specified manager. With optional OData query + # parameters, a filtered set of jobs is returned. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobList] which provide lazy access to pages of the response. + # + def list_by_manager_as_lazy(resource_group_name, manager_name, filter = nil, custom_headers = nil) + response = list_by_manager_async(resource_group_name, manager_name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_manager_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/managers.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/managers.rb new file mode 100644 index 0000000000..7b76234a35 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/managers.rb @@ -0,0 +1,1709 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # Managers + # + class Managers + include MsRestAzure + + # + # Creates and initializes a new instance of the Managers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Retrieves all the managers in a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagerList] operation results. + # + def list(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the managers in a 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 + + # + # Retrieves all the managers in a subscription. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.StorSimple/managers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::ManagerList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieves all the managers in a resource group. + # + # @param resource_group_name [String] The resource group name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagerList] operation results. + # + def list_by_resource_group(resource_group_name, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the managers in a resource group. + # + # @param resource_group_name [String] The resource group name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def 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 + + # + # Retrieves all the managers in a resource group. + # + # @param resource_group_name [String] The resource group name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_async(resource_group_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, '@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.StorSimple/managers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::ManagerList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified manager name. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Manager] operation results. + # + def get(resource_group_name, manager_name, custom_headers = nil) + response = get_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the properties of the specified manager name. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, manager_name, custom_headers = nil) + get_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the properties of the specified manager name. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Manager.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 manager. + # + # @param parameters [Manager] The manager. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Manager] operation results. + # + def create_or_update(parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the manager. + # + # @param parameters [Manager] The manager. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(parameters, resource_group_name, manager_name, custom_headers = nil) + create_or_update_async(parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the manager. + # + # @param parameters [Manager] The manager. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::Manager.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.StorSimple/managers/{managerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Manager.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Manager.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, manager_name, custom_headers = nil) + response = delete_async(resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, manager_name, custom_headers = nil) + delete_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 + + # + # Updates the StorSimple Manager. + # + # @param parameters [ManagerPatch] The manager update parameters. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Manager] operation results. + # + def update(parameters, resource_group_name, manager_name, custom_headers = nil) + response = update_async(parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the StorSimple Manager. + # + # @param parameters [ManagerPatch] The manager update parameters. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def update_with_http_info(parameters, resource_group_name, manager_name, custom_headers = nil) + update_async(parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Updates the StorSimple Manager. + # + # @param parameters [ManagerPatch] The manager update parameters. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::ManagerPatch.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.StorSimple/managers/{managerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Manager.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 public encryption key of the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicKey] operation results. + # + def get_device_public_encryption_key(device_name, resource_group_name, manager_name, custom_headers = nil) + response = get_device_public_encryption_key_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the public encryption key of the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_device_public_encryption_key_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + get_device_public_encryption_key_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the public encryption key of the device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_device_public_encryption_key_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/publicEncryptionKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::PublicKey.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 encryption settings of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EncryptionSettings] operation results. + # + def get_encryption_settings(resource_group_name, manager_name, custom_headers = nil) + response = get_encryption_settings_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the encryption settings of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_encryption_settings_with_http_info(resource_group_name, manager_name, custom_headers = nil) + get_encryption_settings_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the encryption settings of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_encryption_settings_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/encryptionSettings/default' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::EncryptionSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 extended information of the specified manager name. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagerExtendedInfo] operation results. + # + def get_extended_info(resource_group_name, manager_name, custom_headers = nil) + response = get_extended_info_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the extended information of the specified manager name. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_extended_info_with_http_info(resource_group_name, manager_name, custom_headers = nil) + get_extended_info_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the extended information of the specified manager name. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_extended_info_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/extendedInformation/vaultExtendedInfo' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::ManagerExtendedInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates the extended info of the manager. + # + # @param parameters [ManagerExtendedInfo] The manager extended information. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagerExtendedInfo] operation results. + # + def create_extended_info(parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_extended_info_async(parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates the extended info of the manager. + # + # @param parameters [ManagerExtendedInfo] The manager extended information. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_extended_info_with_http_info(parameters, resource_group_name, manager_name, custom_headers = nil) + create_extended_info_async(parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates the extended info of the manager. + # + # @param parameters [ManagerExtendedInfo] The manager extended information. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_extended_info_async(parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::ManagerExtendedInfo.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.StorSimple/managers/{managerName}/extendedInformation/vaultExtendedInfo' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::ManagerExtendedInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 extended info of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_extended_info(resource_group_name, manager_name, custom_headers = nil) + response = delete_extended_info_async(resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the extended info of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_extended_info_with_http_info(resource_group_name, manager_name, custom_headers = nil) + delete_extended_info_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the extended info of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_extended_info_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/extendedInformation/vaultExtendedInfo' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates the extended info of the manager. + # + # @param parameters [ManagerExtendedInfo] The manager extended information. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param if_match [String] Pass the ETag of ExtendedInfo fetched from GET call + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ManagerExtendedInfo] operation results. + # + def update_extended_info(parameters, resource_group_name, manager_name, if_match, custom_headers = nil) + response = update_extended_info_async(parameters, resource_group_name, manager_name, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the extended info of the manager. + # + # @param parameters [ManagerExtendedInfo] The manager extended information. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param if_match [String] Pass the ETag of ExtendedInfo fetched from GET call + # @param custom_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_extended_info_with_http_info(parameters, resource_group_name, manager_name, if_match, custom_headers = nil) + update_extended_info_async(parameters, resource_group_name, manager_name, if_match, custom_headers).value! + end + + # + # Updates the extended info of the manager. + # + # @param parameters [ManagerExtendedInfo] The manager extended information. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param if_match [String] Pass the ETag of ExtendedInfo fetched from GET call + # @param [Hash{String => String}] 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_extended_info_async(parameters, resource_group_name, manager_name, if_match, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.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::ARM::StorSimple8000Series::Models::ManagerExtendedInfo.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.StorSimple/managers/{managerName}/extendedInformation/vaultExtendedInfo' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::ManagerExtendedInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 features and their support status + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FeatureList] operation results. + # + def list_feature_support_status(resource_group_name, manager_name, filter = nil, custom_headers = nil) + response = list_feature_support_status_async(resource_group_name, manager_name, filter, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the features and their support status + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_feature_support_status_with_http_info(resource_group_name, manager_name, filter = nil, custom_headers = nil) + list_feature_support_status_async(resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Lists the features and their support status + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_feature_support_status_async(resource_group_name, manager_name, filter = nil, 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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/features' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::FeatureList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 activation key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Key] operation results. + # + def get_activation_key(resource_group_name, manager_name, custom_headers = nil) + response = get_activation_key_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the activation key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_activation_key_with_http_info(resource_group_name, manager_name, custom_headers = nil) + get_activation_key_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the activation key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_activation_key_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/listActivationKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::Key.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 symmetric encrypted public encryption key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SymmetricEncryptedSecret] operation results. + # + def get_public_encryption_key(resource_group_name, manager_name, custom_headers = nil) + response = get_public_encryption_key_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the symmetric encrypted public encryption key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_public_encryption_key_with_http_info(resource_group_name, manager_name, custom_headers = nil) + get_public_encryption_key_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the symmetric encrypted public encryption key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_public_encryption_key_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/listPublicEncryptionKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::SymmetricEncryptedSecret.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 metrics for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricList] operation results. + # + def list_metrics(resource_group_name, manager_name, filter, custom_headers = nil) + response = list_metrics_async(resource_group_name, manager_name, filter, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metrics for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_metrics_with_http_info(resource_group_name, manager_name, filter, custom_headers = nil) + list_metrics_async(resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Gets the metrics for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_metrics_async(resource_group_name, manager_name, filter, 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, 'manager_name is nil' if manager_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + + + request_headers = {} + + # Set Headers + request_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.StorSimple/managers/{managerName}/metrics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 metric definitions for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricDefinitionList] operation results. + # + def list_metric_definition(resource_group_name, manager_name, custom_headers = nil) + response = list_metric_definition_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metric definitions for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_metric_definition_with_http_info(resource_group_name, manager_name, custom_headers = nil) + list_metric_definition_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the metric definitions for the specified manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_metric_definition_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/metricsDefinitions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricDefinitionList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Re-generates and returns the activation key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Key] operation results. + # + def regenerate_activation_key(resource_group_name, manager_name, custom_headers = nil) + response = regenerate_activation_key_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Re-generates and returns the activation key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_activation_key_with_http_info(resource_group_name, manager_name, custom_headers = nil) + regenerate_activation_key_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Re-generates and returns the activation key of the manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_activation_key_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/regenerateActivationKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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::ARM::StorSimple8000Series::Models::Key.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record.rb new file mode 100644 index 0000000000..18f6c8a2fa --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The access control record. + # + class AccessControlRecord < BaseModel + + include MsRestAzure + + # @return [String] The iSCSI initiator name (IQN). + attr_accessor :initiator_name + + # @return [Integer] The number of volumes using the access control + # record. + attr_accessor :volume_count + + + # + # Mapper for AccessControlRecord class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AccessControlRecord', + type: { + name: 'Composite', + class_name: 'AccessControlRecord', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + initiator_name: { + required: true, + serialized_name: 'properties.initiatorName', + type: { + name: 'String' + } + }, + volume_count: { + required: false, + read_only: true, + serialized_name: 'properties.volumeCount', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record_list.rb new file mode 100644 index 0000000000..791887f380 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of access control records. + # + class AccessControlRecordList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for AccessControlRecordList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AccessControlRecordList', + type: { + name: 'Composite', + class_name: 'AccessControlRecordList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AccessControlRecordElementType', + type: { + name: 'Composite', + class_name: 'AccessControlRecord' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/acs_configuration.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/acs_configuration.rb new file mode 100644 index 0000000000..5506f8c9a2 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/acs_configuration.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::ARM::StorSimple8000Series + module Models + # + # The ACS configuration. + # + class AcsConfiguration + + include MsRestAzure + + # @return [String] The namespace. + attr_accessor :namespace + + # @return [String] The realm. + attr_accessor :realm + + # @return [String] The service URL. + attr_accessor :service_url + + + # + # Mapper for AcsConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AcsConfiguration', + type: { + name: 'Composite', + class_name: 'AcsConfiguration', + model_properties: { + namespace: { + required: true, + serialized_name: 'namespace', + type: { + name: 'String' + } + }, + realm: { + required: true, + serialized_name: 'realm', + type: { + name: 'String' + } + }, + service_url: { + required: true, + serialized_name: 'serviceUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert.rb new file mode 100644 index 0000000000..638aff5785 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert.rb @@ -0,0 +1,223 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The alert. + # + class Alert < BaseModel + + include MsRestAzure + + # @return [String] The title of the alert + attr_accessor :title + + # @return [AlertScope] The scope of the alert. Possible values include: + # 'Resource', 'Device' + attr_accessor :scope + + # @return [String] The type of the alert + attr_accessor :alert_type + + # @return [DateTime] The UTC time at which the alert was raised + attr_accessor :appeared_at_time + + # @return [DateTime] The source time at which the alert was raised + attr_accessor :appeared_at_source_time + + # @return [DateTime] The UTC time at which the alert was cleared + attr_accessor :cleared_at_time + + # @return [DateTime] The source time at which the alert was cleared + attr_accessor :cleared_at_source_time + + # @return [AlertSource] The source at which the alert was raised + attr_accessor :source + + # @return [String] The recommended action for the issue raised in the + # alert + attr_accessor :recommendation + + # @return [String] The reason for resolving the alert + attr_accessor :resolution_reason + + # @return [AlertSeverity] The severity of the alert. Possible values + # include: 'Informational', 'Warning', 'Critical' + attr_accessor :severity + + # @return [AlertStatus] The current status of the alert. Possible values + # include: 'Active', 'Cleared' + attr_accessor :status + + # @return [AlertErrorDetails] The details of the error for which the + # alert was raised + attr_accessor :error_details + + # @return [Hash{String => String}] More details about the alert + attr_accessor :detailed_information + + + # + # Mapper for Alert class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Alert', + type: { + name: 'Composite', + class_name: 'Alert', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + title: { + required: true, + serialized_name: 'properties.title', + type: { + name: 'String' + } + }, + scope: { + required: true, + serialized_name: 'properties.scope', + type: { + name: 'Enum', + module: 'AlertScope' + } + }, + alert_type: { + required: true, + serialized_name: 'properties.alertType', + type: { + name: 'String' + } + }, + appeared_at_time: { + required: true, + serialized_name: 'properties.appearedAtTime', + type: { + name: 'DateTime' + } + }, + appeared_at_source_time: { + required: true, + serialized_name: 'properties.appearedAtSourceTime', + type: { + name: 'DateTime' + } + }, + cleared_at_time: { + required: false, + serialized_name: 'properties.clearedAtTime', + type: { + name: 'DateTime' + } + }, + cleared_at_source_time: { + required: false, + serialized_name: 'properties.clearedAtSourceTime', + type: { + name: 'DateTime' + } + }, + source: { + required: true, + serialized_name: 'properties.source', + type: { + name: 'Composite', + class_name: 'AlertSource' + } + }, + recommendation: { + required: false, + serialized_name: 'properties.recommendation', + type: { + name: 'String' + } + }, + resolution_reason: { + required: false, + serialized_name: 'properties.resolutionReason', + type: { + name: 'String' + } + }, + severity: { + required: true, + serialized_name: 'properties.severity', + type: { + name: 'Enum', + module: 'AlertSeverity' + } + }, + status: { + required: true, + serialized_name: 'properties.status', + type: { + name: 'Enum', + module: 'AlertStatus' + } + }, + error_details: { + required: false, + serialized_name: 'properties.errorDetails', + type: { + name: 'Composite', + class_name: 'AlertErrorDetails' + } + }, + detailed_information: { + required: false, + serialized_name: 'properties.detailedInformation', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_email_notification_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_email_notification_status.rb new file mode 100644 index 0000000000..769e9e5ab6 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_email_notification_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for AlertEmailNotificationStatus + # + module AlertEmailNotificationStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_error_details.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_error_details.rb new file mode 100644 index 0000000000..c5303bc471 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_error_details.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::ARM::StorSimple8000Series + module Models + # + # The details of the error for which the alert was raised + # + class AlertErrorDetails + + include MsRestAzure + + # @return [String] The error code + attr_accessor :error_code + + # @return [String] The error message + attr_accessor :error_message + + # @return [Integer] The number of occurences + attr_accessor :occurences + + + # + # Mapper for AlertErrorDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AlertErrorDetails', + type: { + name: 'Composite', + class_name: 'AlertErrorDetails', + model_properties: { + error_code: { + required: false, + serialized_name: 'errorCode', + type: { + name: 'String' + } + }, + error_message: { + required: false, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + }, + occurences: { + required: false, + serialized_name: 'occurences', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_filter.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_filter.rb new file mode 100644 index 0000000000..3689fafeb1 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_filter.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::ARM::StorSimple8000Series + module Models + # + # The OData filters to be used for Alert + # + class AlertFilter + + include MsRestAzure + + # @return [AlertStatus] Specifies the status of the alerts to be + # filtered. Only 'Equality' operator is supported for this property. + # Possible values include: 'Active', 'Cleared' + attr_accessor :status + + # @return [AlertSeverity] Specifies the severity of the alerts to be + # filtered. Only 'Equality' operator is supported for this property. + # Possible values include: 'Informational', 'Warning', 'Critical' + attr_accessor :severity + + # @return [AlertSourceType] Specifies the source type of the alerts to be + # filtered. Only 'Equality' operator is supported for this property. + # Possible values include: 'Resource', 'Device' + attr_accessor :source_type + + # @return [String] Specifies the source name of the alerts to be + # filtered. Only 'Equality' operator is supported for this property. + attr_accessor :source_name + + # @return [DateTime] Specifies the appeared time (in UTC) of the alerts + # to be filtered. Only 'Greater-Than' and 'Lesser-Than' operators are + # supported for this property. + attr_accessor :appeared_on_time + + + # + # Mapper for AlertFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AlertFilter', + type: { + name: 'Composite', + class_name: 'AlertFilter', + model_properties: { + status: { + required: false, + serialized_name: 'status', + type: { + name: 'Enum', + module: 'AlertStatus' + } + }, + severity: { + required: false, + serialized_name: 'severity', + type: { + name: 'Enum', + module: 'AlertSeverity' + } + }, + source_type: { + required: false, + serialized_name: 'sourceType', + type: { + name: 'Enum', + module: 'AlertSourceType' + } + }, + source_name: { + required: false, + serialized_name: 'sourceName', + type: { + name: 'String' + } + }, + appeared_on_time: { + required: false, + serialized_name: 'appearedOnTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_list.rb new file mode 100644 index 0000000000..71d2e150ae --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_list.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::ARM::StorSimple8000Series + module Models + # + # The collection of alerts. + # + class AlertList + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The value. + attr_accessor :value + + # @return [String] The URI of the next page of alerts. + 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 [AlertList] 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 AlertList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AlertList', + type: { + name: 'Composite', + class_name: 'AlertList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AlertElementType', + type: { + name: 'Composite', + class_name: 'Alert' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_scope.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_scope.rb new file mode 100644 index 0000000000..60f3564e63 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_scope.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::ARM::StorSimple8000Series + module Models + # + # Defines values for AlertScope + # + module AlertScope + Resource = "Resource" + Device = "Device" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_settings.rb new file mode 100644 index 0000000000..08742e93a0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_settings.rb @@ -0,0 +1,119 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The alert settings. + # + class AlertSettings < BaseModel + + include MsRestAzure + + # @return [AlertEmailNotificationStatus] Indicates whether email + # notification enabled or not. Possible values include: 'Enabled', + # 'Disabled' + attr_accessor :email_notification + + # @return [String] The alert notification culture. + attr_accessor :alert_notification_culture + + # @return [AlertEmailNotificationStatus] The value indicating whether + # alert notification enabled for admin or not. Possible values include: + # 'Enabled', 'Disabled' + attr_accessor :notification_to_service_owners + + # @return [Array] The alert notification email list. + attr_accessor :additional_recipient_email_list + + + # + # Mapper for AlertSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AlertSettings', + type: { + name: 'Composite', + class_name: 'AlertSettings', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + email_notification: { + required: true, + serialized_name: 'properties.emailNotification', + type: { + name: 'Enum', + module: 'AlertEmailNotificationStatus' + } + }, + alert_notification_culture: { + required: false, + serialized_name: 'properties.alertNotificationCulture', + type: { + name: 'String' + } + }, + notification_to_service_owners: { + required: false, + serialized_name: 'properties.notificationToServiceOwners', + type: { + name: 'Enum', + module: 'AlertEmailNotificationStatus' + } + }, + additional_recipient_email_list: { + required: false, + serialized_name: 'properties.additionalRecipientEmailList', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_severity.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_severity.rb new file mode 100644 index 0000000000..3e1c224dc5 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_severity.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::ARM::StorSimple8000Series + module Models + # + # Defines values for AlertSeverity + # + module AlertSeverity + Informational = "Informational" + Warning = "Warning" + Critical = "Critical" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source.rb new file mode 100644 index 0000000000..1716086d6f --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source.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::ARM::StorSimple8000Series + module Models + # + # The source details at which the alert was raised + # + class AlertSource + + include MsRestAzure + + # @return [String] The name of the source + attr_accessor :name + + # @return [String] The time zone of the source + attr_accessor :time_zone + + # @return [AlertSourceType] The source type of the alert. Possible values + # include: 'Resource', 'Device' + attr_accessor :alert_source_type + + + # + # Mapper for AlertSource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AlertSource', + type: { + name: 'Composite', + class_name: 'AlertSource', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + time_zone: { + required: false, + serialized_name: 'timeZone', + type: { + name: 'String' + } + }, + alert_source_type: { + required: false, + serialized_name: 'alertSourceType', + type: { + name: 'Enum', + module: 'AlertSourceType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source_type.rb new file mode 100644 index 0000000000..23f4f5d18d --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source_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::ARM::StorSimple8000Series + module Models + # + # Defines values for AlertSourceType + # + module AlertSourceType + Resource = "Resource" + Device = "Device" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_status.rb new file mode 100644 index 0000000000..5e1622fba6 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for AlertStatus + # + module AlertStatus + Active = "Active" + Cleared = "Cleared" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/asymmetric_encrypted_secret.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/asymmetric_encrypted_secret.rb new file mode 100644 index 0000000000..bdac3fb9a0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/asymmetric_encrypted_secret.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::ARM::StorSimple8000Series + module Models + # + # Represent the secrets intended for encryption with asymmetric key pair. + # + class AsymmetricEncryptedSecret + + include MsRestAzure + + # @return [String] The value of the secret. + attr_accessor :value + + # @return [String] Thumbprint certificate that was used to encrypt + # "Value". If the value in unencrypted, it will be null. + attr_accessor :encryption_cert_thumbprint + + # @return [EncryptionAlgorithm] The algorithm used to encrypt "Value". + # Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + attr_accessor :encryption_algorithm + + + # + # Mapper for AsymmetricEncryptedSecret class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AsymmetricEncryptedSecret', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'String' + } + }, + encryption_cert_thumbprint: { + required: false, + serialized_name: 'encryptionCertThumbprint', + type: { + name: 'String' + } + }, + encryption_algorithm: { + required: true, + serialized_name: 'encryptionAlgorithm', + type: { + name: 'Enum', + module: 'EncryptionAlgorithm' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authentication_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authentication_type.rb new file mode 100644 index 0000000000..6013cd263e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authentication_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::ARM::StorSimple8000Series + module Models + # + # Defines values for AuthenticationType + # + module AuthenticationType + Invalid = "Invalid" + None = "None" + Basic = "Basic" + NTLM = "NTLM" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_eligibility.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_eligibility.rb new file mode 100644 index 0000000000..74595c1978 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_eligibility.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::ARM::StorSimple8000Series + module Models + # + # Defines values for AuthorizationEligibility + # + module AuthorizationEligibility + InEligible = "InEligible" + Eligible = "Eligible" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_status.rb new file mode 100644 index 0000000000..f49c574d76 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for AuthorizationStatus + # + module AuthorizationStatus + Disabled = "Disabled" + Enabled = "Enabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation.rb new file mode 100644 index 0000000000..1d2a0dcaca --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Represents available provider operation. + # + class AvailableProviderOperation + + include MsRestAzure + + # @return [String] The name of the operation being performed on a + # particular object. Name format: + # "{resourceProviderNamespace}/{resourceType}/{read|write|delete|action}". + # Eg. Microsoft.StorSimple/managers/devices/volumeContainers/read, + # Microsoft.StorSimple/managers/devices/alerts/clearAlerts/action + attr_accessor :name + + # @return [AvailableProviderOperationDisplay] Contains the localized + # display information for this particular operation/action. + attr_accessor :display + + # @return [String] The intended executor of the operation; governs the + # display of the operation in the RBAC UX and the audit logs UX. Default + # value is "user,system" + attr_accessor :origin + + # @return Reserved for future use. + attr_accessor :properties + + + # + # Mapper for AvailableProviderOperation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProviderOperation', + type: { + name: 'Composite', + class_name: 'AvailableProviderOperation', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'AvailableProviderOperationDisplay' + } + }, + 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_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_display.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_display.rb new file mode 100644 index 0000000000..edc27c019e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_display.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Contains the localized display information for this particular + # operation/action. These value will be used by several clients for (a) + # custom role definitions for RBAC, (b) complex query filters for the event + # service and (c) audit history/records for management operations. + # + class AvailableProviderOperationDisplay + + include MsRestAzure + + # @return [String] The localized friendly form of the resource provider + # name - it is expected to also include the publisher/company + # responsible. It should use Title Casing and begin with 'Microsoft' for + # 1st party services. + attr_accessor :provider + + # @return [String] The localized friendly form of the resource type + # related to this action/operation - it should match the public + # documentation for the resource provider. It should use Title Casing - + # for examples, please refer to the 'name' section. + attr_accessor :resource + + # @return [String] The localized friendly name for the operation, as it + # should be shown to the user. It should be concise (to fit in drop + # downs) but clear (i.e. self-documenting). It should use Title Casing + # and include the entity/resource to which it applies. + attr_accessor :operation + + # @return [String] The localized friendly description for the operation, + # as it should be shown to the user. It should be thorough, yet concise - + # it will be used in tool tips and detailed views. + attr_accessor :description + + + # + # Mapper for AvailableProviderOperationDisplay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProviderOperationDisplay', + type: { + name: 'Composite', + class_name: 'AvailableProviderOperationDisplay', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_list.rb new file mode 100644 index 0000000000..0a3d96317a --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_list.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::ARM::StorSimple8000Series + module Models + # + # List of available provider operations. + # + class AvailableProviderOperationList + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The value. + attr_accessor :value + + # @return [String] The NextLink. + 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 [AvailableProviderOperationList] 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 AvailableProviderOperationList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableProviderOperationList', + type: { + name: 'Composite', + class_name: 'AvailableProviderOperationList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AvailableProviderOperationElementType', + type: { + name: 'Composite', + class_name: 'AvailableProviderOperation' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup.rb new file mode 100644 index 0000000000..e5f14b4d0f --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup.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::ARM::StorSimple8000Series + module Models + # + # The backup. + # + class Backup < BaseModel + + include MsRestAzure + + # @return [DateTime] The time when the backup was created. + attr_accessor :created_on + + # @return [Integer] The backup size in bytes. + attr_accessor :size_in_bytes + + # @return [BackupType] The type of the backup. Possible values include: + # 'LocalSnapshot', 'CloudSnapshot' + attr_accessor :backup_type + + # @return [BackupJobCreationType] The backup job creation type. Possible + # values include: 'Adhoc', 'BySchedule', 'BySSM' + attr_accessor :backup_job_creation_type + + # @return [String] The path ID of the backup policy. + attr_accessor :backup_policy_id + + # @return [String] The StorSimple Snapshot Manager host name. + attr_accessor :ssm_host_name + + # @return [Array] The backup elements. + attr_accessor :elements + + + # + # Mapper for Backup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Backup', + type: { + name: 'Composite', + class_name: 'Backup', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + created_on: { + required: true, + serialized_name: 'properties.createdOn', + type: { + name: 'DateTime' + } + }, + size_in_bytes: { + required: true, + serialized_name: 'properties.sizeInBytes', + type: { + name: 'Number' + } + }, + backup_type: { + required: false, + serialized_name: 'properties.backupType', + type: { + name: 'Enum', + module: 'BackupType' + } + }, + backup_job_creation_type: { + required: false, + serialized_name: 'properties.backupJobCreationType', + type: { + name: 'Enum', + module: 'BackupJobCreationType' + } + }, + backup_policy_id: { + required: false, + serialized_name: 'properties.backupPolicyId', + type: { + name: 'String' + } + }, + ssm_host_name: { + required: false, + serialized_name: 'properties.ssmHostName', + type: { + name: 'String' + } + }, + elements: { + required: true, + serialized_name: 'properties.elements', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackupElementElementType', + type: { + name: 'Composite', + class_name: 'BackupElement' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_element.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_element.rb new file mode 100644 index 0000000000..8d537c0a20 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_element.rb @@ -0,0 +1,107 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The backup element. + # + class BackupElement + + include MsRestAzure + + # @return [String] The path ID that uniquely identifies the backup + # element. + attr_accessor :element_id + + # @return [String] The name of the backup element. + attr_accessor :element_name + + # @return [String] The hierarchical type of the backup element. + attr_accessor :element_type + + # @return [Integer] The size in bytes. + attr_accessor :size_in_bytes + + # @return [String] The name of the volume. + attr_accessor :volume_name + + # @return [String] The path ID of the volume container. + attr_accessor :volume_container_id + + # @return [VolumeType] The volume type. Possible values include: + # 'Tiered', 'Archival', 'LocallyPinned' + attr_accessor :volume_type + + + # + # Mapper for BackupElement class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupElement', + type: { + name: 'Composite', + class_name: 'BackupElement', + model_properties: { + element_id: { + required: true, + serialized_name: 'elementId', + type: { + name: 'String' + } + }, + element_name: { + required: true, + serialized_name: 'elementName', + type: { + name: 'String' + } + }, + element_type: { + required: true, + serialized_name: 'elementType', + type: { + name: 'String' + } + }, + size_in_bytes: { + required: true, + serialized_name: 'sizeInBytes', + type: { + name: 'Number' + } + }, + volume_name: { + required: true, + serialized_name: 'volumeName', + type: { + name: 'String' + } + }, + volume_container_id: { + required: true, + serialized_name: 'volumeContainerId', + type: { + name: 'String' + } + }, + volume_type: { + required: false, + serialized_name: 'volumeType', + type: { + name: 'Enum', + module: 'VolumeType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_filter.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_filter.rb new file mode 100644 index 0000000000..e19b24fafa --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_filter.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::ARM::StorSimple8000Series + module Models + # + # The OData filters to be used for backups. + # + class BackupFilter + + include MsRestAzure + + # @return [String] Specifies the backupPolicyId of the backups to be + # filtered. Only 'Equality' operator is supported for this property. + attr_accessor :backup_policy_id + + # @return [String] Specifies the volumeId of the backups to be filtered. + # Only 'Equality' operator is supported for this property. + attr_accessor :volume_id + + # @return [DateTime] Specifies the creation time of the backups to be + # filtered. Only 'Greater Than or Equal To' and 'Lesser Than or Equal To' + # operators are supported for this property. + attr_accessor :created_time + + + # + # Mapper for BackupFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupFilter', + type: { + name: 'Composite', + class_name: 'BackupFilter', + model_properties: { + backup_policy_id: { + required: false, + serialized_name: 'backupPolicyId', + type: { + name: 'String' + } + }, + volume_id: { + required: false, + serialized_name: 'volumeId', + type: { + name: 'String' + } + }, + created_time: { + required: false, + serialized_name: 'createdTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_job_creation_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_job_creation_type.rb new file mode 100644 index 0000000000..9ca0db2c40 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_job_creation_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::ARM::StorSimple8000Series + module Models + # + # Defines values for BackupJobCreationType + # + module BackupJobCreationType + Adhoc = "Adhoc" + BySchedule = "BySchedule" + BySSM = "BySSM" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_list.rb new file mode 100644 index 0000000000..d4c328818e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_list.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::ARM::StorSimple8000Series + module Models + # + # The collection of backups. + # + class BackupList + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The value. + attr_accessor :value + + # @return [String] The NextLink. + 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 [BackupList] 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 BackupList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupList', + type: { + name: 'Composite', + class_name: 'BackupList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackupElementType', + type: { + name: 'Composite', + class_name: 'Backup' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy.rb new file mode 100644 index 0000000000..b14ea5aaf1 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy.rb @@ -0,0 +1,158 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The backup policy. + # + class BackupPolicy < BaseModel + + include MsRestAzure + + # @return [Array] The path IDs of the volumes which are part of + # the backup policy. + attr_accessor :volume_ids + + # @return [DateTime] The time of the next backup for the backup policy. + attr_accessor :next_backup_time + + # @return [DateTime] The time of the last backup for the backup policy. + attr_accessor :last_backup_time + + # @return [Integer] The count of schedules the backup policy contains. + attr_accessor :schedules_count + + # @return [ScheduledBackupStatus] Indicates whether atleast one of the + # schedules in the backup policy is active or not. Possible values + # include: 'Disabled', 'Enabled' + attr_accessor :scheduled_backup_status + + # @return [BackupPolicyCreationType] The backup policy creation type. + # Indicates whether this was created through SaaS or through StorSimple + # Snapshot Manager. Possible values include: 'BySaaS', 'BySSM' + attr_accessor :backup_policy_creation_type + + # @return [String] If the backup policy was created by StorSimple + # Snapshot Manager, then this field indicates the hostname of the + # StorSimple Snapshot Manager. + attr_accessor :ssm_host_name + + + # + # Mapper for BackupPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupPolicy', + type: { + name: 'Composite', + class_name: 'BackupPolicy', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + volume_ids: { + required: true, + serialized_name: 'properties.volumeIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + next_backup_time: { + required: false, + read_only: true, + serialized_name: 'properties.nextBackupTime', + type: { + name: 'DateTime' + } + }, + last_backup_time: { + required: false, + read_only: true, + serialized_name: 'properties.lastBackupTime', + type: { + name: 'DateTime' + } + }, + schedules_count: { + required: false, + read_only: true, + serialized_name: 'properties.schedulesCount', + type: { + name: 'Number' + } + }, + scheduled_backup_status: { + required: false, + read_only: true, + serialized_name: 'properties.scheduledBackupStatus', + type: { + name: 'Enum', + module: 'ScheduledBackupStatus' + } + }, + backup_policy_creation_type: { + required: false, + read_only: true, + serialized_name: 'properties.backupPolicyCreationType', + type: { + name: 'Enum', + module: 'BackupPolicyCreationType' + } + }, + ssm_host_name: { + required: false, + read_only: true, + serialized_name: 'properties.ssmHostName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_creation_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_creation_type.rb new file mode 100644 index 0000000000..6925bdc4d1 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_creation_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::ARM::StorSimple8000Series + module Models + # + # Defines values for BackupPolicyCreationType + # + module BackupPolicyCreationType + BySaaS = "BySaaS" + BySSM = "BySSM" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_list.rb new file mode 100644 index 0000000000..8a3b5a3fbb --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of backup policies. + # + class BackupPolicyList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for BackupPolicyList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupPolicyList', + type: { + name: 'Composite', + class_name: 'BackupPolicyList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackupPolicyElementType', + type: { + name: 'Composite', + class_name: 'BackupPolicy' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule.rb new file mode 100644 index 0000000000..e4645901fb --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule.rb @@ -0,0 +1,133 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The backup schedule. + # + class BackupSchedule < BaseModel + + include MsRestAzure + + # @return [ScheduleRecurrence] The schedule recurrence. + attr_accessor :schedule_recurrence + + # @return [BackupType] The type of backup which needs to be taken. + # Possible values include: 'LocalSnapshot', 'CloudSnapshot' + attr_accessor :backup_type + + # @return [Integer] The number of backups to be retained. + attr_accessor :retention_count + + # @return [DateTime] The start time of the schedule. + attr_accessor :start_time + + # @return [ScheduleStatus] The schedule status. Possible values include: + # 'Enabled', 'Disabled' + attr_accessor :schedule_status + + # @return [DateTime] The last successful backup run which was triggered + # for the schedule. + attr_accessor :last_successful_run + + + # + # Mapper for BackupSchedule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupSchedule', + type: { + name: 'Composite', + class_name: 'BackupSchedule', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + schedule_recurrence: { + required: true, + serialized_name: 'properties.scheduleRecurrence', + type: { + name: 'Composite', + class_name: 'ScheduleRecurrence' + } + }, + backup_type: { + required: true, + serialized_name: 'properties.backupType', + type: { + name: 'Enum', + module: 'BackupType' + } + }, + retention_count: { + required: true, + serialized_name: 'properties.retentionCount', + type: { + name: 'Number' + } + }, + start_time: { + required: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + schedule_status: { + required: true, + serialized_name: 'properties.scheduleStatus', + type: { + name: 'Enum', + module: 'ScheduleStatus' + } + }, + last_successful_run: { + required: false, + read_only: true, + serialized_name: 'properties.lastSuccessfulRun', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule_list.rb new file mode 100644 index 0000000000..b4438979fe --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The backup schedule list. + # + class BackupScheduleList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for BackupScheduleList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BackupScheduleList', + type: { + name: 'Composite', + class_name: 'BackupScheduleList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackupScheduleElementType', + type: { + name: 'Composite', + class_name: 'BackupSchedule' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_status.rb new file mode 100644 index 0000000000..80c8375d1e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for BackupStatus + # + module BackupStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_type.rb new file mode 100644 index 0000000000..70805a06ba --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_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::ARM::StorSimple8000Series + module Models + # + # Defines values for BackupType + # + module BackupType + LocalSnapshot = "LocalSnapshot" + CloudSnapshot = "CloudSnapshot" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_schedule.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_schedule.rb new file mode 100644 index 0000000000..5d8b27d345 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_schedule.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::ARM::StorSimple8000Series + module Models + # + # The schedule for bandwidth setting. + # + class BandwidthSchedule + + include MsRestAzure + + # @return [Time] The start time of the schdule. + attr_accessor :start + + # @return [Time] The stop time of the schedule. + attr_accessor :stop + + # @return [Integer] The rate in Mbps. + attr_accessor :rate_in_mbps + + # @return [Array] The days of the week when this schedule is + # applicable. + attr_accessor :days + + + # + # Mapper for BandwidthSchedule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BandwidthSchedule', + type: { + name: 'Composite', + class_name: 'BandwidthSchedule', + model_properties: { + start: { + required: true, + serialized_name: 'start', + type: { + name: 'Composite', + class_name: 'Time' + } + }, + stop: { + required: true, + serialized_name: 'stop', + type: { + name: 'Composite', + class_name: 'Time' + } + }, + rate_in_mbps: { + required: true, + serialized_name: 'rateInMbps', + type: { + name: 'Number' + } + }, + days: { + required: true, + serialized_name: 'days', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DayOfWeekElementType', + type: { + name: 'Enum', + module: 'DayOfWeek' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting.rb new file mode 100644 index 0000000000..11974be198 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting.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::ARM::StorSimple8000Series + module Models + # + # The bandwidth setting. + # + class BandwidthSetting < BaseModel + + include MsRestAzure + + # @return [Array] The schedules. + attr_accessor :schedules + + # @return [Integer] The number of volumes that uses the bandwidth + # setting. + attr_accessor :volume_count + + + # + # Mapper for BandwidthSetting class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BandwidthSetting', + type: { + name: 'Composite', + class_name: 'BandwidthSetting', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + schedules: { + required: true, + serialized_name: 'properties.schedules', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BandwidthScheduleElementType', + type: { + name: 'Composite', + class_name: 'BandwidthSchedule' + } + } + } + }, + volume_count: { + required: false, + read_only: true, + serialized_name: 'properties.volumeCount', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting_list.rb new file mode 100644 index 0000000000..9bbb8ea2e3 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of bandwidth setting entities. + # + class BandwidthSettingList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for BandwidthSettingList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BandwidthSettingList', + type: { + name: 'Composite', + class_name: 'BandwidthSettingList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BandwidthSettingElementType', + type: { + name: 'Composite', + class_name: 'BandwidthSetting' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/base_model.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/base_model.rb new file mode 100644 index 0000000000..f072e64ea3 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/base_model.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::ARM::StorSimple8000Series + module Models + # + # Represents the base class for all other ARM object models + # + class BaseModel + + include MsRestAzure + + # @return [String] The path ID that uniquely identifies the object. + attr_accessor :id + + # @return [String] The name of the object. + attr_accessor :name + + # @return [String] The hierarchical type of the object. + attr_accessor :type + + # @return [Kind] The Kind of the object. Currently only Series8000 is + # supported. Possible values include: 'Series8000' + attr_accessor :kind + + + # + # Mapper for BaseModel class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'BaseModel', + type: { + name: 'Composite', + class_name: 'BaseModel', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/chap_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/chap_settings.rb new file mode 100644 index 0000000000..4413cf40e2 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/chap_settings.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The Challenge-Handshake Authentication Protocol (CHAP) settings. + # + class ChapSettings + + include MsRestAzure + + # @return [String] The CHAP initiator user. + attr_accessor :initiator_user + + # @return [AsymmetricEncryptedSecret] The CHAP initiator secret. + attr_accessor :initiator_secret + + # @return [String] The CHAP target user. + attr_accessor :target_user + + # @return [AsymmetricEncryptedSecret] The target secret. + attr_accessor :target_secret + + + # + # Mapper for ChapSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ChapSettings', + type: { + name: 'Composite', + class_name: 'ChapSettings', + model_properties: { + initiator_user: { + required: false, + serialized_name: 'initiatorUser', + type: { + name: 'String' + } + }, + initiator_secret: { + required: false, + serialized_name: 'initiatorSecret', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + }, + target_user: { + required: false, + serialized_name: 'targetUser', + type: { + name: 'String' + } + }, + target_secret: { + required: false, + serialized_name: 'targetSecret', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/clear_alert_request.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/clear_alert_request.rb new file mode 100644 index 0000000000..d1b6c1defc --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/clear_alert_request.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::ARM::StorSimple8000Series + module Models + # + # The request for clearing the alert + # + class ClearAlertRequest + + include MsRestAzure + + # @return [String] The resolution message while clearing the alert + attr_accessor :resolution_message + + # @return [Array] The list of alert IDs to be cleared + attr_accessor :alerts + + + # + # Mapper for ClearAlertRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ClearAlertRequest', + type: { + name: 'Composite', + class_name: 'ClearAlertRequest', + model_properties: { + resolution_message: { + required: false, + serialized_name: 'resolutionMessage', + type: { + name: 'String' + } + }, + alerts: { + required: true, + serialized_name: 'alerts', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/clone_request.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/clone_request.rb new file mode 100644 index 0000000000..10211f8fe4 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/clone_request.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::ARM::StorSimple8000Series + module Models + # + # The clone job request. + # + class CloneRequest + + include MsRestAzure + + # @return [String] The path ID of the device which will act as the clone + # target. + attr_accessor :target_device_id + + # @return [String] The name of the new volume which will be created and + # the backup will be cloned into. + attr_accessor :target_volume_name + + # @return [Array] The list of path IDs of the access control + # records to be associated to the new cloned volume. + attr_accessor :target_access_control_record_ids + + # @return [BackupElement] The backup element that is cloned. + attr_accessor :backup_element + + + # + # Mapper for CloneRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CloneRequest', + type: { + name: 'Composite', + class_name: 'CloneRequest', + model_properties: { + target_device_id: { + required: true, + serialized_name: 'targetDeviceId', + type: { + name: 'String' + } + }, + target_volume_name: { + required: true, + serialized_name: 'targetVolumeName', + type: { + name: 'String' + } + }, + target_access_control_record_ids: { + required: true, + serialized_name: 'targetAccessControlRecordIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + backup_element: { + required: true, + serialized_name: 'backupElement', + type: { + name: 'Composite', + class_name: 'BackupElement' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance.rb new file mode 100644 index 0000000000..53e97b702c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance.rb @@ -0,0 +1,146 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The cloud appliance. + # + class CloudAppliance + + include MsRestAzure + + # @return [String] The name. + attr_accessor :name + + # @return [String] The name of the virtual network. + attr_accessor :vnet_name + + # @return [String] The virtual network region. + attr_accessor :vnet_region + + # @return [Boolean] Indicates whether virtual network used is configured + # with DNS or not. + attr_accessor :is_vnet_dns_configured + + # @return [Boolean] Indicates whether virtual network used is configured + # with express route or not. + attr_accessor :is_vnet_express_configured + + # @return [String] The name of the subnet. + attr_accessor :subnet_name + + # @return [String] The name of the storage account. + attr_accessor :storage_account_name + + # @return [String] The type of the storage account. + attr_accessor :storage_account_type + + # @return [String] The type of the virtual machine. + attr_accessor :vm_type + + # @return [String] The name of the virtual machine image. + attr_accessor :vm_image_name + + # @return [String] The model number. + attr_accessor :model_number + + + # + # Mapper for CloudAppliance class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CloudAppliance', + type: { + name: 'Composite', + class_name: 'CloudAppliance', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + vnet_name: { + required: false, + serialized_name: 'vnetName', + type: { + name: 'String' + } + }, + vnet_region: { + required: true, + serialized_name: 'vnetRegion', + type: { + name: 'String' + } + }, + is_vnet_dns_configured: { + required: false, + serialized_name: 'isVnetDnsConfigured', + type: { + name: 'Boolean' + } + }, + is_vnet_express_configured: { + required: false, + serialized_name: 'isVnetExpressConfigured', + type: { + name: 'Boolean' + } + }, + subnet_name: { + required: false, + serialized_name: 'subnetName', + type: { + name: 'String' + } + }, + storage_account_name: { + required: false, + serialized_name: 'storageAccountName', + type: { + name: 'String' + } + }, + storage_account_type: { + required: false, + serialized_name: 'storageAccountType', + type: { + name: 'String' + } + }, + vm_type: { + required: false, + serialized_name: 'vmType', + type: { + name: 'String' + } + }, + vm_image_name: { + required: false, + serialized_name: 'vmImageName', + type: { + name: 'String' + } + }, + model_number: { + required: false, + serialized_name: 'modelNumber', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration.rb new file mode 100644 index 0000000000..4a0e404967 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration.rb @@ -0,0 +1,166 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The cloud appliance configuration + # + class CloudApplianceConfiguration < BaseModel + + include MsRestAzure + + # @return [String] The model number. + attr_accessor :model_number + + # @return [String] The cloud platform. + attr_accessor :cloud_platform + + # @return [AcsConfiguration] The ACS configuration. + attr_accessor :acs_configuration + + # @return [Array] The supported storage account types. + attr_accessor :supported_storage_account_types + + # @return [Array] The supported regions. + attr_accessor :supported_regions + + # @return [Array] The supported virtual machine types. + attr_accessor :supported_vm_types + + # @return [Array] The supported virtual machine images. + attr_accessor :supported_vm_images + + + # + # Mapper for CloudApplianceConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CloudApplianceConfiguration', + type: { + name: 'Composite', + class_name: 'CloudApplianceConfiguration', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + model_number: { + required: true, + serialized_name: 'properties.modelNumber', + type: { + name: 'String' + } + }, + cloud_platform: { + required: true, + serialized_name: 'properties.cloudPlatform', + type: { + name: 'String' + } + }, + acs_configuration: { + required: true, + serialized_name: 'properties.acsConfiguration', + type: { + name: 'Composite', + class_name: 'AcsConfiguration' + } + }, + supported_storage_account_types: { + required: true, + serialized_name: 'properties.supportedStorageAccountTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + supported_regions: { + required: true, + serialized_name: 'properties.supportedRegions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + supported_vm_types: { + required: true, + serialized_name: 'properties.supportedVmTypes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + supported_vm_images: { + required: true, + serialized_name: 'properties.supportedVmImages', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VmImageElementType', + type: { + name: 'Composite', + class_name: 'VmImage' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration_list.rb new file mode 100644 index 0000000000..8df59ed689 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The cloud appliance configuration list + # + class CloudApplianceConfigurationList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for CloudApplianceConfigurationList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CloudApplianceConfigurationList', + type: { + name: 'Composite', + class_name: 'CloudApplianceConfigurationList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CloudApplianceConfigurationElementType', + type: { + name: 'Composite', + class_name: 'CloudApplianceConfiguration' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_settings.rb new file mode 100644 index 0000000000..c54230125f --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_settings.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::ARM::StorSimple8000Series + module Models + # + # The cloud appliance settings. + # + class CloudApplianceSettings + + include MsRestAzure + + # @return [AsymmetricEncryptedSecret] The service data encryption key + # (encrypted with DAK). + attr_accessor :service_data_encryption_key + + # @return [AsymmetricEncryptedSecret] The channel integrity key + # (encrypted with DAK). + attr_accessor :channel_integrity_key + + + # + # Mapper for CloudApplianceSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CloudApplianceSettings', + type: { + name: 'Composite', + class_name: 'CloudApplianceSettings', + model_properties: { + service_data_encryption_key: { + required: false, + serialized_name: 'serviceDataEncryptionKey', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + }, + channel_integrity_key: { + required: false, + serialized_name: 'channelIntegrityKey', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/configure_device_request.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/configure_device_request.rb new file mode 100644 index 0000000000..a0b8ef1920 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/configure_device_request.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::ARM::StorSimple8000Series + module Models + # + # The mandatory device configuration request. + # + class ConfigureDeviceRequest < BaseModel + + include MsRestAzure + + # @return [String] The friendly name for the device. + attr_accessor :friendly_name + + # @return [String] The current name of the device. + attr_accessor :current_device_name + + # @return [String] The device time zone. For eg: "Pacific Standard Time" + attr_accessor :time_zone + + # @return [SecondaryDNSSettings] The secondary DNS Settings of the + # device. + attr_accessor :dns_settings + + # @return [NetworkInterfaceData0Settings] The 'Data 0' network interface + # card settings. + attr_accessor :network_interface_data0settings + + + # + # Mapper for ConfigureDeviceRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ConfigureDeviceRequest', + type: { + name: 'Composite', + class_name: 'ConfigureDeviceRequest', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + friendly_name: { + required: true, + serialized_name: 'properties.friendlyName', + type: { + name: 'String' + } + }, + current_device_name: { + required: true, + serialized_name: 'properties.currentDeviceName', + type: { + name: 'String' + } + }, + time_zone: { + required: true, + serialized_name: 'properties.timeZone', + type: { + name: 'String' + } + }, + dns_settings: { + required: false, + serialized_name: 'properties.dnsSettings', + type: { + name: 'Composite', + class_name: 'SecondaryDNSSettings' + } + }, + network_interface_data0settings: { + required: false, + serialized_name: 'properties.networkInterfaceData0Settings', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceData0Settings' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_id.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_id.rb new file mode 100644 index 0000000000..2ca5d4577b --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_id.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::ARM::StorSimple8000Series + module Models + # + # Defines values for ControllerId + # + module ControllerId + Unknown = "Unknown" + None = "None" + Controller0 = "Controller0" + Controller1 = "Controller1" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_action.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_action.rb new file mode 100644 index 0000000000..250c688ddc --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_action.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::ARM::StorSimple8000Series + module Models + # + # Defines values for ControllerPowerStateAction + # + module ControllerPowerStateAction + Start = "Start" + Restart = "Restart" + Shutdown = "Shutdown" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_change_request.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_change_request.rb new file mode 100644 index 0000000000..5bbf66eb99 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_change_request.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::ARM::StorSimple8000Series + module Models + # + # The controller power state change request. + # + class ControllerPowerStateChangeRequest < BaseModel + + include MsRestAzure + + # @return [ControllerPowerStateAction] The power state that the request + # is expecting for the controller of the device. Possible values include: + # 'Start', 'Restart', 'Shutdown' + attr_accessor :action + + # @return [ControllerId] The active controller that the request is + # expecting on the device. Possible values include: 'Unknown', 'None', + # 'Controller0', 'Controller1' + attr_accessor :active_controller + + # @return [ControllerStatus] The controller 0's status that the request + # is expecting on the device. Possible values include: 'NotPresent', + # 'PoweredOff', 'Ok', 'Recovering', 'Warning', 'Failure' + attr_accessor :controller0state + + # @return [ControllerStatus] The controller 1's status that the request + # is expecting on the device. Possible values include: 'NotPresent', + # 'PoweredOff', 'Ok', 'Recovering', 'Warning', 'Failure' + attr_accessor :controller1state + + + # + # Mapper for ControllerPowerStateChangeRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ControllerPowerStateChangeRequest', + type: { + name: 'Composite', + class_name: 'ControllerPowerStateChangeRequest', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + action: { + required: true, + serialized_name: 'properties.action', + type: { + name: 'Enum', + module: 'ControllerPowerStateAction' + } + }, + active_controller: { + required: true, + serialized_name: 'properties.activeController', + type: { + name: 'Enum', + module: 'ControllerId' + } + }, + controller0state: { + required: true, + serialized_name: 'properties.controller0State', + type: { + name: 'Enum', + module: 'ControllerStatus' + } + }, + controller1state: { + required: true, + serialized_name: 'properties.controller1State', + type: { + name: 'Enum', + module: 'ControllerStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_status.rb new file mode 100644 index 0000000000..2b0bcec4e0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for ControllerStatus + # + module ControllerStatus + NotPresent = "NotPresent" + PoweredOff = "PoweredOff" + Ok = "Ok" + Recovering = "Recovering" + Warning = "Warning" + Failure = "Failure" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/data_statistics.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/data_statistics.rb new file mode 100644 index 0000000000..4aee2a853e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/data_statistics.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::ARM::StorSimple8000Series + module Models + # + # The additional details related to the data related statistics of a job. + # Currently applicable only for Backup, Clone and Restore jobs. + # + class DataStatistics + + include MsRestAzure + + # @return [Integer] The total bytes of data to be processed, as part of + # the job. + attr_accessor :total_data + + # @return [Integer] The number of bytes of data processed till now, as + # part of the job. + attr_accessor :processed_data + + # @return [Integer] The number of bytes of data written to cloud, as part + # of the job. + attr_accessor :cloud_data + + # @return [Integer] The average throughput of data processed(bytes/sec), + # as part of the job. + attr_accessor :throughput + + + # + # Mapper for DataStatistics class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataStatistics', + type: { + name: 'Composite', + class_name: 'DataStatistics', + model_properties: { + total_data: { + required: false, + serialized_name: 'totalData', + type: { + name: 'Number' + } + }, + processed_data: { + required: false, + serialized_name: 'processedData', + type: { + name: 'Number' + } + }, + cloud_data: { + required: false, + serialized_name: 'cloudData', + type: { + name: 'Number' + } + }, + throughput: { + required: false, + serialized_name: 'throughput', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/day_of_week.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/day_of_week.rb new file mode 100644 index 0000000000..d9efdbcd69 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/day_of_week.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::ARM::StorSimple8000Series + module Models + # + # Defines values for DayOfWeek + # + module DayOfWeek + Sunday = "Sunday" + Monday = "Monday" + Tuesday = "Tuesday" + Wednesday = "Wednesday" + Thursday = "Thursday" + Friday = "Friday" + Saturday = "Saturday" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device.rb new file mode 100644 index 0000000000..79d586c045 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device.rb @@ -0,0 +1,364 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The StorSimple device. + # + class Device < BaseModel + + include MsRestAzure + + # @return [String] The friendly name of the device. + attr_accessor :friendly_name + + # @return [DateTime] The UTC time at which the device was activated + attr_accessor :activation_time + + # @return [String] The language culture setting on the device. For eg: + # "en-US" + attr_accessor :culture + + # @return [String] The device description. + attr_accessor :device_description + + # @return [String] The version number of the software running on the + # device. + attr_accessor :device_software_version + + # @return [String] The friendly name of the software running on the + # device. + attr_accessor :friendly_software_name + + # @return [DeviceConfigurationStatus] The current configuration status of + # the device. Possible values include: 'Complete', 'Pending' + attr_accessor :device_configuration_status + + # @return [String] The target IQN. + attr_accessor :target_iqn + + # @return [String] The device model. + attr_accessor :model_description + + # @return [DeviceStatus] The current status of the device. Possible + # values include: 'Unknown', 'Online', 'Offline', 'Deactivated', + # 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning', + # 'Deactivating', 'Deleted', 'ReadyToSetup' + attr_accessor :status + + # @return [String] The serial number. + attr_accessor :serial_number + + # @return [DeviceType] The type of the device. Possible values include: + # 'Invalid', 'Series8000VirtualAppliance', 'Series8000PhysicalAppliance' + attr_accessor :device_type + + # @return [ControllerId] The identifier of the active controller of the + # device. Possible values include: 'Unknown', 'None', 'Controller0', + # 'Controller1' + attr_accessor :active_controller + + # @return [String] The device friendly software version. + attr_accessor :friendly_software_version + + # @return [Integer] The storage in bytes that is available locally on the + # device. + attr_accessor :available_local_storage_in_bytes + + # @return [Integer] The storage in bytes that is available on the device + # for tiered volumes. + attr_accessor :available_tiered_storage_in_bytes + + # @return [Integer] The storage in bytes that has been provisioned on the + # device for tiered volumes. + attr_accessor :provisioned_tiered_storage_in_bytes + + # @return [Integer] The storage in bytes used for locally pinned volumes + # on the device (including additional local reservation). + attr_accessor :provisioned_local_storage_in_bytes + + # @return [Integer] Total capacity in bytes of tiered and locally pinned + # volumes on the device + attr_accessor :provisioned_volume_size_in_bytes + + # @return [Integer] The storage in bytes that is currently being used on + # the device, including both local and cloud. + attr_accessor :using_storage_in_bytes + + # @return [Integer] The total tiered storage available on the device in + # bytes. + attr_accessor :total_tiered_storage_in_bytes + + # @return [Integer] The device agent group version. + attr_accessor :agent_group_version + + # @return [Integer] The number of network interface cards + attr_accessor :network_interface_card_count + + # @return [String] The location of the virtual appliance. + attr_accessor :device_location + + # @return [VirtualMachineApiType] The virtual machine API type. Possible + # values include: 'Classic', 'Arm' + attr_accessor :virtual_machine_api_type + + # @return [DeviceDetails] The additional device details regarding the end + # point count and volume container count. + attr_accessor :details + + # @return [DeviceRolloverDetails] The additional device details for the + # service data encryption key rollover. + attr_accessor :rollover_details + + + # + # Mapper for Device class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Device', + type: { + name: 'Composite', + class_name: 'Device', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + friendly_name: { + required: true, + serialized_name: 'properties.friendlyName', + type: { + name: 'String' + } + }, + activation_time: { + required: true, + serialized_name: 'properties.activationTime', + type: { + name: 'DateTime' + } + }, + culture: { + required: true, + serialized_name: 'properties.culture', + type: { + name: 'String' + } + }, + device_description: { + required: true, + serialized_name: 'properties.deviceDescription', + type: { + name: 'String' + } + }, + device_software_version: { + required: true, + serialized_name: 'properties.deviceSoftwareVersion', + type: { + name: 'String' + } + }, + friendly_software_name: { + required: false, + serialized_name: 'properties.friendlySoftwareName', + type: { + name: 'String' + } + }, + device_configuration_status: { + required: true, + serialized_name: 'properties.deviceConfigurationStatus', + type: { + name: 'Enum', + module: 'DeviceConfigurationStatus' + } + }, + target_iqn: { + required: true, + serialized_name: 'properties.targetIqn', + type: { + name: 'String' + } + }, + model_description: { + required: true, + serialized_name: 'properties.modelDescription', + type: { + name: 'String' + } + }, + status: { + required: true, + serialized_name: 'properties.status', + type: { + name: 'Enum', + module: 'DeviceStatus' + } + }, + serial_number: { + required: true, + serialized_name: 'properties.serialNumber', + type: { + name: 'String' + } + }, + device_type: { + required: true, + serialized_name: 'properties.deviceType', + type: { + name: 'Enum', + module: 'DeviceType' + } + }, + active_controller: { + required: true, + serialized_name: 'properties.activeController', + type: { + name: 'Enum', + module: 'ControllerId' + } + }, + friendly_software_version: { + required: true, + serialized_name: 'properties.friendlySoftwareVersion', + type: { + name: 'String' + } + }, + available_local_storage_in_bytes: { + required: false, + serialized_name: 'properties.availableLocalStorageInBytes', + type: { + name: 'Number' + } + }, + available_tiered_storage_in_bytes: { + required: false, + serialized_name: 'properties.availableTieredStorageInBytes', + type: { + name: 'Number' + } + }, + provisioned_tiered_storage_in_bytes: { + required: false, + serialized_name: 'properties.provisionedTieredStorageInBytes', + type: { + name: 'Number' + } + }, + provisioned_local_storage_in_bytes: { + required: false, + serialized_name: 'properties.provisionedLocalStorageInBytes', + type: { + name: 'Number' + } + }, + provisioned_volume_size_in_bytes: { + required: false, + serialized_name: 'properties.provisionedVolumeSizeInBytes', + type: { + name: 'Number' + } + }, + using_storage_in_bytes: { + required: false, + serialized_name: 'properties.usingStorageInBytes', + type: { + name: 'Number' + } + }, + total_tiered_storage_in_bytes: { + required: false, + serialized_name: 'properties.totalTieredStorageInBytes', + type: { + name: 'Number' + } + }, + agent_group_version: { + required: false, + serialized_name: 'properties.agentGroupVersion', + type: { + name: 'Number' + } + }, + network_interface_card_count: { + required: false, + serialized_name: 'properties.networkInterfaceCardCount', + type: { + name: 'Number' + } + }, + device_location: { + required: false, + serialized_name: 'properties.deviceLocation', + type: { + name: 'String' + } + }, + virtual_machine_api_type: { + required: false, + read_only: true, + serialized_name: 'properties.virtualMachineApiType', + type: { + name: 'Enum', + module: 'VirtualMachineApiType' + } + }, + details: { + required: false, + serialized_name: 'properties.details', + type: { + name: 'Composite', + class_name: 'DeviceDetails' + } + }, + rollover_details: { + required: false, + serialized_name: 'properties.rolloverDetails', + type: { + name: 'Composite', + class_name: 'DeviceRolloverDetails' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_configuration_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_configuration_status.rb new file mode 100644 index 0000000000..cb2257db5c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_configuration_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for DeviceConfigurationStatus + # + module DeviceConfigurationStatus + Complete = "Complete" + Pending = "Pending" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_details.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_details.rb new file mode 100644 index 0000000000..bc4ea9836d --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_details.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::ARM::StorSimple8000Series + module Models + # + # The additional device details regarding the end point count and volume + # container count. + # + class DeviceDetails + + include MsRestAzure + + # @return [Integer] The total number of endpoints that are currently on + # the device ( i.e. number of volumes). + attr_accessor :endpoint_count + + # @return [Integer] The total number of volume containers on the device. + attr_accessor :volume_container_count + + + # + # Mapper for DeviceDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DeviceDetails', + type: { + name: 'Composite', + class_name: 'DeviceDetails', + model_properties: { + endpoint_count: { + required: false, + serialized_name: 'endpointCount', + type: { + name: 'Number' + } + }, + volume_container_count: { + required: false, + serialized_name: 'volumeContainerCount', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_list.rb new file mode 100644 index 0000000000..541b3feb89 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of devices. + # + class DeviceList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for DeviceList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DeviceList', + type: { + name: 'Composite', + class_name: 'DeviceList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DeviceElementType', + type: { + name: 'Composite', + class_name: 'Device' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_patch.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_patch.rb new file mode 100644 index 0000000000..c42f2132b1 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_patch.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::ARM::StorSimple8000Series + module Models + # + # The device patch. + # + class DevicePatch + + include MsRestAzure + + # @return [String] Short description given for the device + attr_accessor :device_description + + + # + # Mapper for DevicePatch class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DevicePatch', + type: { + name: 'Composite', + class_name: 'DevicePatch', + model_properties: { + device_description: { + required: false, + serialized_name: 'properties.deviceDescription', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_rollover_details.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_rollover_details.rb new file mode 100644 index 0000000000..2a80abe7cf --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_rollover_details.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::ARM::StorSimple8000Series + module Models + # + # The additional device details for the service data encryption key + # rollover. + # + class DeviceRolloverDetails + + include MsRestAzure + + # @return [AuthorizationEligibility] The eligibility status of device for + # service data encryption key rollover. Possible values include: + # 'InEligible', 'Eligible' + attr_accessor :authorization_eligibility + + # @return [AuthorizationStatus] The authorization status of the device + # for service data encryption key rollover. Possible values include: + # 'Disabled', 'Enabled' + attr_accessor :authorization_status + + # @return [InEligibilityCategory] The reason for inEligibility of device, + # in case it's not eligible for service data encryption key rollover. + # Possible values include: 'DeviceNotOnline', 'NotSupportedAppliance', + # 'RolloverPending' + attr_accessor :in_eligibility_reason + + + # + # Mapper for DeviceRolloverDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DeviceRolloverDetails', + type: { + name: 'Composite', + class_name: 'DeviceRolloverDetails', + model_properties: { + authorization_eligibility: { + required: false, + serialized_name: 'authorizationEligibility', + type: { + name: 'Enum', + module: 'AuthorizationEligibility' + } + }, + authorization_status: { + required: false, + serialized_name: 'authorizationStatus', + type: { + name: 'Enum', + module: 'AuthorizationStatus' + } + }, + in_eligibility_reason: { + required: false, + serialized_name: 'inEligibilityReason', + type: { + name: 'Enum', + module: 'InEligibilityCategory' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_status.rb new file mode 100644 index 0000000000..f80ea30bed --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_status.rb @@ -0,0 +1,25 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Defines values for DeviceStatus + # + module DeviceStatus + Unknown = "Unknown" + Online = "Online" + Offline = "Offline" + Deactivated = "Deactivated" + RequiresAttention = "RequiresAttention" + MaintenanceMode = "MaintenanceMode" + Creating = "Creating" + Provisioning = "Provisioning" + Deactivating = "Deactivating" + Deleted = "Deleted" + ReadyToSetup = "ReadyToSetup" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_type.rb new file mode 100644 index 0000000000..88c26edc45 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/device_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::ARM::StorSimple8000Series + module Models + # + # Defines values for DeviceType + # + module DeviceType + Invalid = "Invalid" + Series8000VirtualAppliance = "Series8000VirtualAppliance" + Series8000PhysicalAppliance = "Series8000PhysicalAppliance" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/dimension_filter.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/dimension_filter.rb new file mode 100644 index 0000000000..fe2b3291d7 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/dimension_filter.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::ARM::StorSimple8000Series + module Models + # + # The dimension filter. + # + class DimensionFilter + + include MsRestAzure + + # @return [String] Specifies the dimension name. E.g., NetworkInterface. + # Valid values are the ones specified in the field "dimensions" in the + # ListMetricDefinitions call. Only 'Equality' operator is supported for + # this property. + attr_accessor :name + + # @return [String] Specifies the dimension value. E.g., Data0. Valid + # values are the ones returned in the field "dimensions" in the + # ListMetricDefinitions call. Only 'Equality' operator is supported for + # this property. + attr_accessor :values + + + # + # Mapper for DimensionFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DimensionFilter', + type: { + name: 'Composite', + class_name: 'DimensionFilter', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + values: { + required: false, + serialized_name: 'values', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/dnssettings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/dnssettings.rb new file mode 100644 index 0000000000..9480917ef1 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/dnssettings.rb @@ -0,0 +1,88 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The DNS(Domain Name Server) settings of a device. + # + class DNSSettings + + include MsRestAzure + + # @return [String] The primary IPv4 DNS server for the device + attr_accessor :primary_dns_server + + # @return [String] The primary IPv6 DNS server for the device + attr_accessor :primary_ipv6dns_server + + # @return [Array] The secondary IPv4 DNS server for the device + attr_accessor :secondary_dns_servers + + # @return [Array] The secondary IPv6 DNS server for the device + attr_accessor :secondary_ipv6dns_servers + + + # + # Mapper for DNSSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DNSSettings', + type: { + name: 'Composite', + class_name: 'DNSSettings', + model_properties: { + primary_dns_server: { + required: false, + serialized_name: 'primaryDnsServer', + type: { + name: 'String' + } + }, + primary_ipv6dns_server: { + required: false, + serialized_name: 'primaryIpv6DnsServer', + type: { + name: 'String' + } + }, + secondary_dns_servers: { + required: false, + serialized_name: 'secondaryDnsServers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + secondary_ipv6dns_servers: { + required: false, + serialized_name: 'secondaryIpv6DnsServers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_algorithm.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_algorithm.rb new file mode 100644 index 0000000000..9a8b60fe07 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_algorithm.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::ARM::StorSimple8000Series + module Models + # + # Defines values for EncryptionAlgorithm + # + module EncryptionAlgorithm + None = "None" + AES256 = "AES256" + RSAESPKCS1V15 = "RSAES_PKCS1_v_1_5" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_settings.rb new file mode 100644 index 0000000000..d56f5c8a19 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_settings.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::ARM::StorSimple8000Series + module Models + # + # The encryption settings. + # + class EncryptionSettings < BaseModel + + include MsRestAzure + + # @return [EncryptionStatus] The encryption status to indicates if + # encryption is enabled or not. Possible values include: 'Enabled', + # 'Disabled' + attr_accessor :encryption_status + + # @return [KeyRolloverStatus] The key rollover status to indicates if key + # rollover is required or not. If secret's encryption has been upgraded, + # then it requires key rollover. Possible values include: 'Required', + # 'NotRequired' + attr_accessor :key_rollover_status + + + # + # Mapper for EncryptionSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'EncryptionSettings', + type: { + name: 'Composite', + class_name: 'EncryptionSettings', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + encryption_status: { + required: true, + serialized_name: 'properties.encryptionStatus', + type: { + name: 'Enum', + module: 'EncryptionStatus' + } + }, + key_rollover_status: { + required: true, + serialized_name: 'properties.keyRolloverStatus', + type: { + name: 'Enum', + module: 'KeyRolloverStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_status.rb new file mode 100644 index 0000000000..aed4c2f768 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for EncryptionStatus + # + module EncryptionStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_request.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_request.rb new file mode 100644 index 0000000000..82b52960e8 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_request.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::ARM::StorSimple8000Series + module Models + # + # The request object for triggering a failover of volume containers, from a + # source device to a target device. + # + class FailoverRequest + + include MsRestAzure + + # @return [String] The ARM path ID of the device which will act as the + # failover target. + attr_accessor :target_device_id + + # @return [Array] The list of path IDs of the volume containers + # which needs to be failed-over to the target device. + attr_accessor :volume_containers + + + # + # Mapper for FailoverRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverRequest', + type: { + name: 'Composite', + class_name: 'FailoverRequest', + model_properties: { + target_device_id: { + required: false, + serialized_name: 'targetDeviceId', + type: { + name: 'String' + } + }, + volume_containers: { + required: false, + serialized_name: 'volumeContainers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set.rb new file mode 100644 index 0000000000..5b35a39eb2 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set.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::ARM::StorSimple8000Series + module Models + # + # The failover set on a device. + # + class FailoverSet + + include MsRestAzure + + # @return [Array] The list of meta data + # of volume containers, which are part of the failover set. + attr_accessor :volume_containers + + # @return [FailoverSetEligibilityResult] The eligibility result of the + # failover set, for failover. + attr_accessor :eligibility_result + + + # + # Mapper for FailoverSet class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverSet', + type: { + name: 'Composite', + class_name: 'FailoverSet', + model_properties: { + volume_containers: { + required: false, + serialized_name: 'volumeContainers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VolumeContainerFailoverMetadataElementType', + type: { + name: 'Composite', + class_name: 'VolumeContainerFailoverMetadata' + } + } + } + }, + eligibility_result: { + required: false, + serialized_name: 'eligibilityResult', + type: { + name: 'Composite', + class_name: 'FailoverSetEligibilityResult' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set_eligibility_result.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set_eligibility_result.rb new file mode 100644 index 0000000000..31e143a79e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set_eligibility_result.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::ARM::StorSimple8000Series + module Models + # + # The eligibility result of failover set, for failover. + # + class FailoverSetEligibilityResult + + include MsRestAzure + + # @return [Boolean] Represents if this failover set is eligible for + # failover or not. + attr_accessor :is_eligible_for_failover + + # @return [String] The error message, if the failover set is not eligible + # for failover. + attr_accessor :error_message + + + # + # Mapper for FailoverSetEligibilityResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverSetEligibilityResult', + type: { + name: 'Composite', + class_name: 'FailoverSetEligibilityResult', + model_properties: { + is_eligible_for_failover: { + required: false, + serialized_name: 'isEligibleForFailover', + type: { + name: 'Boolean' + } + }, + error_message: { + required: false, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_sets_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_sets_list.rb new file mode 100644 index 0000000000..a52d0d6e7a --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_sets_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The list of failover sets. + # + class FailoverSetsList + + include MsRestAzure + + # @return [Array] The list of failover sets. + attr_accessor :value + + + # + # Mapper for FailoverSetsList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverSetsList', + type: { + name: 'Composite', + class_name: 'FailoverSetsList', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FailoverSetElementType', + type: { + name: 'Composite', + class_name: 'FailoverSet' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_target.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_target.rb new file mode 100644 index 0000000000..07293659b8 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_target.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::ARM::StorSimple8000Series + module Models + # + # Represents the eligibility of a device as a failover target device. + # + class FailoverTarget + + include MsRestAzure + + # @return [String] The path ID of the device. + attr_accessor :device_id + + # @return [DeviceStatus] The status of the device. Possible values + # include: 'Unknown', 'Online', 'Offline', 'Deactivated', + # 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning', + # 'Deactivating', 'Deleted', 'ReadyToSetup' + attr_accessor :device_status + + # @return [String] The model number of the device. + attr_accessor :model_description + + # @return [String] The software version of the device. + attr_accessor :device_software_version + + # @return [Integer] The count of datacontainers on the device. + attr_accessor :data_containers_count + + # @return [Integer] The count of volumes on the device. + attr_accessor :volumes_count + + # @return [Integer] The amount of free local storage available on the + # device in bytes. + attr_accessor :available_local_storage_in_bytes + + # @return [Integer] The amount of free tiered storage available for the + # device in bytes. + attr_accessor :available_tiered_storage_in_bytes + + # @return [String] The geo location (applicable only for cloud + # appliances) of the device. + attr_accessor :device_location + + # @return [String] The friendly name for the current version of software + # on the device. + attr_accessor :friendly_device_software_version + + # @return [TargetEligibilityResult] The eligibility result of the device, + # as a failover target device. + attr_accessor :eligibility_result + + + # + # Mapper for FailoverTarget class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverTarget', + type: { + name: 'Composite', + class_name: 'FailoverTarget', + model_properties: { + device_id: { + required: false, + serialized_name: 'deviceId', + type: { + name: 'String' + } + }, + device_status: { + required: false, + serialized_name: 'deviceStatus', + type: { + name: 'Enum', + module: 'DeviceStatus' + } + }, + model_description: { + required: false, + serialized_name: 'modelDescription', + type: { + name: 'String' + } + }, + device_software_version: { + required: false, + serialized_name: 'deviceSoftwareVersion', + type: { + name: 'String' + } + }, + data_containers_count: { + required: false, + serialized_name: 'dataContainersCount', + type: { + name: 'Number' + } + }, + volumes_count: { + required: false, + serialized_name: 'volumesCount', + type: { + name: 'Number' + } + }, + available_local_storage_in_bytes: { + required: false, + serialized_name: 'availableLocalStorageInBytes', + type: { + name: 'Number' + } + }, + available_tiered_storage_in_bytes: { + required: false, + serialized_name: 'availableTieredStorageInBytes', + type: { + name: 'Number' + } + }, + device_location: { + required: false, + serialized_name: 'deviceLocation', + type: { + name: 'String' + } + }, + friendly_device_software_version: { + required: false, + serialized_name: 'friendlyDeviceSoftwareVersion', + type: { + name: 'String' + } + }, + eligibility_result: { + required: false, + serialized_name: 'eligibilityResult', + type: { + name: 'Composite', + class_name: 'TargetEligibilityResult' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_targets_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_targets_list.rb new file mode 100644 index 0000000000..f8528a62c3 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_targets_list.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The list of all devices in a resource and their eligibility status as a + # failover target device. + # + class FailoverTargetsList + + include MsRestAzure + + # @return [Array] The list of all the failover targets. + attr_accessor :value + + + # + # Mapper for FailoverTargetsList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FailoverTargetsList', + type: { + name: 'Composite', + class_name: 'FailoverTargetsList', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FailoverTargetElementType', + type: { + name: 'Composite', + class_name: 'FailoverTarget' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature.rb new file mode 100644 index 0000000000..183945a021 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature.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::ARM::StorSimple8000Series + module Models + # + # The feature. + # + class Feature + + include MsRestAzure + + # @return [String] The name of the feature. + attr_accessor :name + + # @return [FeatureSupportStatus] The feature support status. Possible + # values include: 'NotAvailable', 'UnsupportedDeviceVersion', 'Supported' + attr_accessor :status + + + # + # Mapper for Feature class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Feature', + type: { + name: 'Composite', + class_name: 'Feature', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + status: { + required: true, + serialized_name: 'status', + type: { + name: 'Enum', + module: 'FeatureSupportStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_filter.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_filter.rb new file mode 100644 index 0000000000..987636782f --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_filter.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::ARM::StorSimple8000Series + module Models + # + # The OData filter to be used for features. + # + class FeatureFilter + + include MsRestAzure + + # @return [String] Specifies the device ID for which the features are + # required. Only 'Equality' operator is supported for this property. + attr_accessor :device_id + + + # + # Mapper for FeatureFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FeatureFilter', + type: { + name: 'Composite', + class_name: 'FeatureFilter', + model_properties: { + device_id: { + required: false, + serialized_name: 'deviceId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_list.rb new file mode 100644 index 0000000000..c1e8649e36 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collections of features. + # + class FeatureList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for FeatureList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FeatureList', + type: { + name: 'Composite', + class_name: 'FeatureList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FeatureElementType', + type: { + name: 'Composite', + class_name: 'Feature' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_support_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_support_status.rb new file mode 100644 index 0000000000..ddbbfadc39 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_support_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for FeatureSupportStatus + # + module FeatureSupportStatus + NotAvailable = "NotAvailable" + UnsupportedDeviceVersion = "UnsupportedDeviceVersion" + Supported = "Supported" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component.rb new file mode 100644 index 0000000000..67498a96e1 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component.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::ARM::StorSimple8000Series + module Models + # + # The hardware component. + # + class HardwareComponent + + include MsRestAzure + + # @return [String] The component ID. + attr_accessor :component_id + + # @return [String] The display name of the hardware component. + attr_accessor :display_name + + # @return [HardwareComponentStatus] The status of the hardware component. + # Possible values include: 'Unknown', 'NotPresent', 'PoweredOff', 'Ok', + # 'Recovering', 'Warning', 'Failure' + attr_accessor :status + + # @return [String] The display name of the status of hardware component. + attr_accessor :status_display_name + + + # + # Mapper for HardwareComponent class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HardwareComponent', + type: { + name: 'Composite', + class_name: 'HardwareComponent', + model_properties: { + component_id: { + required: true, + serialized_name: 'componentId', + type: { + name: 'String' + } + }, + display_name: { + required: true, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + status: { + required: true, + serialized_name: 'status', + type: { + name: 'Enum', + module: 'HardwareComponentStatus' + } + }, + status_display_name: { + required: true, + serialized_name: 'statusDisplayName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group.rb new file mode 100644 index 0000000000..0202084c1b --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group.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::ARM::StorSimple8000Series + module Models + # + # The hardware component group. + # + class HardwareComponentGroup < BaseModel + + include MsRestAzure + + # @return [String] The display name the hardware component group. + attr_accessor :display_name + + # @return [DateTime] The last updated time. + attr_accessor :last_updated_time + + # @return [Array] The list of hardware components. + attr_accessor :components + + + # + # Mapper for HardwareComponentGroup class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HardwareComponentGroup', + type: { + name: 'Composite', + class_name: 'HardwareComponentGroup', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + display_name: { + required: true, + serialized_name: 'properties.displayName', + type: { + name: 'String' + } + }, + last_updated_time: { + required: true, + serialized_name: 'properties.lastUpdatedTime', + type: { + name: 'DateTime' + } + }, + components: { + required: true, + serialized_name: 'properties.components', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HardwareComponentElementType', + type: { + name: 'Composite', + class_name: 'HardwareComponent' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group_list.rb new file mode 100644 index 0000000000..bc3d8f396e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of hardware component groups. + # + class HardwareComponentGroupList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for HardwareComponentGroupList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HardwareComponentGroupList', + type: { + name: 'Composite', + class_name: 'HardwareComponentGroupList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HardwareComponentGroupElementType', + type: { + name: 'Composite', + class_name: 'HardwareComponentGroup' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_status.rb new file mode 100644 index 0000000000..7ce5fed527 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for HardwareComponentStatus + # + module HardwareComponentStatus + Unknown = "Unknown" + NotPresent = "NotPresent" + PoweredOff = "PoweredOff" + Ok = "Ok" + Recovering = "Recovering" + Warning = "Warning" + Failure = "Failure" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/in_eligibility_category.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/in_eligibility_category.rb new file mode 100644 index 0000000000..a8392a5c63 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/in_eligibility_category.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::ARM::StorSimple8000Series + module Models + # + # Defines values for InEligibilityCategory + # + module InEligibilityCategory + DeviceNotOnline = "DeviceNotOnline" + NotSupportedAppliance = "NotSupportedAppliance" + RolloverPending = "RolloverPending" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/iscsiand_cloud_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/iscsiand_cloud_status.rb new file mode 100644 index 0000000000..da55cc75ee --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/iscsiand_cloud_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::ARM::StorSimple8000Series + module Models + # + # Defines values for ISCSIAndCloudStatus + # + module ISCSIAndCloudStatus + Disabled = "Disabled" + IscsiEnabled = "IscsiEnabled" + CloudEnabled = "CloudEnabled" + IscsiAndCloudEnabled = "IscsiAndCloudEnabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job.rb new file mode 100644 index 0000000000..5c8d6769b0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job.rb @@ -0,0 +1,236 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The job. + # + class Job < BaseModel + + include MsRestAzure + + # @return [JobStatus] The current status of the job. Possible values + # include: 'Running', 'Succeeded', 'Failed', 'Canceled' + attr_accessor :status + + # @return [DateTime] The UTC time at which the job was started. + attr_accessor :start_time + + # @return [DateTime] The UTC time at which the job completed. + attr_accessor :end_time + + # @return [Integer] The percentage of the job that is already complete. + attr_accessor :percent_complete + + # @return [JobErrorDetails] The error details, if any, for the job. + attr_accessor :error + + # @return [JobType] The type of the job. Possible values include: + # 'ScheduledBackup', 'ManualBackup', 'RestoreBackup', 'CloneVolume', + # 'FailoverVolumeContainers', 'CreateLocallyPinnedVolume', + # 'ModifyVolume', 'InstallUpdates', 'SupportPackageLogs', + # 'CreateCloudAppliance' + attr_accessor :job_type + + # @return [DataStatistics] The data statistics properties of the job. + attr_accessor :data_stats + + # @return [String] The entity identifier for which the job ran. + attr_accessor :entity_label + + # @return [String] The entity type for which the job ran. + attr_accessor :entity_type + + # @return [Array] The job stages. + attr_accessor :job_stages + + # @return [String] The device ID in which the job ran. + attr_accessor :device_id + + # @return [Boolean] Represents whether the job is cancellable or not. + attr_accessor :is_cancellable + + # @return [BackupType] The backup type (CloudSnapshot | LocalSnapshot). + # Applicable only for backup jobs. Possible values include: + # 'LocalSnapshot', 'CloudSnapshot' + attr_accessor :backup_type + + # @return [String] The source device ID of the failover job. + attr_accessor :source_device_id + + # @return [DateTime] The time of the backup used for the failover. + attr_accessor :backup_point_in_time + + + # + # Mapper for Job class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Job', + type: { + name: 'Composite', + class_name: 'Job', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + status: { + required: true, + serialized_name: 'status', + type: { + name: 'Enum', + module: 'JobStatus' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + percent_complete: { + required: true, + serialized_name: 'percentComplete', + type: { + name: 'Number' + } + }, + error: { + required: false, + serialized_name: 'error', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + }, + job_type: { + required: true, + serialized_name: 'properties.jobType', + type: { + name: 'Enum', + module: 'JobType' + } + }, + data_stats: { + required: false, + serialized_name: 'properties.dataStats', + type: { + name: 'Composite', + class_name: 'DataStatistics' + } + }, + entity_label: { + required: false, + serialized_name: 'properties.entityLabel', + type: { + name: 'String' + } + }, + entity_type: { + required: false, + serialized_name: 'properties.entityType', + type: { + name: 'String' + } + }, + job_stages: { + required: false, + serialized_name: 'properties.jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobStageElementType', + type: { + name: 'Composite', + class_name: 'JobStage' + } + } + } + }, + device_id: { + required: false, + serialized_name: 'properties.deviceId', + type: { + name: 'String' + } + }, + is_cancellable: { + required: false, + serialized_name: 'properties.isCancellable', + type: { + name: 'Boolean' + } + }, + backup_type: { + required: false, + serialized_name: 'properties.backupType', + type: { + name: 'Enum', + module: 'BackupType' + } + }, + source_device_id: { + required: false, + serialized_name: 'properties.sourceDeviceId', + type: { + name: 'String' + } + }, + backup_point_in_time: { + required: false, + serialized_name: 'properties.backupPointInTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_details.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_details.rb new file mode 100644 index 0000000000..6d605c1609 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_details.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The job error details. Contains list of job error items. + # + class JobErrorDetails + + include MsRestAzure + + # @return [Array] The error details. + attr_accessor :error_details + + # @return [String] The error code intended for programmatic access. + attr_accessor :code + + # @return [String] The error message intended to describe the error in + # detail. + attr_accessor :message + + + # + # Mapper for JobErrorDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobErrorDetails', + type: { + name: 'Composite', + class_name: 'JobErrorDetails', + model_properties: { + error_details: { + required: false, + serialized_name: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorItemElementType', + type: { + name: 'Composite', + class_name: 'JobErrorItem' + } + } + } + }, + code: { + required: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_item.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_item.rb new file mode 100644 index 0000000000..eb2d160c0c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_item.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::ARM::StorSimple8000Series + module Models + # + # The job error items. + # + class JobErrorItem + + include MsRestAzure + + # @return [Array] The recommended actions. + attr_accessor :recommendations + + # @return [String] The error code intended for programmatic access. + attr_accessor :code + + # @return [String] The error message intended to describe the error in + # detail. + attr_accessor :message + + + # + # Mapper for JobErrorItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobErrorItem', + type: { + name: 'Composite', + class_name: 'JobErrorItem', + model_properties: { + recommendations: { + required: false, + serialized_name: 'recommendations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + code: { + required: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_filter.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_filter.rb new file mode 100644 index 0000000000..c950929144 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_filter.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The OData filter to be used for jobs. + # + class JobFilter + + include MsRestAzure + + # @return [String] Specifies the status of the jobs to be filtered. For + # e.g., "Running", "Succeeded", "Failed" or "Canceled". Only 'Equality' + # operator is supported for this property. + attr_accessor :status + + # @return [String] Specifies the type of the jobs to be filtered. For + # e.g., "ScheduledBackup", "ManualBackup", "RestoreBackup", + # "CloneVolume", "FailoverVolumeContainers", "CreateLocallyPinnedVolume", + # "ModifyVolume", "InstallUpdates", "SupportPackageLogs", or + # "CreateCloudAppliance". Only 'Equality' operator can be used for this + # property. + attr_accessor :job_type + + # @return [DateTime] Specifies the start time of the jobs to be filtered. + # Only 'Greater Than or Equal To' and 'Lesser Than or Equal To' operators + # are supported for this property. + attr_accessor :start_time + + + # + # Mapper for JobFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobFilter', + type: { + name: 'Composite', + class_name: 'JobFilter', + model_properties: { + status: { + required: false, + serialized_name: 'status', + type: { + name: 'String' + } + }, + job_type: { + required: false, + serialized_name: 'jobType', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_list.rb new file mode 100644 index 0000000000..b95f09987a --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_list.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::ARM::StorSimple8000Series + module Models + # + # The collection of jobs. + # + class JobList + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] The value. + attr_accessor :value + + # @return [String] The NextLink. + 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 [JobList] 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 JobList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobList', + type: { + name: 'Composite', + class_name: 'JobList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobElementType', + type: { + name: 'Composite', + class_name: 'Job' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_stage.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_stage.rb new file mode 100644 index 0000000000..11fbfec8c6 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_stage.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The details about the specific stage of a job. + # + class JobStage + + include MsRestAzure + + # @return [String] The message of the job stage. + attr_accessor :message + + # @return [JobStatus] The stage status. Possible values include: + # 'Running', 'Succeeded', 'Failed', 'Canceled' + attr_accessor :stage_status + + # @return [String] The details of the stage. + attr_accessor :detail + + # @return [String] The error code of the stage if any. + attr_accessor :error_code + + + # + # Mapper for JobStage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStage', + type: { + name: 'Composite', + class_name: 'JobStage', + model_properties: { + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, + stage_status: { + required: true, + serialized_name: 'stageStatus', + type: { + name: 'Enum', + module: 'JobStatus' + } + }, + detail: { + required: false, + serialized_name: 'detail', + type: { + name: 'String' + } + }, + error_code: { + required: false, + serialized_name: 'errorCode', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_status.rb new file mode 100644 index 0000000000..48f28bffaf --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_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::ARM::StorSimple8000Series + module Models + # + # Defines values for JobStatus + # + module JobStatus + Running = "Running" + Succeeded = "Succeeded" + Failed = "Failed" + Canceled = "Canceled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_type.rb new file mode 100644 index 0000000000..1eff22bc3c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/job_type.rb @@ -0,0 +1,24 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Defines values for JobType + # + module JobType + ScheduledBackup = "ScheduledBackup" + ManualBackup = "ManualBackup" + RestoreBackup = "RestoreBackup" + CloneVolume = "CloneVolume" + FailoverVolumeContainers = "FailoverVolumeContainers" + CreateLocallyPinnedVolume = "CreateLocallyPinnedVolume" + ModifyVolume = "ModifyVolume" + InstallUpdates = "InstallUpdates" + SupportPackageLogs = "SupportPackageLogs" + CreateCloudAppliance = "CreateCloudAppliance" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/key.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/key.rb new file mode 100644 index 0000000000..22fffc57fb --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/key.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::ARM::StorSimple8000Series + module Models + # + # The key. + # + class Key + + include MsRestAzure + + # @return [String] The activation key for the device. + attr_accessor :activation_key + + + # + # Mapper for Key class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Key', + type: { + name: 'Composite', + class_name: 'Key', + model_properties: { + activation_key: { + required: true, + serialized_name: 'activationKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/key_rollover_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/key_rollover_status.rb new file mode 100644 index 0000000000..c2cd3479ad --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/key_rollover_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for KeyRolloverStatus + # + module KeyRolloverStatus + Required = "Required" + NotRequired = "NotRequired" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/kind.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/kind.rb new file mode 100644 index 0000000000..f15cd75e2d --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/kind.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Defines values for Kind + # + module Kind + Series8000 = "Series8000" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/list_failover_targets_request.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/list_failover_targets_request.rb new file mode 100644 index 0000000000..b9086f69b1 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/list_failover_targets_request.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::ARM::StorSimple8000Series + module Models + # + # The request object for fetching the list of failover targets (eligible + # devices for failover). + # + class ListFailoverTargetsRequest + + include MsRestAzure + + # @return [Array] The list of path IDs of the volume containers + # that needs to be failed-over, for which we want to fetch the eligible + # targets. + attr_accessor :volume_containers + + + # + # Mapper for ListFailoverTargetsRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ListFailoverTargetsRequest', + type: { + name: 'Composite', + class_name: 'ListFailoverTargetsRequest', + model_properties: { + volume_containers: { + required: false, + serialized_name: 'volumeContainers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager.rb new file mode 100644 index 0000000000..7e8c4ffca2 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager.rb @@ -0,0 +1,126 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The StorSimple Manager. + # + class Manager < Resource + + include MsRestAzure + + # @return [ManagerIntrinsicSettings] Represents the type of StorSimple + # Manager. + attr_accessor :cis_intrinsic_settings + + # @return [ManagerSku] Specifies the Sku. Default value: {} . + attr_accessor :sku + + # @return [String] Specifies the state of the resource as it is getting + # provisioned. Value of "Succeeded" means the Manager was successfully + # created. + attr_accessor :provisioning_state + + # @return [String] The etag of the manager. + attr_accessor :etag + + + # + # Mapper for Manager class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Manager', + type: { + name: 'Composite', + class_name: 'Manager', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + cis_intrinsic_settings: { + required: false, + serialized_name: 'properties.cisIntrinsicSettings', + type: { + name: 'Composite', + class_name: 'ManagerIntrinsicSettings' + } + }, + sku: { + required: false, + is_constant: true, + serialized_name: 'properties.sku', + default_value: {}, + type: { + name: 'Composite', + class_name: 'ManagerSku' + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_extended_info.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_extended_info.rb new file mode 100644 index 0000000000..c83bde1f16 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_extended_info.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::ARM::StorSimple8000Series + module Models + # + # The extended info of the manager. + # + class ManagerExtendedInfo < BaseModel + + include MsRestAzure + + # @return [String] The version of the extended info being persisted. + attr_accessor :version + + # @return [String] Represents the CIK of the resource. + attr_accessor :integrity_key + + # @return [String] Represents the CEK of the resource. + attr_accessor :encryption_key + + # @return [String] Represents the Cert thumbprint that was used to + # encrypt the CEK. + attr_accessor :encryption_key_thumbprint + + # @return [String] Represents the portal thumbprint which can be used + # optionally to encrypt the entire data before storing it. + attr_accessor :portal_certificate_thumbprint + + # @return [String] Represents the encryption algorithm used to encrypt + # the keys. None - if Key is saved in plain text format. Algorithm name - + # if key is encrypted + attr_accessor :algorithm + + # @return [String] The etag of the resource. + attr_accessor :etag + + + # + # Mapper for ManagerExtendedInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagerExtendedInfo', + type: { + name: 'Composite', + class_name: 'ManagerExtendedInfo', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + version: { + required: false, + serialized_name: 'properties.version', + type: { + name: 'String' + } + }, + integrity_key: { + required: true, + serialized_name: 'properties.integrityKey', + type: { + name: 'String' + } + }, + encryption_key: { + required: false, + serialized_name: 'properties.encryptionKey', + type: { + name: 'String' + } + }, + encryption_key_thumbprint: { + required: false, + serialized_name: 'properties.encryptionKeyThumbprint', + type: { + name: 'String' + } + }, + portal_certificate_thumbprint: { + required: false, + serialized_name: 'properties.portalCertificateThumbprint', + type: { + name: 'String' + } + }, + algorithm: { + required: true, + serialized_name: 'properties.algorithm', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_intrinsic_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_intrinsic_settings.rb new file mode 100644 index 0000000000..36ceb3fca5 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_intrinsic_settings.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::ARM::StorSimple8000Series + module Models + # + # Intrinsic settings which refers to the type of the Storsimple Manager. + # + class ManagerIntrinsicSettings + + include MsRestAzure + + # @return [ManagerType] The type of StorSimple Manager. Possible values + # include: 'GardaV1', 'HelsinkiV1' + attr_accessor :type + + + # + # Mapper for ManagerIntrinsicSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagerIntrinsicSettings', + type: { + name: 'Composite', + class_name: 'ManagerIntrinsicSettings', + model_properties: { + type: { + required: true, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'ManagerType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_list.rb new file mode 100644 index 0000000000..127858674c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The list of StorSimple Managers. + # + class ManagerList + + include MsRestAzure + + # @return [Array] The list of storsimple managers. + attr_accessor :value + + + # + # Mapper for ManagerList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagerList', + type: { + name: 'Composite', + class_name: 'ManagerList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ManagerElementType', + type: { + name: 'Composite', + class_name: 'Manager' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_patch.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_patch.rb new file mode 100644 index 0000000000..ce80c56d06 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_patch.rb @@ -0,0 +1,51 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The StorSimple Manager patch. + # + class ManagerPatch + + include MsRestAzure + + # @return [Hash{String => String}] The tags attached to the Manager. + attr_accessor :tags + + + # + # Mapper for ManagerPatch class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagerPatch', + type: { + name: 'Composite', + class_name: 'ManagerPatch', + model_properties: { + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_sku.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_sku.rb new file mode 100644 index 0000000000..08f125d931 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_sku.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::ARM::StorSimple8000Series + module Models + # + # The Sku. + # + class ManagerSku + + include MsRestAzure + + # @return [String] Refers to the sku name which should be "Standard". + # Default value: 'Standard' . + attr_accessor :name + + + # + # Mapper for ManagerSku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ManagerSku', + type: { + name: 'Composite', + class_name: 'ManagerSku', + model_properties: { + name: { + required: true, + is_constant: true, + serialized_name: 'name', + default_value: 'Standard', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_type.rb new file mode 100644 index 0000000000..c0efd7886b --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_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::ARM::StorSimple8000Series + module Models + # + # Defines values for ManagerType + # + module ManagerType + GardaV1 = "GardaV1" + HelsinkiV1 = "HelsinkiV1" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_aggregation_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_aggregation_type.rb new file mode 100644 index 0000000000..dfd78e52f8 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_aggregation_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::ARM::StorSimple8000Series + module Models + # + # Defines values for MetricAggregationType + # + module MetricAggregationType + Average = "Average" + Last = "Last" + Maximum = "Maximum" + Minimum = "Minimum" + None = "None" + Total = "Total" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_availablity.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_availablity.rb new file mode 100644 index 0000000000..3c5677a46d --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_availablity.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::ARM::StorSimple8000Series + module Models + # + # The metric availability. + # + class MetricAvailablity + + include MsRestAzure + + # @return [String] The aggregation interval for the metric. + attr_accessor :time_grain + + # @return [String] The retention period for the metric at the specified + # timegrain. + attr_accessor :retention + + + # + # Mapper for MetricAvailablity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricAvailablity', + type: { + name: 'Composite', + class_name: 'MetricAvailablity', + model_properties: { + time_grain: { + required: false, + serialized_name: 'timeGrain', + type: { + name: 'String' + } + }, + retention: { + required: false, + serialized_name: 'retention', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_data.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_data.rb new file mode 100644 index 0000000000..ca49f862f6 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_data.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::ARM::StorSimple8000Series + module Models + # + # The metric data. + # + class MetricData + + include MsRestAzure + + # @return [DateTime] The time stamp of the metric data. + attr_accessor :time_stamp + + # @return [Float] The sum of all samples at the time stamp. + attr_accessor :sum + + # @return [Integer] The count of all samples at the time stamp. + attr_accessor :count + + # @return [Float] The average of all samples at the time stamp. + attr_accessor :average + + # @return [Float] The minimum of all samples at the time stamp. + attr_accessor :minimum + + # @return [Float] The maximum of all samples at the time stamp. + attr_accessor :maximum + + + # + # Mapper for MetricData class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricData', + type: { + name: 'Composite', + class_name: 'MetricData', + model_properties: { + time_stamp: { + required: false, + serialized_name: 'timeStamp', + type: { + name: 'DateTime' + } + }, + sum: { + required: false, + serialized_name: 'sum', + type: { + name: 'Double' + } + }, + count: { + required: false, + serialized_name: 'count', + type: { + name: 'Number' + } + }, + average: { + required: false, + serialized_name: 'average', + type: { + name: 'Double' + } + }, + minimum: { + required: false, + serialized_name: 'minimum', + type: { + name: 'Double' + } + }, + maximum: { + required: false, + serialized_name: 'maximum', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition.rb new file mode 100644 index 0000000000..5e9aa7aa5b --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition.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::ARM::StorSimple8000Series + module Models + # + # The monitoring metric definition. + # + class MetricDefinition + + include MsRestAzure + + # @return [MetricName] The metric name. + attr_accessor :name + + # @return [MetricUnit] The metric unit. Possible values include: 'Bytes', + # 'BytesPerSecond', 'Count', 'CountPerSecond', 'Percent', 'Seconds' + attr_accessor :unit + + # @return [MetricAggregationType] The metric aggregation type. Possible + # values include: 'Average', 'Last', 'Maximum', 'Minimum', 'None', + # 'Total' + attr_accessor :primary_aggregation_type + + # @return [String] The metric source ID. + attr_accessor :resource_id + + # @return [Array] The available metric granularities. + attr_accessor :metric_availabilities + + # @return [Array] The available metric dimensions. + attr_accessor :dimensions + + # @return [String] The category of the metric. + attr_accessor :category + + # @return [String] The metric definition type. + attr_accessor :type + + + # + # Mapper for MetricDefinition class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricDefinition', + type: { + name: 'Composite', + class_name: 'MetricDefinition', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'Composite', + class_name: 'MetricName' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'Enum', + module: 'MetricUnit' + } + }, + primary_aggregation_type: { + required: false, + serialized_name: 'primaryAggregationType', + type: { + name: 'Enum', + module: 'MetricAggregationType' + } + }, + resource_id: { + required: false, + serialized_name: 'resourceId', + type: { + name: 'String' + } + }, + metric_availabilities: { + required: false, + serialized_name: 'metricAvailabilities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricAvailablityElementType', + type: { + name: 'Composite', + class_name: 'MetricAvailablity' + } + } + } + }, + dimensions: { + required: false, + serialized_name: 'dimensions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricDimensionElementType', + type: { + name: 'Composite', + class_name: 'MetricDimension' + } + } + } + }, + category: { + required: false, + serialized_name: 'category', + type: { + name: 'String' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition_list.rb new file mode 100644 index 0000000000..2b05dc5154 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The list of metric definitions. + # + class MetricDefinitionList + + include MsRestAzure + + # @return [Array] The list of metric definitions. + attr_accessor :value + + + # + # Mapper for MetricDefinitionList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricDefinitionList', + type: { + name: 'Composite', + class_name: 'MetricDefinitionList', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricDefinitionElementType', + type: { + name: 'Composite', + class_name: 'MetricDefinition' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_dimension.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_dimension.rb new file mode 100644 index 0000000000..7dd5858895 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_dimension.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::ARM::StorSimple8000Series + module Models + # + # The metric dimension. It indicates the source of the metric. + # + class MetricDimension + + include MsRestAzure + + # @return [String] The metric dimension name. + attr_accessor :name + + # @return [String] The metric dimension values. + attr_accessor :value + + + # + # Mapper for MetricDimension class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricDimension', + type: { + name: 'Composite', + class_name: 'MetricDimension', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_filter.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_filter.rb new file mode 100644 index 0000000000..269dbd95c4 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_filter.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::ARM::StorSimple8000Series + module Models + # + # The OData filters to be used for metrics. + # + class MetricFilter + + include MsRestAzure + + # @return [MetricNameFilter] Specifies the metric name filter specifying + # the name of the metric to be filtered on. Only 'Equality' operator is + # supported for this property. + attr_accessor :name + + # @return [DateTime] Specifies the start time of the time range to be + # queried. Only 'Greater Than Or Equal To' operator is supported for this + # property. + attr_accessor :start_time + + # @return [DateTime] Specifies the end time of the time range to be + # queried. Only 'Less Than Or Equal To' operator is supported for this + # property. + attr_accessor :end_time + + # @return [String] Specifies the time granularity of the metrics to be + # returned. E.g., "P1D". Valid values are the ones returned as the field + # "timeGrain" in the ListMetricDefinitions call. Only 'Equality' operator + # is supported for this property. + attr_accessor :time_grain + + # @return [String] Specifies the category of the metrics to be filtered. + # E.g., "CapacityUtilization". Valid values are the ones returned as the + # field "category" in the ListMetricDefinitions call. Only 'Equality' + # operator is supported for this property. + attr_accessor :category + + # @return [DimensionFilter] Specifies the source(the dimension) of the + # metrics to be filtered. Only 'Equality' operator is supported for this + # property. + attr_accessor :dimensions + + + # + # Mapper for MetricFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricFilter', + type: { + name: 'Composite', + class_name: 'MetricFilter', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'Composite', + class_name: 'MetricNameFilter' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + time_grain: { + required: false, + serialized_name: 'timeGrain', + type: { + name: 'String' + } + }, + category: { + required: true, + serialized_name: 'category', + type: { + name: 'String' + } + }, + dimensions: { + required: false, + serialized_name: 'dimensions', + type: { + name: 'Composite', + class_name: 'DimensionFilter' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_list.rb new file mode 100644 index 0000000000..45167f5977 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The metric list. + # + class MetricList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for MetricList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricList', + type: { + name: 'Composite', + class_name: 'MetricList', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricsElementType', + type: { + name: 'Composite', + class_name: 'Metrics' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_name.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_name.rb new file mode 100644 index 0000000000..3743390946 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_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::ARM::StorSimple8000Series + module Models + # + # The metric name. + # + class MetricName + + include MsRestAzure + + # @return [String] The metric name. + attr_accessor :value + + # @return [String] The localized metric name. + attr_accessor :localized_value + + + # + # Mapper for MetricName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricName', + type: { + name: 'Composite', + class_name: 'MetricName', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + }, + localized_value: { + required: false, + serialized_name: 'localizedValue', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_name_filter.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_name_filter.rb new file mode 100644 index 0000000000..18bc0d52fe --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_name_filter.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::ARM::StorSimple8000Series + module Models + # + # The metric name filter, specifying the name of the metric to be filtered + # on. + # + class MetricNameFilter + + include MsRestAzure + + # @return [String] Specifies the metric name to be filtered on. E.g., + # CloudStorageUsed. Valid values are the ones returned in the field + # "name" in the ListMetricDefinitions call. Only 'Equality' operator is + # supported for this property. + attr_accessor :value + + + # + # Mapper for MetricNameFilter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricNameFilter', + type: { + name: 'Composite', + class_name: 'MetricNameFilter', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_unit.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_unit.rb new file mode 100644 index 0000000000..2091ed2eaa --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_unit.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::ARM::StorSimple8000Series + module Models + # + # Defines values for MetricUnit + # + module MetricUnit + Bytes = "Bytes" + BytesPerSecond = "BytesPerSecond" + Count = "Count" + CountPerSecond = "CountPerSecond" + Percent = "Percent" + Seconds = "Seconds" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metrics.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metrics.rb new file mode 100644 index 0000000000..e61a089f20 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/metrics.rb @@ -0,0 +1,157 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The monitoring metric. + # + class Metrics + + include MsRestAzure + + # @return [String] The ID of metric source. + attr_accessor :resource_id + + # @return [DateTime] The start time of the metric data. + attr_accessor :start_time + + # @return [DateTime] The end time of the metric data. + attr_accessor :end_time + + # @return [String] The time granularity of the metric data. + attr_accessor :time_grain + + # @return [MetricAggregationType] The metric aggregation type. Possible + # values include: 'Average', 'Last', 'Maximum', 'Minimum', 'None', + # 'Total' + attr_accessor :primary_aggregation + + # @return [MetricName] The name of the metric. + attr_accessor :name + + # @return [Array] The metric dimensions. + attr_accessor :dimensions + + # @return [MetricUnit] The unit of the metric data. Possible values + # include: 'Bytes', 'BytesPerSecond', 'Count', 'CountPerSecond', + # 'Percent', 'Seconds' + attr_accessor :unit + + # @return [String] The type of the metric data. + attr_accessor :type + + # @return [Array] The list of the metric data. + attr_accessor :values + + + # + # Mapper for Metrics class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Metrics', + type: { + name: 'Composite', + class_name: 'Metrics', + model_properties: { + resource_id: { + required: false, + serialized_name: 'resourceId', + type: { + name: 'String' + } + }, + start_time: { + required: false, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + time_grain: { + required: false, + serialized_name: 'timeGrain', + type: { + name: 'String' + } + }, + primary_aggregation: { + required: false, + serialized_name: 'primaryAggregation', + type: { + name: 'Enum', + module: 'MetricAggregationType' + } + }, + name: { + required: false, + serialized_name: 'name', + type: { + name: 'Composite', + class_name: 'MetricName' + } + }, + dimensions: { + required: false, + serialized_name: 'dimensions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricDimensionElementType', + type: { + name: 'Composite', + class_name: 'MetricDimension' + } + } + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'Enum', + module: 'MetricUnit' + } + }, + type: { + required: false, + serialized_name: 'type', + type: { + name: 'String' + } + }, + values: { + required: false, + serialized_name: 'values', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricDataElementType', + type: { + name: 'Composite', + class_name: 'MetricData' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/monitoring_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/monitoring_status.rb new file mode 100644 index 0000000000..e067a90092 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/monitoring_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for MonitoringStatus + # + module MonitoringStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_id.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_id.rb new file mode 100644 index 0000000000..c117e98030 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_id.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::ARM::StorSimple8000Series + module Models + # + # Defines values for NetInterfaceId + # + module NetInterfaceId + Invalid = "Invalid" + Data0 = "Data0" + Data1 = "Data1" + Data2 = "Data2" + Data3 = "Data3" + Data4 = "Data4" + Data5 = "Data5" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_status.rb new file mode 100644 index 0000000000..882bd6a56a --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for NetInterfaceStatus + # + module NetInterfaceStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapter_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapter_list.rb new file mode 100644 index 0000000000..9ef442ce25 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapter_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of network adapters on the device. + # + class NetworkAdapterList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for NetworkAdapterList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkAdapterList', + type: { + name: 'Composite', + class_name: 'NetworkAdapterList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NetworkAdaptersElementType', + type: { + name: 'Composite', + class_name: 'NetworkAdapters' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapters.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapters.rb new file mode 100644 index 0000000000..c19c9cf87a --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapters.rb @@ -0,0 +1,126 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Represents the network adapter on device. + # + class NetworkAdapters + + include MsRestAzure + + # @return [NetInterfaceId] The ID of the network adapter. Possible values + # include: 'Invalid', 'Data0', 'Data1', 'Data2', 'Data3', 'Data4', + # 'Data5' + attr_accessor :interface_id + + # @return [NetInterfaceStatus] Value indicating status of network + # adapter. Possible values include: 'Enabled', 'Disabled' + attr_accessor :net_interface_status + + # @return [Boolean] Value indicating whether this instance is default. + attr_accessor :is_default + + # @return [ISCSIAndCloudStatus] Value indicating cloud and ISCSI status + # of network adapter. Possible values include: 'Disabled', + # 'IscsiEnabled', 'CloudEnabled', 'IscsiAndCloudEnabled' + attr_accessor :iscsi_and_cloud_status + + # @return [Integer] The speed of the network adapter. + attr_accessor :speed + + # @return [NetworkMode] The mode of network adapter, either IPv4, IPv6 or + # both. Possible values include: 'Invalid', 'IPV4', 'IPV6', 'BOTH' + attr_accessor :mode + + # @return [NicIPv4] The IPv4 configuration of the network adapter. + attr_accessor :nic_ipv4settings + + # @return [NicIPv6] The IPv6 configuration of the network adapter. + attr_accessor :nic_ipv6settings + + + # + # Mapper for NetworkAdapters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkAdapters', + type: { + name: 'Composite', + class_name: 'NetworkAdapters', + model_properties: { + interface_id: { + required: true, + serialized_name: 'interfaceId', + type: { + name: 'Enum', + module: 'NetInterfaceId' + } + }, + net_interface_status: { + required: true, + serialized_name: 'netInterfaceStatus', + type: { + name: 'Enum', + module: 'NetInterfaceStatus' + } + }, + is_default: { + required: false, + serialized_name: 'isDefault', + type: { + name: 'Boolean' + } + }, + iscsi_and_cloud_status: { + required: true, + serialized_name: 'iscsiAndCloudStatus', + type: { + name: 'Enum', + module: 'ISCSIAndCloudStatus' + } + }, + speed: { + required: false, + serialized_name: 'speed', + type: { + name: 'Number' + } + }, + mode: { + required: true, + serialized_name: 'mode', + type: { + name: 'Enum', + module: 'NetworkMode' + } + }, + nic_ipv4settings: { + required: false, + serialized_name: 'nicIpv4Settings', + type: { + name: 'Composite', + class_name: 'NicIPv4' + } + }, + nic_ipv6settings: { + required: false, + serialized_name: 'nicIpv6Settings', + type: { + name: 'Composite', + class_name: 'NicIPv6' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_interface_data0settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_interface_data0settings.rb new file mode 100644 index 0000000000..e274627ba3 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_interface_data0settings.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::ARM::StorSimple8000Series + module Models + # + # The 'Data 0' network interface card settings. + # + class NetworkInterfaceData0Settings + + include MsRestAzure + + # @return [String] The controller 0's IPv4 address. + attr_accessor :controller_zero_ip + + # @return [String] The controller 1's IPv4 address. + attr_accessor :controller_one_ip + + + # + # Mapper for NetworkInterfaceData0Settings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkInterfaceData0Settings', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceData0Settings', + model_properties: { + controller_zero_ip: { + required: false, + serialized_name: 'controllerZeroIp', + type: { + name: 'String' + } + }, + controller_one_ip: { + required: false, + serialized_name: 'controllerOneIp', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_mode.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_mode.rb new file mode 100644 index 0000000000..a68e591e56 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_mode.rb @@ -0,0 +1,18 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Defines values for NetworkMode + # + module NetworkMode + Invalid = "Invalid" + IPV4 = "IPV4" + IPV6 = "IPV6" + BOTH = "BOTH" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings.rb new file mode 100644 index 0000000000..8453066f12 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings.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::ARM::StorSimple8000Series + module Models + # + # Represents the network settings of a device. + # + class NetworkSettings < BaseModel + + include MsRestAzure + + # @return [DNSSettings] The DNS (Domain Name System) settings of device. + attr_accessor :dns_settings + + # @return [NetworkAdapterList] The network adapter list of device. + attr_accessor :network_adapters + + # @return [WebproxySettings] The webproxy settings of device. + attr_accessor :webproxy_settings + + + # + # Mapper for NetworkSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkSettings', + type: { + name: 'Composite', + class_name: 'NetworkSettings', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + dns_settings: { + required: true, + serialized_name: 'properties.dnsSettings', + type: { + name: 'Composite', + class_name: 'DNSSettings' + } + }, + network_adapters: { + required: true, + serialized_name: 'properties.networkAdapters', + type: { + name: 'Composite', + class_name: 'NetworkAdapterList' + } + }, + webproxy_settings: { + required: true, + serialized_name: 'properties.webproxySettings', + type: { + name: 'Composite', + class_name: 'WebproxySettings' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings_patch.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings_patch.rb new file mode 100644 index 0000000000..d6cafc2940 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings_patch.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::ARM::StorSimple8000Series + module Models + # + # Represents the patch request for the network settings of a device. + # + class NetworkSettingsPatch + + include MsRestAzure + + # @return [DNSSettings] The DNS (Domain Name System) settings of device. + attr_accessor :dns_settings + + # @return [NetworkAdapterList] The network adapter list of device. + attr_accessor :network_adapters + + + # + # Mapper for NetworkSettingsPatch class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkSettingsPatch', + type: { + name: 'Composite', + class_name: 'NetworkSettingsPatch', + model_properties: { + dns_settings: { + required: false, + serialized_name: 'properties.dnsSettings', + type: { + name: 'Composite', + class_name: 'DNSSettings' + } + }, + network_adapters: { + required: false, + serialized_name: 'properties.networkAdapters', + type: { + name: 'Composite', + class_name: 'NetworkAdapterList' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv4.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv4.rb new file mode 100644 index 0000000000..fd07b4b2fa --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv4.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Details related to the IPv4 address configuration. + # + class NicIPv4 + + include MsRestAzure + + # @return [String] The IPv4 address of the network adapter. + attr_accessor :ipv4address + + # @return [String] The IPv4 netmask of the network adapter. + attr_accessor :ipv4netmask + + # @return [String] The IPv4 gateway of the network adapter. + attr_accessor :ipv4gateway + + # @return [String] The IPv4 address of Controller0. + attr_accessor :controller0ipv4address + + # @return [String] The IPv4 address of Controller1. + attr_accessor :controller1ipv4address + + + # + # Mapper for NicIPv4 class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NicIPv4', + type: { + name: 'Composite', + class_name: 'NicIPv4', + model_properties: { + ipv4address: { + required: false, + serialized_name: 'ipv4Address', + type: { + name: 'String' + } + }, + ipv4netmask: { + required: false, + serialized_name: 'ipv4Netmask', + type: { + name: 'String' + } + }, + ipv4gateway: { + required: false, + serialized_name: 'ipv4Gateway', + type: { + name: 'String' + } + }, + controller0ipv4address: { + required: false, + serialized_name: 'controller0Ipv4Address', + type: { + name: 'String' + } + }, + controller1ipv4address: { + required: false, + serialized_name: 'controller1Ipv4Address', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv6.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv6.rb new file mode 100644 index 0000000000..d10471bd3d --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv6.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # Details related to the IPv6 address configuration. + # + class NicIPv6 + + include MsRestAzure + + # @return [String] The IPv6 address of the network adapter. + attr_accessor :ipv6address + + # @return [String] The IPv6 prefix of the network adapter. + attr_accessor :ipv6prefix + + # @return [String] The IPv6 gateway of the network adapter. + attr_accessor :ipv6gateway + + # @return [String] The IPv6 address of Controller0. + attr_accessor :controller0ipv6address + + # @return [String] The IPv6 address of Controller1. + attr_accessor :controller1ipv6address + + + # + # Mapper for NicIPv6 class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NicIPv6', + type: { + name: 'Composite', + class_name: 'NicIPv6', + model_properties: { + ipv6address: { + required: false, + serialized_name: 'ipv6Address', + type: { + name: 'String' + } + }, + ipv6prefix: { + required: false, + serialized_name: 'ipv6Prefix', + type: { + name: 'String' + } + }, + ipv6gateway: { + required: false, + serialized_name: 'ipv6Gateway', + type: { + name: 'String' + } + }, + controller0ipv6address: { + required: false, + serialized_name: 'controller0Ipv6Address', + type: { + name: 'String' + } + }, + controller1ipv6address: { + required: false, + serialized_name: 'controller1Ipv6Address', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/operation_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/operation_status.rb new file mode 100644 index 0000000000..392b2aaad7 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/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::ARM::StorSimple8000Series + module Models + # + # Defines values for OperationStatus + # + module OperationStatus + None = "None" + Updating = "Updating" + Deleting = "Deleting" + Restoring = "Restoring" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/owner_ship_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/owner_ship_status.rb new file mode 100644 index 0000000000..8c6b1cafd9 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/owner_ship_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for OwnerShipStatus + # + module OwnerShipStatus + Owned = "Owned" + NotOwned = "NotOwned" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/public_key.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/public_key.rb new file mode 100644 index 0000000000..92c2bb1003 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/public_key.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::ARM::StorSimple8000Series + module Models + # + # The public key. + # + class PublicKey + + include MsRestAzure + + # @return [String] The key. + attr_accessor :key + + + # + # Mapper for PublicKey class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PublicKey', + type: { + name: 'Composite', + class_name: 'PublicKey', + model_properties: { + key: { + required: true, + serialized_name: 'key', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/recurrence_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/recurrence_type.rb new file mode 100644 index 0000000000..4e55f11b94 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/recurrence_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::ARM::StorSimple8000Series + module Models + # + # Defines values for RecurrenceType + # + module RecurrenceType + Minutes = "Minutes" + Hourly = "Hourly" + Daily = "Daily" + Weekly = "Weekly" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_mode_configuration.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_mode_configuration.rb new file mode 100644 index 0000000000..1f80aed244 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_mode_configuration.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::ARM::StorSimple8000Series + module Models + # + # Defines values for RemoteManagementModeConfiguration + # + module RemoteManagementModeConfiguration + Unknown = "Unknown" + Disabled = "Disabled" + HttpsEnabled = "HttpsEnabled" + HttpsAndHttpEnabled = "HttpsAndHttpEnabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings.rb new file mode 100644 index 0000000000..c1828b23f2 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings.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::ARM::StorSimple8000Series + module Models + # + # The settings for remote management of a device. + # + class RemoteManagementSettings + + include MsRestAzure + + # @return [RemoteManagementModeConfiguration] The remote management mode. + # Possible values include: 'Unknown', 'Disabled', 'HttpsEnabled', + # 'HttpsAndHttpEnabled' + attr_accessor :remote_management_mode + + # @return [String] The remote management certificates. + attr_accessor :remote_management_certificate + + + # + # Mapper for RemoteManagementSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RemoteManagementSettings', + type: { + name: 'Composite', + class_name: 'RemoteManagementSettings', + model_properties: { + remote_management_mode: { + required: true, + serialized_name: 'remoteManagementMode', + type: { + name: 'Enum', + module: 'RemoteManagementModeConfiguration' + } + }, + remote_management_certificate: { + required: false, + serialized_name: 'remoteManagementCertificate', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings_patch.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings_patch.rb new file mode 100644 index 0000000000..31447551a0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings_patch.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::ARM::StorSimple8000Series + module Models + # + # The settings for updating remote management mode of the device. + # + class RemoteManagementSettingsPatch + + include MsRestAzure + + # @return [RemoteManagementModeConfiguration] The remote management mode. + # Possible values include: 'Unknown', 'Disabled', 'HttpsEnabled', + # 'HttpsAndHttpEnabled' + attr_accessor :remote_management_mode + + + # + # Mapper for RemoteManagementSettingsPatch class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'RemoteManagementSettingsPatch', + type: { + name: 'Composite', + class_name: 'RemoteManagementSettingsPatch', + model_properties: { + remote_management_mode: { + required: true, + serialized_name: 'remoteManagementMode', + type: { + name: 'Enum', + module: 'RemoteManagementModeConfiguration' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/resource.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/resource.rb new file mode 100644 index 0000000000..70c542a632 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/resource.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::ARM::StorSimple8000Series + module Models + # + # The Azure Resource. + # + class Resource + + include MsRestAzure + + # @return [String] The resource ID. + attr_accessor :id + + # @return [String] The resource name. + attr_accessor :name + + # @return [String] The resource type. + attr_accessor :type + + # @return [String] The geo location of the resource. + attr_accessor :location + + # @return [Hash{String => String}] The tags attached to the resource. + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_recurrence.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_recurrence.rb new file mode 100644 index 0000000000..26194b73f2 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_recurrence.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::ARM::StorSimple8000Series + module Models + # + # The schedule recurrence. + # + class ScheduleRecurrence + + include MsRestAzure + + # @return [RecurrenceType] The recurrence type. Possible values include: + # 'Minutes', 'Hourly', 'Daily', 'Weekly' + attr_accessor :recurrence_type + + # @return [Integer] The recurrence value. + attr_accessor :recurrence_value + + # @return [Array] The week days list. Applicable only for + # schedules of recurrence type 'weekly'. + attr_accessor :weekly_days_list + + + # + # Mapper for ScheduleRecurrence class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ScheduleRecurrence', + type: { + name: 'Composite', + class_name: 'ScheduleRecurrence', + model_properties: { + recurrence_type: { + required: true, + serialized_name: 'recurrenceType', + type: { + name: 'Enum', + module: 'RecurrenceType' + } + }, + recurrence_value: { + required: true, + serialized_name: 'recurrenceValue', + type: { + name: 'Number' + } + }, + weekly_days_list: { + required: false, + serialized_name: 'weeklyDaysList', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DayOfWeekElementType', + type: { + name: 'Enum', + module: 'DayOfWeek' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_status.rb new file mode 100644 index 0000000000..b658f22b5e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for ScheduleStatus + # + module ScheduleStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/scheduled_backup_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/scheduled_backup_status.rb new file mode 100644 index 0000000000..8de717ee0c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/scheduled_backup_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for ScheduledBackupStatus + # + module ScheduledBackupStatus + Disabled = "Disabled" + Enabled = "Enabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/secondary_dnssettings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/secondary_dnssettings.rb new file mode 100644 index 0000000000..97297dce25 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/secondary_dnssettings.rb @@ -0,0 +1,51 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The secondary DNS settings. + # + class SecondaryDNSSettings + + include MsRestAzure + + # @return [Array] The list of secondary DNS Server IP addresses. + attr_accessor :secondary_dns_servers + + + # + # Mapper for SecondaryDNSSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SecondaryDNSSettings', + type: { + name: 'Composite', + class_name: 'SecondaryDNSSettings', + model_properties: { + secondary_dns_servers: { + required: false, + serialized_name: 'secondaryDnsServers', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings.rb new file mode 100644 index 0000000000..ce4cf9c51c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings.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::ARM::StorSimple8000Series + module Models + # + # The security settings of a device. + # + class SecuritySettings < BaseModel + + include MsRestAzure + + # @return [RemoteManagementSettings] The settings for remote management + # of a device. + attr_accessor :remote_management_settings + + # @return [ChapSettings] The Challenge-Handshake Authentication Protocol + # (CHAP) settings. + attr_accessor :chap_settings + + + # + # Mapper for SecuritySettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SecuritySettings', + type: { + name: 'Composite', + class_name: 'SecuritySettings', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + remote_management_settings: { + required: true, + serialized_name: 'properties.remoteManagementSettings', + type: { + name: 'Composite', + class_name: 'RemoteManagementSettings' + } + }, + chap_settings: { + required: true, + serialized_name: 'properties.chapSettings', + type: { + name: 'Composite', + class_name: 'ChapSettings' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings_patch.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings_patch.rb new file mode 100644 index 0000000000..03eb7fa0e5 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings_patch.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::ARM::StorSimple8000Series + module Models + # + # Represents the patch request for the security settings of a device. + # + class SecuritySettingsPatch + + include MsRestAzure + + # @return [RemoteManagementSettingsPatch] The remote management settings. + attr_accessor :remote_management_settings + + # @return [AsymmetricEncryptedSecret] The device administrator password. + attr_accessor :device_admin_password + + # @return [AsymmetricEncryptedSecret] The snapshot manager password. + attr_accessor :snapshot_password + + # @return [ChapSettings] The device CHAP and reverse-CHAP settings. + attr_accessor :chap_settings + + # @return [CloudApplianceSettings] The cloud appliance settings. + attr_accessor :cloud_appliance_settings + + + # + # Mapper for SecuritySettingsPatch class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SecuritySettingsPatch', + type: { + name: 'Composite', + class_name: 'SecuritySettingsPatch', + model_properties: { + remote_management_settings: { + required: false, + serialized_name: 'properties.remoteManagementSettings', + type: { + name: 'Composite', + class_name: 'RemoteManagementSettingsPatch' + } + }, + device_admin_password: { + required: false, + serialized_name: 'properties.deviceAdminPassword', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + }, + snapshot_password: { + required: false, + serialized_name: 'properties.snapshotPassword', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + }, + chap_settings: { + required: false, + serialized_name: 'properties.chapSettings', + type: { + name: 'Composite', + class_name: 'ChapSettings' + } + }, + cloud_appliance_settings: { + required: false, + serialized_name: 'properties.cloudApplianceSettings', + type: { + name: 'Composite', + class_name: 'CloudApplianceSettings' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/send_test_alert_email_request.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/send_test_alert_email_request.rb new file mode 100644 index 0000000000..59aed4481e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/send_test_alert_email_request.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::ARM::StorSimple8000Series + module Models + # + # The request for sending test alert email + # + class SendTestAlertEmailRequest + + include MsRestAzure + + # @return [Array] The list of email IDs to send the test alert + # email + attr_accessor :email_list + + + # + # Mapper for SendTestAlertEmailRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SendTestAlertEmailRequest', + type: { + name: 'Composite', + class_name: 'SendTestAlertEmailRequest', + model_properties: { + email_list: { + required: true, + serialized_name: 'emailList', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/ssl_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/ssl_status.rb new file mode 100644 index 0000000000..9665fcbe09 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/ssl_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for SslStatus + # + module SslStatus + Enabled = "Enabled" + Disabled = "Disabled" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential.rb new file mode 100644 index 0000000000..5c04bf8aed --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential.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::ARM::StorSimple8000Series + module Models + # + # The storage account credential. + # + class StorageAccountCredential < BaseModel + + include MsRestAzure + + # @return [String] The storage endpoint + attr_accessor :end_point + + # @return [SslStatus] Signifies whether SSL needs to be enabled or not. + # Possible values include: 'Enabled', 'Disabled' + attr_accessor :ssl_status + + # @return [AsymmetricEncryptedSecret] The details of the storage account + # password. + attr_accessor :access_key + + # @return [Integer] The count of volumes using this storage account + # credential. + attr_accessor :volumes_count + + + # + # Mapper for StorageAccountCredential class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageAccountCredential', + type: { + name: 'Composite', + class_name: 'StorageAccountCredential', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + end_point: { + required: true, + serialized_name: 'properties.endPoint', + type: { + name: 'String' + } + }, + ssl_status: { + required: true, + serialized_name: 'properties.sslStatus', + type: { + name: 'Enum', + module: 'SslStatus' + } + }, + access_key: { + required: false, + serialized_name: 'properties.accessKey', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + }, + volumes_count: { + required: false, + read_only: true, + serialized_name: 'properties.volumesCount', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential_list.rb new file mode 100644 index 0000000000..fe435954f0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of storage account credential entities. + # + class StorageAccountCredentialList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for StorageAccountCredentialList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageAccountCredentialList', + type: { + name: 'Composite', + class_name: 'StorageAccountCredentialList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StorageAccountCredentialElementType', + type: { + name: 'Composite', + class_name: 'StorageAccountCredential' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/symmetric_encrypted_secret.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/symmetric_encrypted_secret.rb new file mode 100644 index 0000000000..3dc28caca7 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/symmetric_encrypted_secret.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::ARM::StorSimple8000Series + module Models + # + # Represents the secrets encrypted using Symmetric Encryption Key. + # + class SymmetricEncryptedSecret + + include MsRestAzure + + # @return [String] The value of the secret itself. If the secret is in + # plaintext or null then EncryptionAlgorithm will be none. + attr_accessor :value + + # @return [String] The thumbprint of the cert that was used to encrypt + # "Value". + attr_accessor :value_certificate_thumbprint + + # @return [EncryptionAlgorithm] The algorithm used to encrypt the + # "Value". Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + attr_accessor :encryption_algorithm + + + # + # Mapper for SymmetricEncryptedSecret class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SymmetricEncryptedSecret', + type: { + name: 'Composite', + class_name: 'SymmetricEncryptedSecret', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'String' + } + }, + value_certificate_thumbprint: { + required: false, + serialized_name: 'valueCertificateThumbprint', + type: { + name: 'String' + } + }, + encryption_algorithm: { + required: true, + serialized_name: 'encryptionAlgorithm', + type: { + name: 'Enum', + module: 'EncryptionAlgorithm' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_error_message.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_error_message.rb new file mode 100644 index 0000000000..9c22dd5331 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_error_message.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::ARM::StorSimple8000Series + module Models + # + # The error/warning message due to which the device is ineligible as a + # failover target device. + # + class TargetEligibilityErrorMessage + + include MsRestAzure + + # @return [String] The localized error message stating the reason why the + # device is not eligible as a target device. + attr_accessor :message + + # @return [String] The localized resolution message for the error. + attr_accessor :resolution + + # @return [TargetEligibilityResultCode] The result code for the error, + # due to which the device does not qualify as a failover target device. + # Possible values include: 'TargetAndSourceCannotBeSameError', + # 'TargetIsNotOnlineError', 'TargetSourceIncompatibleVersionError', + # 'LocalToTieredVolumesConversionWarning', + # 'TargetInsufficientCapacityError', + # 'TargetInsufficientLocalVolumeMemoryError', + # 'TargetInsufficientTieredVolumeMemoryError' + attr_accessor :result_code + + + # + # Mapper for TargetEligibilityErrorMessage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TargetEligibilityErrorMessage', + type: { + name: 'Composite', + class_name: 'TargetEligibilityErrorMessage', + model_properties: { + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, + resolution: { + required: false, + serialized_name: 'resolution', + type: { + name: 'String' + } + }, + result_code: { + required: false, + serialized_name: 'resultCode', + type: { + name: 'Enum', + module: 'TargetEligibilityResultCode' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result.rb new file mode 100644 index 0000000000..21c74f2a96 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result.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::ARM::StorSimple8000Series + module Models + # + # The eligibility result of device, as a failover target device. + # + class TargetEligibilityResult + + include MsRestAzure + + # @return [TargetEligibilityStatus] The eligibility status of device, as + # a failover target device. Possible values include: 'NotEligible', + # 'Eligible' + attr_accessor :eligibility_status + + # @return [Array] The list of error + # messages, if a device does not qualify as a failover target device. + attr_accessor :messages + + + # + # Mapper for TargetEligibilityResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TargetEligibilityResult', + type: { + name: 'Composite', + class_name: 'TargetEligibilityResult', + model_properties: { + eligibility_status: { + required: false, + serialized_name: 'eligibilityStatus', + type: { + name: 'Enum', + module: 'TargetEligibilityStatus' + } + }, + messages: { + required: false, + serialized_name: 'messages', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TargetEligibilityErrorMessageElementType', + type: { + name: 'Composite', + class_name: 'TargetEligibilityErrorMessage' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result_code.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result_code.rb new file mode 100644 index 0000000000..cfd7fe3a3e --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result_code.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::ARM::StorSimple8000Series + module Models + # + # Defines values for TargetEligibilityResultCode + # + module TargetEligibilityResultCode + TargetAndSourceCannotBeSameError = "TargetAndSourceCannotBeSameError" + TargetIsNotOnlineError = "TargetIsNotOnlineError" + TargetSourceIncompatibleVersionError = "TargetSourceIncompatibleVersionError" + LocalToTieredVolumesConversionWarning = "LocalToTieredVolumesConversionWarning" + TargetInsufficientCapacityError = "TargetInsufficientCapacityError" + TargetInsufficientLocalVolumeMemoryError = "TargetInsufficientLocalVolumeMemoryError" + TargetInsufficientTieredVolumeMemoryError = "TargetInsufficientTieredVolumeMemoryError" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_status.rb new file mode 100644 index 0000000000..a961e867ea --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for TargetEligibilityStatus + # + module TargetEligibilityStatus + NotEligible = "NotEligible" + Eligible = "Eligible" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/time.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/time.rb new file mode 100644 index 0000000000..393859f56f --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/time.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The time. + # + class Time + + include MsRestAzure + + # @return [Integer] The hour. + attr_accessor :hours + + # @return [Integer] The minute. + attr_accessor :minutes + + # @return [Integer] The second. + attr_accessor :seconds + + + # + # Mapper for Time class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Time', + type: { + name: 'Composite', + class_name: 'Time', + model_properties: { + hours: { + required: true, + serialized_name: 'hours', + constraints: { + InclusiveMaximum: 23, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + minutes: { + required: true, + serialized_name: 'minutes', + constraints: { + InclusiveMaximum: 59, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + seconds: { + required: true, + serialized_name: 'seconds', + constraints: { + InclusiveMaximum: 59, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/time_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/time_settings.rb new file mode 100644 index 0000000000..e8466a95f0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/time_settings.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::ARM::StorSimple8000Series + module Models + # + # The time settings of a device. + # + class TimeSettings < BaseModel + + include MsRestAzure + + # @return [String] The timezone of device, like '(UTC -06:00) Central + # America' + attr_accessor :time_zone + + # @return [String] The primary Network Time Protocol (NTP) server name, + # like 'time.windows.com'. + attr_accessor :primary_time_server + + # @return [Array] The secondary Network Time Protocol (NTP) + # server name, like 'time.contoso.com'. It's optional. + attr_accessor :secondary_time_server + + + # + # Mapper for TimeSettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TimeSettings', + type: { + name: 'Composite', + class_name: 'TimeSettings', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + time_zone: { + required: true, + serialized_name: 'properties.timeZone', + type: { + name: 'String' + } + }, + primary_time_server: { + required: false, + serialized_name: 'properties.primaryTimeServer', + type: { + name: 'String' + } + }, + secondary_time_server: { + required: false, + serialized_name: 'properties.secondaryTimeServer', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/updates.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/updates.rb new file mode 100644 index 0000000000..d1e29d0a51 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/updates.rb @@ -0,0 +1,107 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The updates profile of a device. + # + class Updates < BaseModel + + include MsRestAzure + + # @return [Boolean] Set to 'true' if regular updates are available for + # the device. + attr_accessor :regular_updates_available + + # @return [Boolean] Set to 'true' if maintenance mode update available. + attr_accessor :maintenance_mode_updates_available + + # @return [Boolean] Indicates whether an update is in progress or not. + attr_accessor :is_update_in_progress + + # @return [DateTime] The time when the last update was completed. + attr_accessor :last_updated_time + + + # + # Mapper for Updates class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Updates', + type: { + name: 'Composite', + class_name: 'Updates', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + regular_updates_available: { + required: false, + serialized_name: 'properties.regularUpdatesAvailable', + type: { + name: 'Boolean' + } + }, + maintenance_mode_updates_available: { + required: false, + serialized_name: 'properties.maintenanceModeUpdatesAvailable', + type: { + name: 'Boolean' + } + }, + is_update_in_progress: { + required: false, + serialized_name: 'properties.isUpdateInProgress', + type: { + name: 'Boolean' + } + }, + last_updated_time: { + required: false, + serialized_name: 'properties.lastUpdatedTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/virtual_machine_api_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/virtual_machine_api_type.rb new file mode 100644 index 0000000000..50d679b665 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/virtual_machine_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::ARM::StorSimple8000Series + module Models + # + # Defines values for VirtualMachineApiType + # + module VirtualMachineApiType + Classic = "Classic" + Arm = "Arm" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/vm_image.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/vm_image.rb new file mode 100644 index 0000000000..6742301365 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/vm_image.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The virtual machine image. + # + class VmImage + + include MsRestAzure + + # @return [String] The name. + attr_accessor :name + + # @return [String] The version. + attr_accessor :version + + # @return [String] The offer. + attr_accessor :offer + + # @return [String] The publisher. + attr_accessor :publisher + + # @return [String] The SKU. + attr_accessor :sku + + + # + # Mapper for VmImage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VmImage', + type: { + name: 'Composite', + class_name: 'VmImage', + model_properties: { + name: { + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + version: { + required: true, + serialized_name: 'version', + type: { + name: 'String' + } + }, + offer: { + required: true, + serialized_name: 'offer', + type: { + name: 'String' + } + }, + publisher: { + required: true, + serialized_name: 'publisher', + type: { + name: 'String' + } + }, + sku: { + required: true, + serialized_name: 'sku', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume.rb new file mode 100644 index 0000000000..cde3ec2dd4 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume.rb @@ -0,0 +1,187 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The volume. + # + class Volume < BaseModel + + include MsRestAzure + + # @return [Integer] The size of the volume in bytes. + attr_accessor :size_in_bytes + + # @return [VolumeType] The type of the volume. Possible values include: + # 'Tiered', 'Archival', 'LocallyPinned' + attr_accessor :volume_type + + # @return [String] The ID of the volume container, in which this volume + # is created. + attr_accessor :volume_container_id + + # @return [Array] The IDs of the access control records, + # associated with the volume. + attr_accessor :access_control_record_ids + + # @return [VolumeStatus] The volume status. Possible values include: + # 'Online', 'Offline' + attr_accessor :volume_status + + # @return [OperationStatus] The operation status on the volume. Possible + # values include: 'None', 'Updating', 'Deleting', 'Restoring' + attr_accessor :operation_status + + # @return [BackupStatus] The backup status of the volume. Possible values + # include: 'Enabled', 'Disabled' + attr_accessor :backup_status + + # @return [MonitoringStatus] The monitoring status of the volume. + # Possible values include: 'Enabled', 'Disabled' + attr_accessor :monitoring_status + + # @return [Array] The IDs of the backup policies, in which this + # volume is part of. + attr_accessor :backup_policy_ids + + + # + # Mapper for Volume class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Volume', + type: { + name: 'Composite', + class_name: 'Volume', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + size_in_bytes: { + required: true, + serialized_name: 'properties.sizeInBytes', + type: { + name: 'Number' + } + }, + volume_type: { + required: true, + serialized_name: 'properties.volumeType', + type: { + name: 'Enum', + module: 'VolumeType' + } + }, + volume_container_id: { + required: false, + read_only: true, + serialized_name: 'properties.volumeContainerId', + type: { + name: 'String' + } + }, + access_control_record_ids: { + required: true, + serialized_name: 'properties.accessControlRecordIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + volume_status: { + required: true, + serialized_name: 'properties.volumeStatus', + type: { + name: 'Enum', + module: 'VolumeStatus' + } + }, + operation_status: { + required: false, + read_only: true, + serialized_name: 'properties.operationStatus', + type: { + name: 'Enum', + module: 'OperationStatus' + } + }, + backup_status: { + required: false, + read_only: true, + serialized_name: 'properties.backupStatus', + type: { + name: 'Enum', + module: 'BackupStatus' + } + }, + monitoring_status: { + required: true, + serialized_name: 'properties.monitoringStatus', + type: { + name: 'Enum', + module: 'MonitoringStatus' + } + }, + backup_policy_ids: { + required: false, + read_only: true, + serialized_name: 'properties.backupPolicyIds', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container.rb new file mode 100644 index 0000000000..11a45e1379 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container.rb @@ -0,0 +1,161 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The volume container. + # + class VolumeContainer < BaseModel + + include MsRestAzure + + # @return [AsymmetricEncryptedSecret] The key used to encrypt data in the + # volume container. It is required when property 'EncryptionStatus' is + # "Enabled". + attr_accessor :encryption_key + + # @return [EncryptionStatus] The flag to denote whether encryption is + # enabled or not. Possible values include: 'Enabled', 'Disabled' + attr_accessor :encryption_status + + # @return [Integer] The number of volumes in the volume Container. + attr_accessor :volume_count + + # @return [String] The path ID of storage account associated with the + # volume container. + attr_accessor :storage_account_credential_id + + # @return [OwnerShipStatus] The owner ship status of the volume + # container. Only when the status is "NotOwned", the delete operation on + # the volume container is permitted. Possible values include: 'Owned', + # 'NotOwned' + attr_accessor :owner_ship_status + + # @return [Integer] The bandwidth-rate set on the volume container. + attr_accessor :band_width_rate_in_mbps + + # @return [String] The ID of the bandwidth setting associated with the + # volume container. + attr_accessor :bandwidth_setting_id + + # @return [Integer] The total cloud storage for the volume container. + attr_accessor :total_cloud_storage_usage_in_bytes + + + # + # Mapper for VolumeContainer class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VolumeContainer', + type: { + name: 'Composite', + class_name: 'VolumeContainer', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + encryption_key: { + required: false, + serialized_name: 'properties.encryptionKey', + type: { + name: 'Composite', + class_name: 'AsymmetricEncryptedSecret' + } + }, + encryption_status: { + required: false, + read_only: true, + serialized_name: 'properties.encryptionStatus', + type: { + name: 'Enum', + module: 'EncryptionStatus' + } + }, + volume_count: { + required: false, + read_only: true, + serialized_name: 'properties.volumeCount', + type: { + name: 'Number' + } + }, + storage_account_credential_id: { + required: true, + serialized_name: 'properties.storageAccountCredentialId', + type: { + name: 'String' + } + }, + owner_ship_status: { + required: false, + read_only: true, + serialized_name: 'properties.ownerShipStatus', + type: { + name: 'Enum', + module: 'OwnerShipStatus' + } + }, + band_width_rate_in_mbps: { + required: false, + serialized_name: 'properties.bandWidthRateInMbps', + type: { + name: 'Number' + } + }, + bandwidth_setting_id: { + required: false, + serialized_name: 'properties.bandwidthSettingId', + type: { + name: 'String' + } + }, + total_cloud_storage_usage_in_bytes: { + required: false, + read_only: true, + serialized_name: 'properties.totalCloudStorageUsageInBytes', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_failover_metadata.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_failover_metadata.rb new file mode 100644 index 0000000000..8cb8149896 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_failover_metadata.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::ARM::StorSimple8000Series + module Models + # + # The metadata of the volume container, that is being considered as part of + # a failover set. + # + class VolumeContainerFailoverMetadata + + include MsRestAzure + + # @return [String] The path ID of the volume container. + attr_accessor :volume_container_id + + # @return [Array] The list of metadata of volumes + # inside the volume container, which contains valid cloud snapshots. + attr_accessor :volumes + + + # + # Mapper for VolumeContainerFailoverMetadata class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VolumeContainerFailoverMetadata', + type: { + name: 'Composite', + class_name: 'VolumeContainerFailoverMetadata', + model_properties: { + volume_container_id: { + required: false, + serialized_name: 'volumeContainerId', + type: { + name: 'String' + } + }, + volumes: { + required: false, + serialized_name: 'volumes', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VolumeFailoverMetadataElementType', + type: { + name: 'Composite', + class_name: 'VolumeFailoverMetadata' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_list.rb new file mode 100644 index 0000000000..38001b5cb0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of volume container entities. + # + class VolumeContainerList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for VolumeContainerList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VolumeContainerList', + type: { + name: 'Composite', + class_name: 'VolumeContainerList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VolumeContainerElementType', + type: { + name: 'Composite', + class_name: 'VolumeContainer' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_failover_metadata.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_failover_metadata.rb new file mode 100644 index 0000000000..54d7965be7 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_failover_metadata.rb @@ -0,0 +1,109 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The metadata of a volume that has valid cloud snapshot. + # + class VolumeFailoverMetadata + + include MsRestAzure + + # @return [String] The path ID of the volume. + attr_accessor :volume_id + + # @return [VolumeType] The type of the volume. Possible values include: + # 'Tiered', 'Archival', 'LocallyPinned' + attr_accessor :volume_type + + # @return [Integer] The size of the volume in bytes at the time the + # snapshot was taken. + attr_accessor :size_in_bytes + + # @return [DateTime] The date at which the snapshot was taken. + attr_accessor :backup_created_date + + # @return [String] The path ID of the backup-element for this volume, + # inside the backup set. + attr_accessor :backup_element_id + + # @return [String] The path ID of the backup set. + attr_accessor :backup_id + + # @return [String] The path ID of the backup policy using which the + # snapshot was taken. + attr_accessor :backup_policy_id + + + # + # Mapper for VolumeFailoverMetadata class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VolumeFailoverMetadata', + type: { + name: 'Composite', + class_name: 'VolumeFailoverMetadata', + model_properties: { + volume_id: { + required: false, + serialized_name: 'volumeId', + type: { + name: 'String' + } + }, + volume_type: { + required: false, + serialized_name: 'volumeType', + type: { + name: 'Enum', + module: 'VolumeType' + } + }, + size_in_bytes: { + required: false, + serialized_name: 'sizeInBytes', + type: { + name: 'Number' + } + }, + backup_created_date: { + required: false, + serialized_name: 'backupCreatedDate', + type: { + name: 'DateTime' + } + }, + backup_element_id: { + required: false, + serialized_name: 'backupElementId', + type: { + name: 'String' + } + }, + backup_id: { + required: false, + serialized_name: 'backupId', + type: { + name: 'String' + } + }, + backup_policy_id: { + required: false, + serialized_name: 'backupPolicyId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_list.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_list.rb new file mode 100644 index 0000000000..f390ff2240 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_list.rb @@ -0,0 +1,52 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + module Models + # + # The collection of volumes. + # + class VolumeList + + include MsRestAzure + + # @return [Array] The value. + attr_accessor :value + + + # + # Mapper for VolumeList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VolumeList', + type: { + name: 'Composite', + class_name: 'VolumeList', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VolumeElementType', + type: { + name: 'Composite', + class_name: 'Volume' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_status.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_status.rb new file mode 100644 index 0000000000..d48fba3519 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_status.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::ARM::StorSimple8000Series + module Models + # + # Defines values for VolumeStatus + # + module VolumeStatus + Online = "Online" + Offline = "Offline" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_type.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_type.rb new file mode 100644 index 0000000000..cab8bb67c8 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_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::ARM::StorSimple8000Series + module Models + # + # Defines values for VolumeType + # + module VolumeType + Tiered = "Tiered" + Archival = "Archival" + LocallyPinned = "LocallyPinned" + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/webproxy_settings.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/webproxy_settings.rb new file mode 100644 index 0000000000..835c63d650 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/models/webproxy_settings.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::ARM::StorSimple8000Series + module Models + # + # The web proxy settings on the device. + # + class WebproxySettings + + include MsRestAzure + + # @return [String] The connection URI. + attr_accessor :connection_uri + + # @return [AuthenticationType] The authentication type. Possible values + # include: 'Invalid', 'None', 'Basic', 'NTLM' + attr_accessor :authentication + + # @return [String] The webproxy username. + attr_accessor :username + + + # + # Mapper for WebproxySettings class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebproxySettings', + type: { + name: 'Composite', + class_name: 'WebproxySettings', + model_properties: { + connection_uri: { + required: false, + serialized_name: 'connectionUri', + type: { + name: 'String' + } + }, + authentication: { + required: true, + serialized_name: 'authentication', + type: { + name: 'Enum', + module: 'AuthenticationType' + } + }, + username: { + required: true, + serialized_name: 'username', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/module_definition.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/module_definition.rb new file mode 100644 index 0000000000..53530c3e64 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/module_definition.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 end +module Azure::ARM end +module Azure::ARM::StorSimple8000Series end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/operations.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/operations.rb new file mode 100644 index 0000000000..f837f74c67 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/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::ARM::StorSimple8000Series + # + # Operations + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Lists all of the available REST API operations of the Microsoft.Storsimple + # 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.Storsimple + # 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.Storsimple + # 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.StorSimple/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::AvailableProviderOperationList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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.Storsimple + # 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 [AvailableProviderOperationList] 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.Storsimple + # 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.Storsimple + # 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::ARM::StorSimple8000Series::Models::AvailableProviderOperationList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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.Storsimple + # provider + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AvailableProviderOperationList] 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_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/stor_simple8000series_management_client.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/stor_simple8000series_management_client.rb new file mode 100644 index 0000000000..96553d542b --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/stor_simple8000series_management_client.rb @@ -0,0 +1,189 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # A service client - single point of access to the REST API. + # + class StorSimple8000SeriesManagementClient < 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] The api version + attr_reader :api_version + + # @return [String] The subscription id + 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 [Operations] operations + attr_reader :operations + + # @return [Managers] managers + attr_reader :managers + + # @return [AccessControlRecords] access_control_records + attr_reader :access_control_records + + # @return [Alerts] alerts + attr_reader :alerts + + # @return [BandwidthSettings] bandwidth_settings + attr_reader :bandwidth_settings + + # @return [CloudAppliances] cloud_appliances + attr_reader :cloud_appliances + + # @return [Devices] devices + attr_reader :devices + + # @return [DeviceSettings] device_settings + attr_reader :device_settings + + # @return [BackupPolicies] backup_policies + attr_reader :backup_policies + + # @return [BackupSchedules] backup_schedules + attr_reader :backup_schedules + + # @return [Backups] backups + attr_reader :backups + + # @return [HardwareComponentGroups] hardware_component_groups + attr_reader :hardware_component_groups + + # @return [Jobs] jobs + attr_reader :jobs + + # @return [VolumeContainers] volume_containers + attr_reader :volume_containers + + # @return [Volumes] volumes + attr_reader :volumes + + # @return [StorageAccountCredentials] storage_account_credentials + attr_reader :storage_account_credentials + + # + # Creates initializes a new instance of the StorSimple8000SeriesManagementClient 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 + + @operations = Operations.new(self) + @managers = Managers.new(self) + @access_control_records = AccessControlRecords.new(self) + @alerts = Alerts.new(self) + @bandwidth_settings = BandwidthSettings.new(self) + @cloud_appliances = CloudAppliances.new(self) + @devices = Devices.new(self) + @device_settings = DeviceSettings.new(self) + @backup_policies = BackupPolicies.new(self) + @backup_schedules = BackupSchedules.new(self) + @backups = Backups.new(self) + @hardware_component_groups = HardwareComponentGroups.new(self) + @jobs = Jobs.new(self) + @volume_containers = VolumeContainers.new(self) + @volumes = Volumes.new(self) + @storage_account_credentials = StorageAccountCredentials.new(self) + @api_version = '2017-06-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_stor_simple8000_series' + if defined? Azure::ARM::StorSimple8000Series::VERSION + sdk_information = "#{sdk_information}/#{Azure::ARM::StorSimple8000Series::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb new file mode 100644 index 0000000000..eb98af1376 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb @@ -0,0 +1,507 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # StorageAccountCredentials + # + class StorageAccountCredentials + include MsRestAzure + + # + # Creates and initializes a new instance of the StorageAccountCredentials class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Gets all the storage account credentials in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountCredentialList] operation results. + # + def list_by_manager(resource_group_name, manager_name, custom_headers = nil) + response = list_by_manager_async(resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the storage account credentials in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_manager_with_http_info(resource_group_name, manager_name, custom_headers = nil) + list_by_manager_async(resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets all the storage account credentials in a manager. + # + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_manager_async(resource_group_name, manager_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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/storageAccountCredentials' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::StorageAccountCredentialList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified storage account credential name. + # + # @param storage_account_credential_name [String] The name of storage account + # credential to be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountCredential] operation results. + # + def get(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the properties of the specified storage account credential name. + # + # @param storage_account_credential_name [String] The name of storage account + # credential to be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + get_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the properties of the specified storage account credential name. + # + # @param storage_account_credential_name [String] The name of storage account + # credential to be fetched. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'storage_account_credential_name is nil' if storage_account_credential_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/storageAccountCredentials/{storageAccountCredentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'storageAccountCredentialName' => storage_account_credential_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::StorageAccountCredential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 storage account credential. + # + # @param storage_account_credential_name [String] The storage account + # credential name. + # @param parameters [StorageAccountCredential] The storage account credential + # to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountCredential] operation results. + # + def create_or_update(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param storage_account_credential_name [String] The storage account + # credential name. + # @param parameters [StorageAccountCredential] The storage account credential + # to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::StorageAccountCredential.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the storage account credential. + # + # @param storage_account_credential_name [String] The name of the storage + # account credential. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param storage_account_credential_name [String] The name of the storage + # account credential. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Creates or updates the storage account credential. + # + # @param storage_account_credential_name [String] The storage account + # credential name. + # @param parameters [StorageAccountCredential] The storage account credential + # to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountCredential] operation results. + # + def begin_create_or_update(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the storage account credential. + # + # @param storage_account_credential_name [String] The storage account + # credential name. + # @param parameters [StorageAccountCredential] The storage account credential + # to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the storage account credential. + # + # @param storage_account_credential_name [String] The storage account + # credential name. + # @param parameters [StorageAccountCredential] The storage account credential + # to be added or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(storage_account_credential_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'storage_account_credential_name is nil' if storage_account_credential_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::StorageAccountCredential.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.StorSimple/managers/{managerName}/storageAccountCredentials/{storageAccountCredentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'storageAccountCredentialName' => storage_account_credential_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::StorageAccountCredential.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 storage account credential. + # + # @param storage_account_credential_name [String] The name of the storage + # account credential. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the storage account credential. + # + # @param storage_account_credential_name [String] The name of the storage + # account credential. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the storage account credential. + # + # @param storage_account_credential_name [String] The name of the storage + # account credential. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(storage_account_credential_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'storage_account_credential_name is nil' if storage_account_credential_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/storageAccountCredentials/{storageAccountCredentialName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'storageAccountCredentialName' => storage_account_credential_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/version.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/version.rb new file mode 100644 index 0000000000..6ead68e0d9 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/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::ARM::StorSimple8000Series + VERSION = '0.14.0' +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/volume_containers.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/volume_containers.rb new file mode 100644 index 0000000000..872135b0e0 --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/volume_containers.rb @@ -0,0 +1,717 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # VolumeContainers + # + class VolumeContainers + include MsRestAzure + + # + # Creates and initializes a new instance of the VolumeContainers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Gets all the volume containers in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VolumeContainerList] operation results. + # + def list_by_device(device_name, resource_group_name, manager_name, custom_headers = nil) + response = list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the volume containers in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_device_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets all the volume containers in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_device_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainerList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified volume container name. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VolumeContainer] operation results. + # + def get(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the properties of the specified volume container name. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + get_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the properties of the specified volume container name. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param parameters [VolumeContainer] The volume container to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VolumeContainer] operation results. + # + def create_or_update(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param parameters [VolumeContainer] The volume container to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the metrics for the specified volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricList] operation results. + # + def list_metrics(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers = nil) + response = list_metrics_async(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metrics for the specified volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_metrics_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers = nil) + list_metrics_async(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Gets the metrics for the specified volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_metrics_async(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.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, 'manager_name is nil' if manager_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + + + request_headers = {} + + # Set Headers + request_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/metrics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 metric definitions for the specified volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricDefinitionList] operation results. + # + def list_metric_definition(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + response = list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metric definitions for the specified volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_metric_definition_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the metric definitions for the specified volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/metricsDefinitions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricDefinitionList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param parameters [VolumeContainer] The volume container to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VolumeContainer] operation results. + # + def begin_create_or_update(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param parameters [VolumeContainer] The volume container to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param parameters [VolumeContainer] The volume container to be added or + # updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The name of the volume container. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/volumes.rb b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/volumes.rb new file mode 100644 index 0000000000..ec085325bf --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/lib/generated/azure_mgmt_stor_simple8000_series/volumes.rb @@ -0,0 +1,835 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StorSimple8000Series + # + # Volumes + # + class Volumes + include MsRestAzure + + # + # Creates and initializes a new instance of the Volumes class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient + attr_reader :client + + # + # Retrieves all the volumes in a volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VolumeList] operation results. + # + def list_by_volume_container(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + response = list_by_volume_container_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the volumes in a volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_volume_container_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + list_by_volume_container_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Retrieves all the volumes in a volume container. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_volume_container_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/volumes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 properties of the specified volume name. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Volume] operation results. + # + def get(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + response = get_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the properties of the specified volume name. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + get_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Returns the properties of the specified volume name. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil? + fail ArgumentError, 'volume_name is nil' if volume_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/volumes/{volumeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'volumeName' => volume_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Volume.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param parameters [Volume] Volume to be created or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Volume] operation results. + # + def create_or_update(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = create_or_update_async(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param parameters [Volume] Volume to be created or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::StorSimple8000Series::Models::Volume.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + response = delete_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + # Send request + promise = begin_delete_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the metrics for the specified volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricList] operation results. + # + def list_metrics(device_name, volume_container_name, volume_name, resource_group_name, manager_name, filter, custom_headers = nil) + response = list_metrics_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, filter, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metrics for the specified volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param custom_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_metrics_with_http_info(device_name, volume_container_name, volume_name, resource_group_name, manager_name, filter, custom_headers = nil) + list_metrics_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, filter, custom_headers).value! + end + + # + # Gets the metrics for the specified volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param filter [String] OData Filter options + # @param [Hash{String => String}] 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_metrics_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, filter, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil? + fail ArgumentError, 'volume_name is nil' if volume_name.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, 'manager_name is nil' if manager_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'filter is nil' if filter.nil? + + + request_headers = {} + + # Set Headers + request_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/volumes/{volumeName}/metrics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'volumeName' => volume_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + query_params: {'$filter' => filter}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 metric definitions for the specified volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MetricDefinitionList] operation results. + # + def list_metric_definition(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + response = list_metric_definition_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the metric definitions for the specified volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_metric_definition_with_http_info(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + list_metric_definition_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Gets the metric definitions for the specified volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_metric_definition_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil? + fail ArgumentError, 'volume_name is nil' if volume_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/volumes/{volumeName}/metricsDefinitions' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'volumeName' => volume_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricDefinitionList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Retrieves all the volumes in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VolumeList] operation results. + # + def list_by_device(device_name, resource_group_name, manager_name, custom_headers = nil) + response = list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Retrieves all the volumes in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_device_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil) + list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Retrieves all the volumes in a device. + # + # @param device_name [String] The device name + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_device_async(device_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param parameters [Volume] Volume to be created or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Volume] operation results. + # + def begin_create_or_update(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers = nil) + response = begin_create_or_update_async(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates the volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param parameters [Volume] Volume to be created or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers = nil) + begin_create_or_update_async(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers).value! + end + + # + # Creates or updates the volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param parameters [Volume] Volume to be created or updated. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(device_name, volume_container_name, volume_name, parameters, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil? + fail ArgumentError, 'volume_name is nil' if volume_name.nil? + fail ArgumentError, 'parameters is nil' if parameters.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, 'manager_name is nil' if manager_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? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::StorSimple8000Series::Models::Volume.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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/volumes/{volumeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'volumeName' => volume_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::StorSimple8000Series::Models::Volume.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + response = begin_delete_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers).value! + nil + end + + # + # Deletes the volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + begin_delete_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers).value! + end + + # + # Deletes the volume. + # + # @param device_name [String] The device name + # @param volume_container_name [String] The volume container name. + # @param volume_name [String] The volume name. + # @param resource_group_name [String] The resource group name + # @param manager_name [String] The manager name + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(device_name, volume_container_name, volume_name, resource_group_name, manager_name, custom_headers = nil) + fail ArgumentError, 'device_name is nil' if device_name.nil? + fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil? + fail ArgumentError, 'volume_name is nil' if volume_name.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, 'manager_name is nil' if manager_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.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/volumes/{volumeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'volumeName' => volume_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name}, + skip_encoding_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 == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_stor_simple8000_series/spec/spec_helper.rb b/management/azure_mgmt_stor_simple8000_series/spec/spec_helper.rb new file mode 100644 index 0000000000..069c2dde5c --- /dev/null +++ b/management/azure_mgmt_stor_simple8000_series/spec/spec_helper.rb @@ -0,0 +1,6 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'dotenv' +Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env')) diff --git a/management/azure_mgmt_storage/azure_mgmt_storage.gemspec b/management/azure_mgmt_storage/azure_mgmt_storage.gemspec index cc9c1b068c..86ac2fa4cd 100644 --- a/management/azure_mgmt_storage/azure_mgmt_storage.gemspec +++ b/management/azure_mgmt_storage/azure_mgmt_storage.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage.rb old mode 100755 new mode 100644 index 7132f20280..2abb78c4be --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -21,19 +21,23 @@ module Azure::ARM::Storage autoload :Operations, 'generated/azure_mgmt_storage/operations.rb' + autoload :Skus, 'generated/azure_mgmt_storage/skus.rb' autoload :StorageAccounts, 'generated/azure_mgmt_storage/storage_accounts.rb' autoload :UsageOperations, 'generated/azure_mgmt_storage/usage_operations.rb' autoload :StorageManagementClient, 'generated/azure_mgmt_storage/storage_management_client.rb' module Models + autoload :IPRule, 'generated/azure_mgmt_storage/models/iprule.rb' + autoload :NetworkRuleSet, 'generated/azure_mgmt_storage/models/network_rule_set.rb' + autoload :Dimension, 'generated/azure_mgmt_storage/models/dimension.rb' autoload :Identity, 'generated/azure_mgmt_storage/models/identity.rb' - autoload :OperationDisplay, 'generated/azure_mgmt_storage/models/operation_display.rb' + autoload :ServiceSpecification, 'generated/azure_mgmt_storage/models/service_specification.rb' autoload :StorageAccountCreateParameters, 'generated/azure_mgmt_storage/models/storage_account_create_parameters.rb' - autoload :MetricSpecification, 'generated/azure_mgmt_storage/models/metric_specification.rb' - autoload :Endpoints, 'generated/azure_mgmt_storage/models/endpoints.rb' - autoload :Operation, 'generated/azure_mgmt_storage/models/operation.rb' autoload :OperationListResult, 'generated/azure_mgmt_storage/models/operation_list_result.rb' - autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_storage/models/check_name_availability_result.rb' + autoload :Endpoints, 'generated/azure_mgmt_storage/models/endpoints.rb' + autoload :SKUCapability, 'generated/azure_mgmt_storage/models/skucapability.rb' + autoload :Restriction, 'generated/azure_mgmt_storage/models/restriction.rb' + autoload :StorageSkuListResult, 'generated/azure_mgmt_storage/models/storage_sku_list_result.rb' autoload :StorageAccountKey, 'generated/azure_mgmt_storage/models/storage_account_key.rb' autoload :CustomDomain, 'generated/azure_mgmt_storage/models/custom_domain.rb' autoload :StorageAccountListResult, 'generated/azure_mgmt_storage/models/storage_account_list_result.rb' @@ -41,34 +45,36 @@ module Models autoload :StorageAccountListKeysResult, 'generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb' autoload :Encryption, 'generated/azure_mgmt_storage/models/encryption.rb' autoload :StorageAccountRegenerateKeyParameters, 'generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb' - autoload :IPRule, 'generated/azure_mgmt_storage/models/iprule.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_storage/models/operation_display.rb' autoload :StorageAccountUpdateParameters, 'generated/azure_mgmt_storage/models/storage_account_update_parameters.rb' - autoload :Dimension, 'generated/azure_mgmt_storage/models/dimension.rb' + autoload :Operation, 'generated/azure_mgmt_storage/models/operation.rb' autoload :UsageName, 'generated/azure_mgmt_storage/models/usage_name.rb' - autoload :StorageAccountCheckNameAvailabilityParameters, 'generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb' + autoload :Sku, 'generated/azure_mgmt_storage/models/sku.rb' autoload :Usage, 'generated/azure_mgmt_storage/models/usage.rb' autoload :EncryptionService, 'generated/azure_mgmt_storage/models/encryption_service.rb' autoload :UsageListResult, 'generated/azure_mgmt_storage/models/usage_list_result.rb' autoload :VirtualNetworkRule, 'generated/azure_mgmt_storage/models/virtual_network_rule.rb' - autoload :ServiceSpecification, 'generated/azure_mgmt_storage/models/service_specification.rb' + autoload :Resource, 'generated/azure_mgmt_storage/models/resource.rb' + autoload :StorageAccountCheckNameAvailabilityParameters, 'generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb' autoload :AccountSasParameters, 'generated/azure_mgmt_storage/models/account_sas_parameters.rb' autoload :KeyVaultProperties, 'generated/azure_mgmt_storage/models/key_vault_properties.rb' autoload :ListAccountSasResponse, 'generated/azure_mgmt_storage/models/list_account_sas_response.rb' - autoload :Sku, 'generated/azure_mgmt_storage/models/sku.rb' + autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_storage/models/check_name_availability_result.rb' autoload :ServiceSasParameters, 'generated/azure_mgmt_storage/models/service_sas_parameters.rb' - autoload :StorageNetworkAcls, 'generated/azure_mgmt_storage/models/storage_network_acls.rb' + autoload :MetricSpecification, 'generated/azure_mgmt_storage/models/metric_specification.rb' autoload :ListServiceSasResponse, 'generated/azure_mgmt_storage/models/list_service_sas_response.rb' autoload :StorageAccount, 'generated/azure_mgmt_storage/models/storage_account.rb' - autoload :Reason, 'generated/azure_mgmt_storage/models/reason.rb' + autoload :ReasonCode, 'generated/azure_mgmt_storage/models/reason_code.rb' autoload :SkuName, 'generated/azure_mgmt_storage/models/sku_name.rb' autoload :SkuTier, 'generated/azure_mgmt_storage/models/sku_tier.rb' + autoload :Kind, 'generated/azure_mgmt_storage/models/kind.rb' + autoload :Reason, 'generated/azure_mgmt_storage/models/reason.rb' autoload :KeySource, 'generated/azure_mgmt_storage/models/key_source.rb' autoload :Action, 'generated/azure_mgmt_storage/models/action.rb' autoload :State, 'generated/azure_mgmt_storage/models/state.rb' autoload :Bypass, 'generated/azure_mgmt_storage/models/bypass.rb' autoload :DefaultAction, 'generated/azure_mgmt_storage/models/default_action.rb' autoload :AccessTier, 'generated/azure_mgmt_storage/models/access_tier.rb' - autoload :Kind, 'generated/azure_mgmt_storage/models/kind.rb' autoload :ProvisioningState, 'generated/azure_mgmt_storage/models/provisioning_state.rb' autoload :AccountStatus, 'generated/azure_mgmt_storage/models/account_status.rb' autoload :KeyPermission, 'generated/azure_mgmt_storage/models/key_permission.rb' diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/access_tier.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/access_tier.rb old mode 100755 new mode 100644 index edb75da367..76b9206387 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/access_tier.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/access_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_sas_parameters.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_sas_parameters.rb old mode 100755 new mode 100644 index 03420da012..1f235c5862 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_sas_parameters.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_sas_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AccountSasParameters include MsRestAzure - include MsRest::JSONable # @return [Services] The signed services accessible with the account SAS. # Possible values include: Blob (b), Queue (q), Table (t), File (f). # Possible values include: 'b', 'q', 't', 'f' diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_status.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_status.rb old mode 100755 new mode 100644 index 4b379c7888..5890c313f7 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_status.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/account_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/action.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/action.rb index a82e3e2165..6768ab99c5 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/action.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/bypass.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/bypass.rb index c0abfbdd1b..f0b1607964 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/bypass.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/bypass.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/check_name_availability_result.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/check_name_availability_result.rb old mode 100755 new mode 100644 index b17dd2bbe3..3829e0ae37 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/check_name_availability_result.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/check_name_availability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckNameAvailabilityResult include MsRestAzure - include MsRest::JSONable # @return [Boolean] Gets a boolean value that indicates whether the name # is available for you to use. If true, the name is available. If false, # the name has already been taken or is invalid and cannot be used. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/custom_domain.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/custom_domain.rb old mode 100755 new mode 100644 index d6f151dd6d..e687a284d7 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/custom_domain.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/custom_domain.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CustomDomain include MsRestAzure - include MsRest::JSONable # @return [String] Gets or sets the custom domain name assigned to the # storage account. Name is the CNAME source. attr_accessor :name diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/default_action.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/default_action.rb index b54636489f..a321c73c9b 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/default_action.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/default_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/dimension.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/dimension.rb index 8d215cb92b..2c59115c62 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/dimension.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/dimension.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Storage module Models # - # Dimensions. + # Dimension of blobs, possiblly be blob type or access tier. # class Dimension include MsRestAzure - include MsRest::JSONable # @return [String] Display name of dimension. attr_accessor :name diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption.rb old mode 100755 new mode 100644 index 1f585edd05..148946b5d8 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Encryption include MsRestAzure - include MsRest::JSONable # @return [EncryptionServices] List of services which support encryption. attr_accessor :services diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_service.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_service.rb old mode 100755 new mode 100644 index 1a7531b7ba..60b9e2ee2d --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_service.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_service.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EncryptionService include MsRestAzure - include MsRest::JSONable # @return [Boolean] A boolean indicating whether or not the service # encrypts the data as it is stored. attr_accessor :enabled diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_services.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_services.rb old mode 100755 new mode 100644 index aceecf1cdf..0db7e2ea08 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_services.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/encryption_services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EncryptionServices include MsRestAzure - include MsRest::JSONable # @return [EncryptionService] The encryption function of the blob storage # service. attr_accessor :blob diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/endpoints.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/endpoints.rb old mode 100755 new mode 100644 index 61d1c93913..21245d1496 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/endpoints.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/endpoints.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Endpoints include MsRestAzure - include MsRest::JSONable # @return [String] Gets the blob endpoint. attr_accessor :blob diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/http_protocol.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/http_protocol.rb old mode 100755 new mode 100644 index b3f471bbf6..0ea8a7e6a2 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/http_protocol.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/http_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/identity.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/identity.rb index c33f641263..81d9c3f72d 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/identity.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/identity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Identity include MsRestAzure - include MsRest::JSONable # @return [String] The principal ID of resource identity. attr_accessor :principal_id diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/iprule.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/iprule.rb index ef4479a6c2..0213203405 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/iprule.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/iprule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IPRule include MsRestAzure - include MsRest::JSONable # @return [String] Specifies the IP or IP range in CIDR format. Only IPV4 # address is allowed. attr_accessor :ipaddress_or_range diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_permission.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_permission.rb old mode 100755 new mode 100644 index 50af05abd0..cd3e0216a0 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_permission.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_permission.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_source.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_source.rb index c08a4d9bed..b4f9bee31a 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_source.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_vault_properties.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_vault_properties.rb index 336d25c035..4c6c7d4498 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_vault_properties.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/key_vault_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class KeyVaultProperties include MsRestAzure - include MsRest::JSONable # @return [String] The name of KeyVault key. attr_accessor :key_name diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/kind.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/kind.rb old mode 100755 new mode 100644 index 9d02eeb3b2..97bde6cc2a --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/kind.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/kind.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_account_sas_response.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_account_sas_response.rb old mode 100755 new mode 100644 index 968332a7f5..d97b8baf31 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_account_sas_response.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_account_sas_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ListAccountSasResponse include MsRestAzure - include MsRest::JSONable # @return [String] List SAS credentials of storage account. attr_accessor :account_sas_token diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_service_sas_response.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_service_sas_response.rb old mode 100755 new mode 100644 index 4da9b898f9..f4c252b8e4 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_service_sas_response.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/list_service_sas_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ListServiceSasResponse include MsRestAzure - include MsRest::JSONable # @return [String] List service SAS credentials of speicific resource. attr_accessor :service_sas_token diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/metric_specification.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/metric_specification.rb index 10b0662548..656b8edec1 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/metric_specification.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/metric_specification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricSpecification include MsRestAzure - include MsRest::JSONable # @return [String] Name of metric specification. attr_accessor :name @@ -25,7 +24,8 @@ class MetricSpecification # @return [String] Unit could be Bytes or Count. attr_accessor :unit - # @return [Array] Dimensions. + # @return [Array] Dimensions of blobs, including blob type and + # access tier. attr_accessor :dimensions # @return [String] Aggregation type could be Average. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_network_acls.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/network_rule_set.rb similarity index 90% rename from management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_network_acls.rb rename to management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/network_rule_set.rb index e531955538..bbb60d4dcc 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_network_acls.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/network_rule_set.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Storage module Models # - # Network ACL + # Network rule set # - class StorageNetworkAcls + class NetworkRuleSet include MsRestAzure - include MsRest::JSONable # @return [Bypass] Specifies whether traffic is bypassed for # Logging/Metrics/AzureServices. Possible values are any combination of # Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or @@ -20,7 +19,7 @@ class StorageNetworkAcls # 'Logging', 'Metrics', 'AzureServices'. Default value: 'AzureServices' . attr_accessor :bypass - # @return [Array] Sets the virtual network ACL rules + # @return [Array] Sets the virtual network rules attr_accessor :virtual_network_rules # @return [Array] Sets the IP ACL rules @@ -33,16 +32,16 @@ class StorageNetworkAcls # - # Mapper for StorageNetworkAcls class as Ruby Hash. + # Mapper for NetworkRuleSet class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'StorageNetworkAcls', + serialized_name: 'NetworkRuleSet', type: { name: 'Composite', - class_name: 'StorageNetworkAcls', + class_name: 'NetworkRuleSet', model_properties: { bypass: { required: false, diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation.rb index ee4074ef18..4c1e733796 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] Operation name: {provider}/{resource}/{operation} attr_accessor :name diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_display.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_display.rb index 5f2e2182e6..a17f9e7251 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_display.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable # @return [String] Service provider: Microsoft Storage. attr_accessor :provider diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_list_result.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_list_result.rb index d91e1667d1..5e50e68984 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_list_result.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/operation_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class OperationListResult include MsRestAzure - include MsRest::JSONable # @return [Array] List of Storage operations supported by the # Storage resource provider. attr_accessor :value diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/permissions.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/permissions.rb index ec51bf668e..010750acd3 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/permissions.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/permissions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/provisioning_state.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/provisioning_state.rb old mode 100755 new mode 100644 index 5c807bdcee..f9c8a7a4ba --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/provisioning_state.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/reason.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/reason.rb old mode 100755 new mode 100644 index 4741b9d6cd..4743c3241d --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/reason.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/reason.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/reason_code.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/reason_code.rb new file mode 100644 index 0000000000..f67fc397a9 --- /dev/null +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/reason_code.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::ARM::Storage + module Models + # + # Defines values for ReasonCode + # + module ReasonCode + QuotaId = "QuotaId" + NotAvailableForSubscription = "NotAvailableForSubscription" + end + end +end diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/resource.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/resource.rb new file mode 100644 index 0000000000..afec722d44 --- /dev/null +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/resource.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::ARM::Storage + module Models + # + # Describes a storage resource. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location + attr_accessor :location + + # @return [Hash{String => String}] Tags assigned to a resource; can be + # used for viewing and grouping a resource (across resource groups). + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/restriction.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/restriction.rb new file mode 100644 index 0000000000..38a2a51ba1 --- /dev/null +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/restriction.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::ARM::Storage + module Models + # + # The restriction because of which SKU cannot be used. + # + class Restriction + + include MsRestAzure + + # @return [String] The type of restrictions. As of now only possible + # value for this is location. + attr_accessor :type + + # @return [Array] The value of restrictions. If the restriction + # type is set to location. This would be different locations where the + # SKU is restricted. + attr_accessor :values + + # @return [ReasonCode] The reason for the restriction. As of now this can + # be “QuotaId” or “NotAvailableForSubscription”. Quota Id is set when the + # SKU has requiredQuotas parameter as the subscription does not belong to + # that quota. The “NotAvailableForSubscription” is related to capacity at + # DC. Possible values include: 'QuotaId', 'NotAvailableForSubscription' + attr_accessor :reason_code + + + # + # Mapper for Restriction class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Restriction', + type: { + name: 'Composite', + class_name: 'Restriction', + model_properties: { + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + values: { + required: false, + read_only: true, + serialized_name: 'values', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + reason_code: { + required: false, + serialized_name: 'reasonCode', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_sas_parameters.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_sas_parameters.rb old mode 100755 new mode 100644 index 87fa3497bf..aeb3519bda --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_sas_parameters.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_sas_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServiceSasParameters include MsRestAzure - include MsRest::JSONable # @return [String] The canonical path to the signed resource. attr_accessor :canonicalized_resource diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_specification.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_specification.rb index b0dc880790..1a7061ab40 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_specification.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/service_specification.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ServiceSpecification include MsRestAzure - include MsRest::JSONable # @return [Array] Metric specifications of # operation. attr_accessor :metric_specifications diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/services.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/services.rb index 073fa62503..d23c0f49c6 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/services.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/services.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource.rb index e00debaf6d..535e77c4f7 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource_types.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource_types.rb index d92415ad73..53138c164d 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource_types.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/signed_resource_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku.rb old mode 100755 new mode 100644 index 4e566cc22e..832bb51993 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] Gets or sets the sku name. Required for account # creation; optional for update. Note that in older versions, sku name # was called accountType. Possible values include: 'Standard_LRS', @@ -23,6 +22,28 @@ class Sku # Possible values include: 'Standard', 'Premium' attr_accessor :tier + # @return [String] The type of the resource, usually it is + # 'storageAccounts'. + attr_accessor :resource_type + + # @return [Kind] Indicates the type of storage account. Possible values + # include: 'Storage', 'BlobStorage' + attr_accessor :kind + + # @return [Array] The set of locations that the SKU is available. + # This will be supported and registered Azure Geo Regions (e.g. West US, + # East US, Southeast Asia, etc.). + attr_accessor :locations + + # @return [Array] The capability information in the + # specified sku, including file encryption, network acls, change + # notification, etc. + attr_accessor :capabilities + + # @return [Array] The restrictions because of which SKU + # cannot be used. This is empty if there are no restrictions. + attr_accessor :restrictions + # # Mapper for Sku class as Ruby Hash. @@ -52,6 +73,69 @@ def self.mapper() name: 'Enum', module: 'SkuTier' } + }, + resource_type: { + required: false, + read_only: true, + serialized_name: 'resourceType', + type: { + name: 'String' + } + }, + kind: { + required: false, + read_only: true, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + locations: { + required: false, + read_only: true, + serialized_name: 'locations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + capabilities: { + required: false, + read_only: true, + serialized_name: 'capabilities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SKUCapabilityElementType', + type: { + name: 'Composite', + class_name: 'SKUCapability' + } + } + } + }, + restrictions: { + required: false, + serialized_name: 'restrictions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'RestrictionElementType', + type: { + name: 'Composite', + class_name: 'Restriction' + } + } + } } } } diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_name.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_name.rb old mode 100755 new mode 100644 index f25f360833..d8d0be5403 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_name.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_tier.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_tier.rb old mode 100755 new mode 100644 index 9f98cf4325..163c1f90d8 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_tier.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/sku_tier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/skucapability.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/skucapability.rb new file mode 100644 index 0000000000..f0fb7f2b24 --- /dev/null +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/skucapability.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::ARM::Storage + module Models + # + # The capability information in the specified sku, including file + # encryption, network acls, change notification, etc. + # + class SKUCapability + + include MsRestAzure + + # @return [String] The name of capability, The capability information in + # the specified sku, including file encryption, network acls, change + # notification, etc. + attr_accessor :name + + # @return [String] A string value to indicate states of given capability. + # Possibly 'true' or 'false'. + attr_accessor :value + + + # + # Mapper for SKUCapability class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SKUCapability', + type: { + name: 'Composite', + class_name: 'SKUCapability', + model_properties: { + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/state.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/state.rb index bdaace9af9..b122fd479f 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/state.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account.rb old mode 100755 new mode 100644 index 217b4e4f16..bb83b7bca0 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The storage account. # - class StorageAccount < MsRestAzure::Resource + class StorageAccount < Resource include MsRestAzure - include MsRest::JSONable # @return [Sku] Gets the SKU. attr_accessor :sku @@ -86,8 +85,8 @@ class StorageAccount < MsRestAzure::Resource # to true. Default value: false . attr_accessor :enable_https_traffic_only - # @return [StorageNetworkAcls] Network ACL - attr_accessor :network_acls + # @return [NetworkRuleSet] Network rule set + attr_accessor :network_rule_set # @@ -285,13 +284,13 @@ def self.mapper() name: 'Boolean' } }, - network_acls: { + network_rule_set: { required: false, read_only: true, serialized_name: 'properties.networkAcls', type: { name: 'Composite', - class_name: 'StorageNetworkAcls' + class_name: 'NetworkRuleSet' } } } diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb old mode 100755 new mode 100644 index e426f0f696..cee8d62e93 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccountCheckNameAvailabilityParameters include MsRestAzure - include MsRest::JSONable # @return [String] The storage account name. attr_accessor :name diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb old mode 100755 new mode 100644 index b4826a23ce..acfc5ff7ba --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccountCreateParameters include MsRestAzure - include MsRest::JSONable # @return [Sku] Required. Gets or sets the sku name. attr_accessor :sku @@ -49,8 +48,8 @@ class StorageAccountCreateParameters # same. The default setting is unencrypted. attr_accessor :encryption - # @return [StorageNetworkAcls] Network ACL - attr_accessor :network_acls + # @return [NetworkRuleSet] Network rule set + attr_accessor :network_rule_set # @return [AccessTier] Required for storage accounts where kind = # BlobStorage. The access tier used for billing. Possible values include: @@ -135,12 +134,12 @@ def self.mapper() class_name: 'Encryption' } }, - network_acls: { + network_rule_set: { required: false, serialized_name: 'properties.networkAcls', type: { name: 'Composite', - class_name: 'StorageNetworkAcls' + class_name: 'NetworkRuleSet' } }, access_tier: { diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_key.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_key.rb old mode 100755 new mode 100644 index f8997d9d94..d0ab1d0953 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_key.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccountKey include MsRestAzure - include MsRest::JSONable # @return [String] Name of the key. attr_accessor :key_name diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb old mode 100755 new mode 100644 index c50375beda..079f884d7b --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccountListKeysResult include MsRestAzure - include MsRest::JSONable # @return [Array] Gets the list of storage account # keys and their properties for the specified storage account. attr_accessor :keys diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_result.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_result.rb old mode 100755 new mode 100644 index 1bbdf43bbb..e23b8f6e69 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_result.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccountListResult include MsRestAzure - include MsRest::JSONable # @return [Array] Gets the list of storage accounts and # their properties. attr_accessor :value diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb old mode 100755 new mode 100644 index eb6c60b9e4..ea6ab6db75 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccountRegenerateKeyParameters include MsRestAzure - include MsRest::JSONable # @return [String] The name of storage keys that want to be regenerated, # possible vaules are key1, key2. attr_accessor :key_name diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb old mode 100755 new mode 100644 index f6e5f0d13c..ac14958d2e --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class StorageAccountUpdateParameters include MsRestAzure - include MsRest::JSONable # @return [Sku] Gets or sets the SKU name. Note that the SKU name cannot # be updated to Standard_ZRS or Premium_LRS, nor can accounts of those # sku names be updated to any other value. @@ -49,8 +48,8 @@ class StorageAccountUpdateParameters # to true. Default value: false . attr_accessor :enable_https_traffic_only - # @return [StorageNetworkAcls] Network ACL - attr_accessor :network_acls + # @return [NetworkRuleSet] Network rule set + attr_accessor :network_rule_set # @@ -127,12 +126,12 @@ def self.mapper() name: 'Boolean' } }, - network_acls: { + network_rule_set: { required: false, serialized_name: 'properties.networkAcls', type: { name: 'Composite', - class_name: 'StorageNetworkAcls' + class_name: 'NetworkRuleSet' } } } diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_sku_list_result.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_sku_list_result.rb new file mode 100644 index 0000000000..4a12e68bd8 --- /dev/null +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/storage_sku_list_result.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::ARM::Storage + module Models + # + # The response from the List Storage SKUs operation. + # + class StorageSkuListResult + + include MsRestAzure + + # @return [Array] Get the list result of storage SKUs and their + # properties. + attr_accessor :value + + + # + # Mapper for StorageSkuListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'StorageSkuListResult', + type: { + name: 'Composite', + class_name: 'StorageSkuListResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SkuElementType', + type: { + name: 'Composite', + class_name: 'Sku' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage.rb old mode 100755 new mode 100644 index 8c95615d3f..2896884cc4 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Usage include MsRestAzure - include MsRest::JSONable # @return [UsageUnit] Gets the unit of measurement. Possible values # include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', # 'BytesPerSecond' diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_list_result.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_list_result.rb old mode 100755 new mode 100644 index b2b205f08d..48fe9ab1d0 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_list_result.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UsageListResult include MsRestAzure - include MsRest::JSONable # @return [Array] Gets or sets the list of Storage Resource # Usages. attr_accessor :value diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_name.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_name.rb old mode 100755 new mode 100644 index 06bc9520a0..bb011098c0 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_name.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class UsageName include MsRestAzure - include MsRest::JSONable # @return [String] Gets a string describing the resource name. attr_accessor :value diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_unit.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_unit.rb old mode 100755 new mode 100644 index 9989d9e22c..3789442b7d --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_unit.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/usage_unit.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/virtual_network_rule.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/virtual_network_rule.rb index c51e300e29..b67f80187f 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/virtual_network_rule.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/models/virtual_network_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,17 +12,17 @@ class VirtualNetworkRule include MsRestAzure - include MsRest::JSONable - # @return [String] A URL of vnet, subnet, classicVnet or classicSubnet. + # @return [String] Resource ID of a subnet, for example: + # /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. attr_accessor :virtual_network_resource_id - # @return [Action] The action of virtual network ACL rule. Possible - # values include: 'Allow'. Default value: 'Allow' . + # @return [Action] The action of virtual network rule. Possible values + # include: 'Allow'. Default value: 'Allow' . attr_accessor :action - # @return [State] Gets the state of virtual network ACL rule. Possible - # values include: 'provisioning', 'deprovisioning', 'succeeded', - # 'failed', 'networkSourceDeleted' + # @return [State] Gets the state of virtual network rule. Possible values + # include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + # 'networkSourceDeleted' attr_accessor :state diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/module_definition.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/module_definition.rb old mode 100755 new mode 100644 index 8d0193523a..39ad901788 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/module_definition.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/operations.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/operations.rb index 3c3f02f6be..5338ef3a19 100644 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/operations.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/skus.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/skus.rb new file mode 100644 index 0000000000..0e546852be --- /dev/null +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/skus.rb @@ -0,0 +1,111 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Storage + # + # The Azure Storage Management API. + # + class Skus + include MsRestAzure + + # + # Creates and initializes a new instance of the Skus class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorageManagementClient] reference to the StorageManagementClient + attr_reader :client + + # + # Lists the available SKUs supported by Microsoft.Storage for given + # subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageSkuListResult] operation results. + # + def list(custom_headers = nil) + response = list_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the available SKUs supported by Microsoft.Storage for given + # 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 the available SKUs supported by Microsoft.Storage for given + # 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.Storage/skus' + + 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::ARM::Storage::Models::StorageSkuListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_storage/lib/generated/azure_mgmt_storage/storage_accounts.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/storage_accounts.rb old mode 100755 new mode 100644 index db43823667..acf5360d97 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/storage_accounts.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/storage_accounts.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/storage_management_client.rb old mode 100755 new mode 100644 index d7cb07871e..7b36f7d0ae --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/storage_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -39,6 +39,9 @@ class StorageManagementClient < MsRestAzure::AzureServiceClient # @return [Operations] operations attr_reader :operations + # @return [Skus] skus + attr_reader :skus + # @return [StorageAccounts] storage_accounts attr_reader :storage_accounts @@ -59,6 +62,7 @@ def initialize(credentials = nil, base_url = nil, options = nil) @credentials = credentials @operations = Operations.new(self) + @skus = Skus.new(self) @storage_accounts = StorageAccounts.new(self) @usage_operations = UsageOperations.new(self) @api_version = '2017-06-01' diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/usage_operations.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/usage_operations.rb old mode 100755 new mode 100644 index e2558c1950..9f9c8de8d3 --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/usage_operations.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/usage_operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/version.rb b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/version.rb old mode 100755 new mode 100644 index aaf9af951d..4539558abf --- a/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/version.rb +++ b/management/azure_mgmt_storage/lib/generated/azure_mgmt_storage/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Storage - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_stream_analytics/azure_mgmt_stream_analytics.gemspec b/management/azure_mgmt_stream_analytics/azure_mgmt_stream_analytics.gemspec index eddbf0f03e..d1d055d94f 100644 --- a/management/azure_mgmt_stream_analytics/azure_mgmt_stream_analytics.gemspec +++ b/management/azure_mgmt_stream_analytics/azure_mgmt_stream_analytics.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics.rb index 6f7cb75aa4..5cbc1f28a6 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -30,38 +30,40 @@ module Azure::ARM::StreamAnalytics autoload :StreamAnalyticsManagementClient, 'generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb' module Models - autoload :SubResource, 'generated/azure_mgmt_stream_analytics/models/sub_resource.rb' autoload :AzureMachineLearningWebServiceInputColumn, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb' - autoload :Operation, 'generated/azure_mgmt_stream_analytics/models/operation.rb' + autoload :OperationDisplay, 'generated/azure_mgmt_stream_analytics/models/operation_display.rb' autoload :AzureMachineLearningWebServiceInputs, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb' - autoload :Sku, 'generated/azure_mgmt_stream_analytics/models/sku.rb' + autoload :OperationListResult, 'generated/azure_mgmt_stream_analytics/models/operation_list_result.rb' autoload :StorageAccount, 'generated/azure_mgmt_stream_analytics/models/storage_account.rb' - autoload :DiagnosticCondition, 'generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb' + autoload :Serialization, 'generated/azure_mgmt_stream_analytics/models/serialization.rb' autoload :FunctionBinding, 'generated/azure_mgmt_stream_analytics/models/function_binding.rb' - autoload :InputProperties, 'generated/azure_mgmt_stream_analytics/models/input_properties.rb' - autoload :FunctionOutput, 'generated/azure_mgmt_stream_analytics/models/function_output.rb' autoload :Diagnostics, 'generated/azure_mgmt_stream_analytics/models/diagnostics.rb' + autoload :FunctionOutput, 'generated/azure_mgmt_stream_analytics/models/function_output.rb' + autoload :Sku, 'generated/azure_mgmt_stream_analytics/models/sku.rb' + autoload :DiagnosticCondition, 'generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb' autoload :OutputDataSource, 'generated/azure_mgmt_stream_analytics/models/output_data_source.rb' - autoload :AzureSqlDatabaseDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb' - autoload :OutputListResult, 'generated/azure_mgmt_stream_analytics/models/output_list_result.rb' - autoload :InputListResult, 'generated/azure_mgmt_stream_analytics/models/input_list_result.rb' - autoload :ServiceBusDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb' - autoload :StreamingJobListResult, 'generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb' + autoload :InputProperties, 'generated/azure_mgmt_stream_analytics/models/input_properties.rb' + autoload :FunctionProperties, 'generated/azure_mgmt_stream_analytics/models/function_properties.rb' + autoload :FunctionListResult, 'generated/azure_mgmt_stream_analytics/models/function_list_result.rb' + autoload :ResourceTestStatus, 'generated/azure_mgmt_stream_analytics/models/resource_test_status.rb' autoload :FunctionInput, 'generated/azure_mgmt_stream_analytics/models/function_input.rb' + autoload :StartStreamingJobParameters, 'generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb' autoload :BlobDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb' - autoload :AzureMachineLearningWebServiceOutputColumn, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb' + autoload :OutputListResult, 'generated/azure_mgmt_stream_analytics/models/output_list_result.rb' autoload :ReferenceInputDataSource, 'generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb' - autoload :Serialization, 'generated/azure_mgmt_stream_analytics/models/serialization.rb' - autoload :StreamInputDataSource, 'generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb' + autoload :Operation, 'generated/azure_mgmt_stream_analytics/models/operation.rb' + autoload :AzureSqlDatabaseDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb' autoload :ErrorResponse, 'generated/azure_mgmt_stream_analytics/models/error_response.rb' autoload :FunctionRetrieveDefaultDefinitionParameters, 'generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb' - autoload :ResourceTestStatus, 'generated/azure_mgmt_stream_analytics/models/resource_test_status.rb' - autoload :OperationDisplay, 'generated/azure_mgmt_stream_analytics/models/operation_display.rb' - autoload :FunctionProperties, 'generated/azure_mgmt_stream_analytics/models/function_properties.rb' - autoload :OperationListResult, 'generated/azure_mgmt_stream_analytics/models/operation_list_result.rb' + autoload :StreamingJobListResult, 'generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb' + autoload :SubResource, 'generated/azure_mgmt_stream_analytics/models/sub_resource.rb' + autoload :AzureMachineLearningWebServiceOutputColumn, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb' + autoload :StreamInputDataSource, 'generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb' + autoload :ServiceBusDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb' + autoload :InputListResult, 'generated/azure_mgmt_stream_analytics/models/input_list_result.rb' autoload :SubscriptionQuotasListResult, 'generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb' - autoload :StartStreamingJobParameters, 'generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb' - autoload :FunctionListResult, 'generated/azure_mgmt_stream_analytics/models/function_list_result.rb' + autoload :Resource, 'generated/azure_mgmt_stream_analytics/models/resource.rb' + autoload :OAuthBasedDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/oauth_based_data_source_properties.rb' autoload :Input, 'generated/azure_mgmt_stream_analytics/models/input.rb' autoload :Transformation, 'generated/azure_mgmt_stream_analytics/models/transformation.rb' autoload :Output, 'generated/azure_mgmt_stream_analytics/models/output.rb' @@ -75,6 +77,8 @@ module Models autoload :AvroSerialization, 'generated/azure_mgmt_stream_analytics/models/avro_serialization.rb' autoload :JsonSerialization, 'generated/azure_mgmt_stream_analytics/models/json_serialization.rb' autoload :CsvSerialization, 'generated/azure_mgmt_stream_analytics/models/csv_serialization.rb' + autoload :AzureDataLakeStoreOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/azure_data_lake_store_output_data_source.rb' + autoload :PowerBIOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/power_bioutput_data_source.rb' autoload :EventHubDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb' autoload :ServiceBusTopicOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb' autoload :ServiceBusQueueOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb' diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/functions.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/functions.rb index d0def50f09..45b1760623 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/functions.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/functions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/inputs.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/inputs.rb index c383b74908..d8cb55281f 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/inputs.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/inputs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/avro_serialization.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/avro_serialization.rb index 9ba525ef88..5558acdd70 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/avro_serialization.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/avro_serialization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AvroSerialization < Serialization include MsRestAzure - include MsRest::JSONable def initialize @type = "Avro" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_data_lake_store_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_data_lake_store_output_data_source.rb new file mode 100644 index 0000000000..153925061f --- /dev/null +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_data_lake_store_output_data_source.rb @@ -0,0 +1,145 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StreamAnalytics + module Models + # + # Describes an Azure Data Lake Store output data source. + # + class AzureDataLakeStoreOutputDataSource < OutputDataSource + + include MsRestAzure + + + def initialize + @type = "Microsoft.DataLake/Accounts" + end + + attr_accessor :type + + # @return [String] A refresh token that can be used to obtain a valid + # access token that can then be used to authenticate with the data + # source. A valid refresh token is currently only obtainable via the + # Azure Portal. It is recommended to put a dummy string value here when + # creating the data source and then going to the Azure Portal to + # authenticate the data source which will update this property with a + # valid refresh token. Required on PUT (CreateOrReplace) requests. + attr_accessor :refresh_token + + # @return [String] The user principal name (UPN) of the user that was + # used to obtain the refresh token. Use this property to help remember + # which user was used to obtain the refresh token. + attr_accessor :token_user_principal_name + + # @return [String] The user display name of the user that was used to + # obtain the refresh token. Use this property to help remember which user + # was used to obtain the refresh token. + attr_accessor :token_user_display_name + + # @return [String] The name of the Azure Data Lake Store account. + # Required on PUT (CreateOrReplace) requests. + attr_accessor :account_name + + # @return [String] The tenant id of the user used to obtain the refresh + # token. Required on PUT (CreateOrReplace) requests. + attr_accessor :tenant_id + + # @return [String] The location of the file to which the output should be + # written to. Required on PUT (CreateOrReplace) requests. + attr_accessor :file_path_prefix + + # @return [String] The date format. Wherever {date} appears in + # filePathPrefix, the value of this property is used as the date format + # instead. + attr_accessor :date_format + + # @return [String] The time format. Wherever {time} appears in + # filePathPrefix, the value of this property is used as the time format + # instead. + attr_accessor :time_format + + + # + # Mapper for AzureDataLakeStoreOutputDataSource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Microsoft.DataLake/Accounts', + type: { + name: 'Composite', + class_name: 'AzureDataLakeStoreOutputDataSource', + model_properties: { + type: { + required: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + refresh_token: { + required: false, + serialized_name: 'properties.refreshToken', + type: { + name: 'String' + } + }, + token_user_principal_name: { + required: false, + serialized_name: 'properties.tokenUserPrincipalName', + type: { + name: 'String' + } + }, + token_user_display_name: { + required: false, + serialized_name: 'properties.tokenUserDisplayName', + type: { + name: 'String' + } + }, + account_name: { + required: false, + serialized_name: 'properties.accountName', + type: { + name: 'String' + } + }, + tenant_id: { + required: false, + serialized_name: 'properties.tenantId', + type: { + name: 'String' + } + }, + file_path_prefix: { + required: false, + serialized_name: 'properties.filePathPrefix', + type: { + name: 'String' + } + }, + date_format: { + required: false, + serialized_name: 'properties.dateFormat', + type: { + name: 'String' + } + }, + time_format: { + required: false, + serialized_name: 'properties.timeFormat', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_binding.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_binding.rb index 3157d90c13..ce7a68f4a6 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_binding.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_binding.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AzureMachineLearningWebServiceFunctionBinding < FunctionBinding include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.MachineLearning/WebService" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_retrieve_default_definition_parameters.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_retrieve_default_definition_parameters.rb index a9d0489914..74359c7056 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_retrieve_default_definition_parameters.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_retrieve_default_definition_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters include MsRestAzure - include MsRest::JSONable def initialize @bindingType = "Microsoft.MachineLearning/WebService" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb index 981349f5aa..156778649f 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AzureMachineLearningWebServiceInputColumn include MsRestAzure - include MsRest::JSONable # @return [String] The name of the input column. attr_accessor :name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb index fd2a24b144..f811a39e73 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AzureMachineLearningWebServiceInputs include MsRestAzure - include MsRest::JSONable # @return [String] The name of the input. This is the name provided while # authoring the endpoint. attr_accessor :name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb index 23ca166244..f6d021ab08 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AzureMachineLearningWebServiceOutputColumn include MsRestAzure - include MsRest::JSONable # @return [String] The name of the output column. attr_accessor :name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb index 4b1fb775b6..eeaff51974 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AzureSqlDatabaseDataSourceProperties include MsRestAzure - include MsRest::JSONable # @return [String] The name of the SQL server containing the Azure SQL # database. Required on PUT (CreateOrReplace) requests. attr_accessor :server diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_output_data_source.rb index 2821ba80de..81a9284ca1 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_output_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AzureSqlDatabaseOutputDataSource < OutputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.Sql/Server/Database" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_table_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_table_output_data_source.rb index 221464fd22..b2919fdda9 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_table_output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/azure_table_output_data_source.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::StreamAnalytics module Models # - # Describes an Azure Table data source. + # Describes an Azure Table output data source. # class AzureTableOutputDataSource < OutputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.Storage/Table" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb index f4430c06ed..f55fd19dbd 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BlobDataSourceProperties include MsRestAzure - include MsRest::JSONable # @return [Array] A list of one or more Azure Storage # accounts. Required on PUT (CreateOrReplace) requests. attr_accessor :storage_accounts diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_output_data_source.rb index f267571c7e..2b000072a7 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_output_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BlobOutputDataSource < OutputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.Storage/Blob" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_reference_input_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_reference_input_data_source.rb index f8d6eb764d..6a5b0c7b7b 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_reference_input_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_reference_input_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BlobReferenceInputDataSource < ReferenceInputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.Storage/Blob" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_stream_input_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_stream_input_data_source.rb index 1c9934d018..ec5fbeb5d0 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_stream_input_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/blob_stream_input_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class BlobStreamInputDataSource < StreamInputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.Storage/Blob" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/compatibility_level.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/compatibility_level.rb index 4bd79b5ebf..79af9e5dbc 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/compatibility_level.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/compatibility_level.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/csv_serialization.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/csv_serialization.rb index fe0e99828c..5022fee2f6 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/csv_serialization.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/csv_serialization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CsvSerialization < Serialization include MsRestAzure - include MsRest::JSONable def initialize @type = "Csv" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb index 5102a4267d..223e0643e3 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DiagnosticCondition include MsRestAzure - include MsRest::JSONable # @return [String] The UTC timestamp of when the condition started. # Customers should be able to find a corresponding event in the ops log # around this time. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostics.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostics.rb index d59d8bfe3c..856ecca980 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostics.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/diagnostics.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Diagnostics include MsRestAzure - include MsRest::JSONable # @return [Array] A collection of zero or more # conditions applicable to the resource, or to the job overall, that # warrant customer attention. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/document_db_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/document_db_output_data_source.rb index 78e19bd37c..2ccce32e08 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/document_db_output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/document_db_output_data_source.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::StreamAnalytics module Models # - # Describes a DocumentDB data source. + # Describes a DocumentDB output data source. # class DocumentDbOutputDataSource < OutputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.Storage/DocumentDB" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/encoding.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/encoding.rb index 185dfcc0a3..9ab1a6e74d 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/encoding.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/encoding.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/error_response.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/error_response.rb index 66479aa28d..c18c49b766 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/error_response.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/error_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ErrorResponse include MsRestAzure - include MsRest::JSONable # @return [String] Error code associated with the error that occurred. attr_accessor :code diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb index c79b72186b..bcf3af9b0c 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EventHubDataSourceProperties < ServiceBusDataSourceProperties include MsRestAzure - include MsRest::JSONable # @return [String] The name of the Event Hub. Required on PUT # (CreateOrReplace) requests. attr_accessor :event_hub_name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_output_data_source.rb index 789bd37718..4d7b960a7a 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_output_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EventHubOutputDataSource < OutputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.ServiceBus/EventHub" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_stream_input_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_stream_input_data_source.rb index 59f7352a7f..ae0013d1a0 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_stream_input_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/event_hub_stream_input_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class EventHubStreamInputDataSource < StreamInputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.ServiceBus/EventHub" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/events_out_of_order_policy.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/events_out_of_order_policy.rb index 97e2291b6b..716d49a957 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/events_out_of_order_policy.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/events_out_of_order_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function.rb index 2f949a3dd0..a0d3299bcb 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # A function object, containing all information associated with the named # function. All functions are contained under a streaming job. # - class Function < MsRestAzure::SubResource + class Function < SubResource include MsRestAzure - include MsRest::JSONable # @return [FunctionProperties] The properties that are associated with a # function. attr_accessor :properties diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_binding.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_binding.rb index 6dbc66d6ee..cc2f4d053f 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_binding.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_binding.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class FunctionBinding include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.StreamAnalytics/JavascriptUdf"] = "JavaScriptFunctionBinding" @@discriminatorMap["Microsoft.MachineLearning/WebService"] = "AzureMachineLearningWebServiceFunctionBinding" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_input.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_input.rb index 8fd9414d7f..d438951c98 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_input.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FunctionInput include MsRestAzure - include MsRest::JSONable # @return [String] The (Azure Stream Analytics supported) data type of # the function input parameter. A list of valid Azure Stream Analytics # data types are described at diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_list_result.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_list_result.rb index edd2d0bc75..2680203626 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_list_result.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_output.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_output.rb index 0b20b62151..a902d77994 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_output.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_output.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FunctionOutput include MsRestAzure - include MsRest::JSONable # @return [String] The (Azure Stream Analytics supported) data type of # the function output. A list of valid Azure Stream Analytics data types # are described at diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_properties.rb index e041c59cf2..0170f465d7 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FunctionProperties include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Scalar"] = "ScalarFunctionProperties" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb index 5f19477218..b884e90f25 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class FunctionRetrieveDefaultDefinitionParameters include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.StreamAnalytics/JavascriptUdf"] = "JavaScriptFunctionRetrieveDefaultDefinitionParameters" @@discriminatorMap["Microsoft.MachineLearning/WebService"] = "AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input.rb index f05a596e78..c1aded57db 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # An input object, containing all information associated with the named # input. All inputs are contained under a streaming job. # - class Input < MsRestAzure::SubResource + class Input < SubResource include MsRestAzure - include MsRest::JSONable # @return [InputProperties] The properties that are associated with an # input. Required on PUT (CreateOrReplace) requests. attr_accessor :properties diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_list_result.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_list_result.rb index a961faa54b..85e1728063 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_list_result.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_properties.rb index 36d5216fa6..4bf1b2c0e9 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/input_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class InputProperties include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Reference"] = "ReferenceInputProperties" @@discriminatorMap["Stream"] = "StreamInputProperties" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/io_thub_stream_input_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/io_thub_stream_input_data_source.rb index 0861c5bcd2..1e03ba47f8 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/io_thub_stream_input_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/io_thub_stream_input_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IoTHubStreamInputDataSource < StreamInputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.Devices/IotHubs" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_binding.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_binding.rb index 55281ff0d5..343a605c2d 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_binding.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_binding.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class JavaScriptFunctionBinding < FunctionBinding include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.StreamAnalytics/JavascriptUdf" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_retrieve_default_definition_parameters.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_retrieve_default_definition_parameters.rb index d02d0ac952..c6bf1273a3 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_retrieve_default_definition_parameters.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_retrieve_default_definition_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JavaScriptFunctionRetrieveDefaultDefinitionParameters < FunctionRetrieveDe include MsRestAzure - include MsRest::JSONable def initialize @bindingType = "Microsoft.StreamAnalytics/JavascriptUdf" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_output_serialization_format.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_output_serialization_format.rb index 1a4915bf63..64efc0a138 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_output_serialization_format.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_output_serialization_format.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_serialization.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_serialization.rb index a57e55b48a..7a693b3a70 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_serialization.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/json_serialization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class JsonSerialization < Serialization include MsRestAzure - include MsRest::JSONable def initialize @type = "Json" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/oauth_based_data_source_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/oauth_based_data_source_properties.rb new file mode 100644 index 0000000000..e1a6403d0c --- /dev/null +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/oauth_based_data_source_properties.rb @@ -0,0 +1,75 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::StreamAnalytics + module Models + # + # The properties that are associated with data sources that use OAuth as + # their authentication model. + # + class OAuthBasedDataSourceProperties + + include MsRestAzure + + # @return [String] A refresh token that can be used to obtain a valid + # access token that can then be used to authenticate with the data + # source. A valid refresh token is currently only obtainable via the + # Azure Portal. It is recommended to put a dummy string value here when + # creating the data source and then going to the Azure Portal to + # authenticate the data source which will update this property with a + # valid refresh token. Required on PUT (CreateOrReplace) requests. + attr_accessor :refresh_token + + # @return [String] The user principal name (UPN) of the user that was + # used to obtain the refresh token. Use this property to help remember + # which user was used to obtain the refresh token. + attr_accessor :token_user_principal_name + + # @return [String] The user display name of the user that was used to + # obtain the refresh token. Use this property to help remember which user + # was used to obtain the refresh token. + attr_accessor :token_user_display_name + + + # + # Mapper for OAuthBasedDataSourceProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OAuthBasedDataSourceProperties', + type: { + name: 'Composite', + class_name: 'OAuthBasedDataSourceProperties', + model_properties: { + refresh_token: { + required: false, + serialized_name: 'refreshToken', + type: { + name: 'String' + } + }, + token_user_principal_name: { + required: false, + serialized_name: 'tokenUserPrincipalName', + type: { + name: 'String' + } + }, + token_user_display_name: { + required: false, + serialized_name: 'tokenUserDisplayName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation.rb index 578781eb3b..78853dce0f 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] The name of the operation being performed on this # particular object. attr_accessor :name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_display.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_display.rb index 87220fe1df..e2c213a474 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_display.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_display.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class OperationDisplay include MsRestAzure - include MsRest::JSONable # @return [String] The localized friendly form of the resource provider # name. attr_accessor :provider diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_list_result.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_list_result.rb index 7376f3f59d..64410964f7 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_list_result.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/operation_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output.rb index f523e219f1..597ac663d3 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # An output object, containing all information associated with the named # output. All outputs are contained under a streaming job. # - class Output < MsRestAzure::SubResource + class Output < SubResource include MsRestAzure - include MsRest::JSONable # @return [OutputDataSource] Describes the data source that output will # be written to. Required on PUT (CreateOrReplace) requests. attr_accessor :datasource diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_data_source.rb index 01cf467d9a..13385ef003 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,8 +12,9 @@ class OutputDataSource include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new + @@discriminatorMap["Microsoft.DataLake/Accounts"] = "AzureDataLakeStoreOutputDataSource" + @@discriminatorMap["PowerBI"] = "PowerBIOutputDataSource" @@discriminatorMap["Microsoft.ServiceBus/Topic"] = "ServiceBusTopicOutputDataSource" @@discriminatorMap["Microsoft.ServiceBus/Queue"] = "ServiceBusQueueOutputDataSource" @@discriminatorMap["Microsoft.Storage/DocumentDB"] = "DocumentDbOutputDataSource" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_error_policy.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_error_policy.rb index 69bdf4b9ca..f4ae79bab6 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_error_policy.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_error_policy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_list_result.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_list_result.rb index ee13cca69a..cbfd5ce180 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_list_result.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_start_mode.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_start_mode.rb index 284c3a81a5..53cdcdb183 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_start_mode.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/output_start_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/power_bioutput_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/power_bioutput_data_source.rb new file mode 100644 index 0000000000..00b958dcc6 --- /dev/null +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/power_bioutput_data_source.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::ARM::StreamAnalytics + module Models + # + # Describes a Power BI output data source. + # + class PowerBIOutputDataSource < OutputDataSource + + include MsRestAzure + + + def initialize + @type = "PowerBI" + end + + attr_accessor :type + + # @return [String] A refresh token that can be used to obtain a valid + # access token that can then be used to authenticate with the data + # source. A valid refresh token is currently only obtainable via the + # Azure Portal. It is recommended to put a dummy string value here when + # creating the data source and then going to the Azure Portal to + # authenticate the data source which will update this property with a + # valid refresh token. Required on PUT (CreateOrReplace) requests. + attr_accessor :refresh_token + + # @return [String] The user principal name (UPN) of the user that was + # used to obtain the refresh token. Use this property to help remember + # which user was used to obtain the refresh token. + attr_accessor :token_user_principal_name + + # @return [String] The user display name of the user that was used to + # obtain the refresh token. Use this property to help remember which user + # was used to obtain the refresh token. + attr_accessor :token_user_display_name + + # @return [String] The name of the Power BI dataset. Required on PUT + # (CreateOrReplace) requests. + attr_accessor :dataset + + # @return [String] The name of the Power BI table under the specified + # dataset. Required on PUT (CreateOrReplace) requests. + attr_accessor :table + + # @return [String] The ID of the Power BI group. + attr_accessor :group_id + + # @return [String] The name of the Power BI group. Use this property to + # help remember which specific Power BI group id was used. + attr_accessor :group_name + + + # + # Mapper for PowerBIOutputDataSource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PowerBI', + type: { + name: 'Composite', + class_name: 'PowerBIOutputDataSource', + model_properties: { + type: { + required: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + refresh_token: { + required: false, + serialized_name: 'properties.refreshToken', + type: { + name: 'String' + } + }, + token_user_principal_name: { + required: false, + serialized_name: 'properties.tokenUserPrincipalName', + type: { + name: 'String' + } + }, + token_user_display_name: { + required: false, + serialized_name: 'properties.tokenUserDisplayName', + type: { + name: 'String' + } + }, + dataset: { + required: false, + serialized_name: 'properties.dataset', + type: { + name: 'String' + } + }, + table: { + required: false, + serialized_name: 'properties.table', + type: { + name: 'String' + } + }, + group_id: { + required: false, + serialized_name: 'properties.groupId', + type: { + name: 'String' + } + }, + group_name: { + required: false, + serialized_name: 'properties.groupName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb index 7c33edc5b5..645ef3eb7b 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ReferenceInputDataSource include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.Storage/Blob"] = "BlobReferenceInputDataSource" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_properties.rb index 60135debda..8dfeece3a4 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/reference_input_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ReferenceInputProperties < InputProperties include MsRestAzure - include MsRest::JSONable def initialize @type = "Reference" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/resource.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/resource.rb new file mode 100644 index 0000000000..c0a309279f --- /dev/null +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/resource.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::ARM::StreamAnalytics + module Models + # + # The base resource model definition. + # + class Resource + + include MsRestAzure + + # @return [String] Resource Id + attr_accessor :id + + # @return [String] Resource name + attr_accessor :name + + # @return [String] Resource type + attr_accessor :type + + # @return [String] Resource location. Required on PUT (CreateOrReplace) + # requests. + attr_accessor :location + + # @return [Hash{String => String}] Resource tags + attr_accessor :tags + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/resource_test_status.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/resource_test_status.rb index cee3b97435..19b3a65af4 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/resource_test_status.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/resource_test_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ResourceTestStatus include MsRestAzure - include MsRest::JSONable # @return [String] The status of the test operation. attr_accessor :status diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/scalar_function_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/scalar_function_properties.rb index 9485663216..a190fe856b 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/scalar_function_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/scalar_function_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ScalarFunctionProperties < FunctionProperties include MsRestAzure - include MsRest::JSONable def initialize @type = "Scalar" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/serialization.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/serialization.rb index 4d583b5482..0eb5b640f5 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/serialization.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/serialization.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Serialization include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Avro"] = "AvroSerialization" @@discriminatorMap["Json"] = "JsonSerialization" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb index 55f52f61cc..9bd294f8f9 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class ServiceBusDataSourceProperties include MsRestAzure - include MsRest::JSONable # @return [String] The namespace that is associated with the desired # Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT # (CreateOrReplace) requests. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb index e59f86d0fb..9976b2105a 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::StreamAnalytics module Models # - # Describes a Service Bus Queue data source. + # Describes a Service Bus Queue output data source. # class ServiceBusQueueOutputDataSource < OutputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.ServiceBus/Queue" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb index e98eacfc5b..a9f799d7fb 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb @@ -1,18 +1,17 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::StreamAnalytics module Models # - # Describes a Service Bus Topic data source. + # Describes a Service Bus Topic output data source. # class ServiceBusTopicOutputDataSource < OutputDataSource include MsRestAzure - include MsRest::JSONable def initialize @type = "Microsoft.ServiceBus/Topic" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku.rb index e0ef0497e9..0010ccaa2d 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Sku include MsRestAzure - include MsRest::JSONable # @return [SkuName] The name of the SKU. Required on PUT # (CreateOrReplace) requests. Possible values include: 'Standard' attr_accessor :name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku_name.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku_name.rb index c19e5ec0bb..108b8e9eb4 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku_name.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb index e3451a00bf..5872632321 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StartStreamingJobParameters include MsRestAzure - include MsRest::JSONable # @return [OutputStartMode] Value may be JobStartTime, CustomTime, or # LastOutputEventTime to indicate whether the starting point of the # output event stream should start whenever the job is started, start at diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/storage_account.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/storage_account.rb index 2c8eaf0ec7..ef31cd8f59 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/storage_account.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/storage_account.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StorageAccount include MsRestAzure - include MsRest::JSONable # @return [String] The name of the Azure Storage account. Required on PUT # (CreateOrReplace) requests. attr_accessor :account_name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb index 5f997d7d3c..bee45def52 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StreamInputDataSource include MsRestAzure - include MsRest::JSONable @@discriminatorMap = Hash.new @@discriminatorMap["Microsoft.Devices/IotHubs"] = "IoTHubStreamInputDataSource" @@discriminatorMap["Microsoft.ServiceBus/EventHub"] = "EventHubStreamInputDataSource" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_properties.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_properties.rb index e58290f0ac..f32551418b 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_properties.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/stream_input_properties.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StreamInputProperties < InputProperties include MsRestAzure - include MsRest::JSONable def initialize @type = "Stream" diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job.rb index 62432b748f..e8efcce9a5 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # A streamng job object, containing all information associated with the # named streaming job. # - class StreamingJob < MsRestAzure::Resource + class StreamingJob < Resource include MsRestAzure - include MsRest::JSONable # @return [Sku] Describes the SKU of the streaming job. Required on PUT # (CreateOrReplace) requests. attr_accessor :sku diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb index 1dc68a5458..954c2fa194 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sub_resource.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sub_resource.rb index 8f8fe01360..1840d9e3f2 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sub_resource.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/sub_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,13 @@ module Models # # The base sub-resource model definition. # - class SubResource < MsRestAzure::SubResource + class SubResource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id + attr_accessor :id + # @return [String] Resource name attr_accessor :name diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quota.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quota.rb index d904dae61a..bc38d90b08 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quota.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quota.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Describes the current quota for the subscription. # - class SubscriptionQuota < MsRestAzure::SubResource + class SubscriptionQuota < SubResource include MsRestAzure - include MsRest::JSONable # @return [Integer] The max permitted usage of this resource. attr_accessor :max_count diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb index cb3b17d77a..79c9f2d2e1 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class SubscriptionQuotasListResult include MsRestAzure - include MsRest::JSONable # @return [Array] List of quotas for the subscription # in a particular region. attr_accessor :value diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/transformation.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/transformation.rb index e04e264b2b..83a6371ab3 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/transformation.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/transformation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -10,11 +10,10 @@ module Models # named transformation. All transformations are contained under a streaming # job. # - class Transformation < MsRestAzure::SubResource + class Transformation < SubResource include MsRestAzure - include MsRest::JSONable # @return [Integer] Specifies the number of streaming units that the # streaming job uses. attr_accessor :streaming_units diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/udf_type.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/udf_type.rb index 55c4e0a1b3..a7a70bec14 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/udf_type.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/models/udf_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/module_definition.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/module_definition.rb index a9c85da559..fe9ad0e17b 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/module_definition.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/operations.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/operations.rb index e84b815e2d..5a9952716a 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/operations.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/operations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/outputs.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/outputs.rb index ef7791913b..86d8489dd4 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/outputs.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/outputs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb index c7cfd08c5f..4ce3ef1bd9 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb index ec361129dc..a3794b0b99 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/subscriptions.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/subscriptions.rb index bfdf346b4a..ca911df3ba 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/subscriptions.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/subscriptions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/transformations.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/transformations.rb index de17c6c6cc..da8ccb4bc0 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/transformations.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/transformations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/version.rb b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/version.rb index ccde632fc4..f908af5ff5 100644 --- a/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/version.rb +++ b/management/azure_mgmt_stream_analytics/lib/generated/azure_mgmt_stream_analytics/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::StreamAnalytics - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_subscriptions/azure_mgmt_subscriptions.gemspec b/management/azure_mgmt_subscriptions/azure_mgmt_subscriptions.gemspec index 4b7d19c09b..563c2c0b62 100644 --- a/management/azure_mgmt_subscriptions/azure_mgmt_subscriptions.gemspec +++ b/management/azure_mgmt_subscriptions/azure_mgmt_subscriptions.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions.rb old mode 100755 new mode 100644 index b4e4201a64..35615450e3 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location.rb old mode 100755 new mode 100644 index 3df7974b8b..7cfd0697a9 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Location include MsRestAzure - include MsRest::JSONable # @return [String] The fully qualified ID of the location. For example, # /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. attr_accessor :id diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location_list_result.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location_list_result.rb old mode 100755 new mode 100644 index 7782a2db8e..9c4f21eccb --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location_list_result.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/location_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LocationListResult include MsRestAzure - include MsRest::JSONable # @return [Array] An array of locations. attr_accessor :value diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/spending_limit.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/spending_limit.rb old mode 100755 new mode 100644 index 6fbace7b49..7d67f73b98 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/spending_limit.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/spending_limit.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription.rb old mode 100755 new mode 100644 index 938777ec6f..e8c61abad2 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Subscription include MsRestAzure - include MsRest::JSONable # @return [String] The fully qualified ID for the subscription. For # example, /subscriptions/00000000-0000-0000-0000-000000000000. attr_accessor :id diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb old mode 100755 new mode 100644 index fe36b589a5..63a9de1686 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_policies.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_policies.rb old mode 100755 new mode 100644 index edf05dd079..5364ed01d8 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_policies.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_policies.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SubscriptionPolicies include MsRestAzure - include MsRest::JSONable # @return [String] The subscription location placement ID. The ID # indicates which regions are visible for a subscription. For example, a # subscription with a location placement Id of Public_2014-09-01 has diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_state.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_state.rb old mode 100755 new mode 100644 index 0d1debe146..b6ea79dfff --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_state.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/subscription_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb old mode 100755 new mode 100644 index fa7a8d61c3..f79c01f499 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_id_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TenantIdDescription include MsRestAzure - include MsRest::JSONable # @return [String] The fully qualified ID of the tenant. For example, # /tenants/00000000-0000-0000-0000-000000000000. attr_accessor :id diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb old mode 100755 new mode 100644 index 6ef062690b..84a052e705 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/models/tenant_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/module_definition.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/module_definition.rb old mode 100755 new mode 100644 index 2e8b94cecc..93b0fa9563 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/module_definition.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscription_client.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscription_client.rb old mode 100755 new mode 100644 index aef983e661..265d4d5ddc --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscription_client.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscription_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscriptions.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscriptions.rb old mode 100755 new mode 100644 index 49f79bbaf5..dd8f6c482a --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscriptions.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/subscriptions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/tenants.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/tenants.rb old mode 100755 new mode 100644 index cde542208a..d0ebaf1430 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/tenants.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/tenants.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/version.rb b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/version.rb old mode 100755 new mode 100644 index 5c67915a8b..e99cbbc574 --- a/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/version.rb +++ b/management/azure_mgmt_subscriptions/lib/generated/azure_mgmt_subscriptions/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Subscriptions - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_traffic_manager/azure_mgmt_traffic_manager.gemspec b/management/azure_mgmt_traffic_manager/azure_mgmt_traffic_manager.gemspec index ae4690c3c3..3560dbc0f7 100644 --- a/management/azure_mgmt_traffic_manager/azure_mgmt_traffic_manager.gemspec +++ b/management/azure_mgmt_traffic_manager/azure_mgmt_traffic_manager.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager.rb index bf81776dd7..d4cad4a935 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -23,21 +23,29 @@ module Azure::ARM::TrafficManager autoload :Endpoints, 'generated/azure_mgmt_traffic_manager/endpoints.rb' autoload :Profiles, 'generated/azure_mgmt_traffic_manager/profiles.rb' autoload :GeographicHierarchies, 'generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb' + autoload :HeatMap, 'generated/azure_mgmt_traffic_manager/heat_map.rb' + autoload :TrafficManagerUserMetricsKeys, 'generated/azure_mgmt_traffic_manager/traffic_manager_user_metrics_keys.rb' autoload :TrafficManagerManagementClient, 'generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb' module Models autoload :TrafficManagerNameAvailability, 'generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb' - autoload :DeleteOperationResult, 'generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb' autoload :Region, 'generated/azure_mgmt_traffic_manager/models/region.rb' - autoload :CheckTrafficManagerRelativeDnsNameAvailabilityParameters, 'generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb' + autoload :DeleteOperationResult, 'generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb' autoload :DnsConfig, 'generated/azure_mgmt_traffic_manager/models/dns_config.rb' - autoload :MonitorConfig, 'generated/azure_mgmt_traffic_manager/models/monitor_config.rb' + autoload :TrafficFlow, 'generated/azure_mgmt_traffic_manager/models/traffic_flow.rb' + autoload :HeatMapEndpoint, 'generated/azure_mgmt_traffic_manager/models/heat_map_endpoint.rb' + autoload :Resource, 'generated/azure_mgmt_traffic_manager/models/resource.rb' + autoload :CheckTrafficManagerRelativeDnsNameAvailabilityParameters, 'generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb' + autoload :QueryExperience, 'generated/azure_mgmt_traffic_manager/models/query_experience.rb' autoload :ProfileListResult, 'generated/azure_mgmt_traffic_manager/models/profile_list_result.rb' + autoload :MonitorConfig, 'generated/azure_mgmt_traffic_manager/models/monitor_config.rb' + autoload :ProxyResource, 'generated/azure_mgmt_traffic_manager/models/proxy_resource.rb' autoload :Endpoint, 'generated/azure_mgmt_traffic_manager/models/endpoint.rb' autoload :Profile, 'generated/azure_mgmt_traffic_manager/models/profile.rb' - autoload :ProxyResource, 'generated/azure_mgmt_traffic_manager/models/proxy_resource.rb' autoload :TrafficManagerGeographicHierarchy, 'generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb' autoload :TrackedResource, 'generated/azure_mgmt_traffic_manager/models/tracked_resource.rb' + autoload :TrafficManagerUserMetricsKeyModel, 'generated/azure_mgmt_traffic_manager/models/traffic_manager_user_metrics_key_model.rb' + autoload :HeatMapModel, 'generated/azure_mgmt_traffic_manager/models/heat_map_model.rb' autoload :EndpointStatus, 'generated/azure_mgmt_traffic_manager/models/endpoint_status.rb' autoload :EndpointMonitorStatus, 'generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb' autoload :ProfileMonitorStatus, 'generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb' diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/endpoints.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/endpoints.rb index ddc2060c3f..40a8466e03 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/endpoints.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/endpoints.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -87,7 +87,7 @@ def update_async(resource_group_name, profile_name, endpoint_type, endpoint_name fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -111,7 +111,7 @@ def update_async(resource_group_name, profile_name, endpoint_type, endpoint_name options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -198,7 +198,7 @@ def get_async(resource_group_name, profile_name, endpoint_type, endpoint_name, c fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -214,7 +214,7 @@ def get_async(resource_group_name, profile_name, endpoint_type, endpoint_name, c options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -313,7 +313,7 @@ def create_or_update_async(resource_group_name, profile_name, endpoint_type, end fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -337,7 +337,7 @@ def create_or_update_async(resource_group_name, profile_name, endpoint_type, end options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -440,7 +440,7 @@ def delete_async(resource_group_name, profile_name, endpoint_type, endpoint_name fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -456,7 +456,7 @@ def delete_async(resource_group_name, profile_name, endpoint_type, endpoint_name options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb index 3d9e56c69b..42776697e2 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -58,7 +58,7 @@ def get_default_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def get_default_async(custom_headers = nil) - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' request_headers = {} @@ -72,7 +72,7 @@ def get_default_async(custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/heat_map.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/heat_map.rb new file mode 100644 index 0000000000..cd637c7b72 --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/heat_map.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::ARM::TrafficManager + # + # HeatMap + # + class HeatMap + include MsRestAzure + + # + # Creates and initializes a new instance of the HeatMap class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [TrafficManagerManagementClient] reference to the TrafficManagerManagementClient + attr_reader :client + + # + # Gets latest heatmap for Traffic Manager profile. + # + # @param resource_group_name [String] The name of the resource group containing + # the Traffic Manager endpoint. + # @param profile_name [String] The name of the Traffic Manager profile. + # @param top_left [Array] The top left latitude,longitude pair of the + # rectangular viewport to query for. + # @param bot_right [Array] The bottom right latitude,longitude pair of + # the rectangular viewport to query for. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HeatMapModel] operation results. + # + def get(resource_group_name, profile_name, top_left = nil, bot_right = nil, custom_headers = nil) + response = get_async(resource_group_name, profile_name, top_left, bot_right, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets latest heatmap for Traffic Manager profile. + # + # @param resource_group_name [String] The name of the resource group containing + # the Traffic Manager endpoint. + # @param profile_name [String] The name of the Traffic Manager profile. + # @param top_left [Array] The top left latitude,longitude pair of the + # rectangular viewport to query for. + # @param bot_right [Array] The bottom right latitude,longitude pair of + # the rectangular viewport to query for. + # @param custom_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, profile_name, top_left = nil, bot_right = nil, custom_headers = nil) + get_async(resource_group_name, profile_name, top_left, bot_right, custom_headers).value! + end + + # + # Gets latest heatmap for Traffic Manager profile. + # + # @param resource_group_name [String] The name of the resource group containing + # the Traffic Manager endpoint. + # @param profile_name [String] The name of the Traffic Manager profile. + # @param top_left [Array] The top left latitude,longitude pair of the + # rectangular viewport to query for. + # @param bot_right [Array] The bottom right latitude,longitude pair of + # the rectangular viewport to query for. + # @param [Hash{String => String}] 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, profile_name, top_left = nil, bot_right = nil, 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, 'profile_name is nil' if profile_name.nil? + heat_map_type = 'default' + api_version = '2017-09-01-preview' + + + request_headers = {} + + # Set Headers + request_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.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}' + + 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,'profileName' => profile_name,'heatMapType' => heat_map_type}, + query_params: {'topLeft' => top_left.nil? ? nil : top_left.join(','),'botRight' => bot_right.nil? ? nil : bot_right.join(','),'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::TrafficManager::Models::HeatMapModel.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb index ae6521c168..f418190cc7 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters include MsRestAzure - include MsRest::JSONable # @return [String] The name of the resource. attr_accessor :name diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb index 2c3801395b..1e11404ee3 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DeleteOperationResult include MsRestAzure - include MsRest::JSONable # @return [Boolean] The result of the operation or request. attr_accessor :operation_result diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/dns_config.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/dns_config.rb index 8d823e5a9c..64deea97c7 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/dns_config.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/dns_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DnsConfig include MsRestAzure - include MsRest::JSONable # @return [String] The relative DNS name provided by this Traffic Manager # profile. This value is combined with the DNS domain name used by Azure # Traffic Manager to form the fully-qualified domain name (FQDN) of the diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint.rb index 805ac36f63..37d11ea320 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Endpoint < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [String] The Azure Resource URI of the of the endpoint. Not # applicable to endpoints of type 'ExternalEndpoints'. attr_accessor :target_resource_id diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb index 5ec069ccb7..3c46971d34 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb index eddd98be83..74105db4f0 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/heat_map_endpoint.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/heat_map_endpoint.rb new file mode 100644 index 0000000000..864bb72f7c --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/heat_map_endpoint.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::ARM::TrafficManager + module Models + # + # Class which is a sparse representation of a Traffic Manager endpoint. + # + class HeatMapEndpoint + + include MsRestAzure + + # @return [String] The ARM Resource ID of this Traffic Manager endpoint. + attr_accessor :resource_id + + # @return [Integer] A number uniquely identifying this endpoint in query + # experiences. + attr_accessor :endpoint_id + + + # + # Mapper for HeatMapEndpoint class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HeatMapEndpoint', + type: { + name: 'Composite', + class_name: 'HeatMapEndpoint', + model_properties: { + resource_id: { + required: false, + serialized_name: 'resourceId', + type: { + name: 'String' + } + }, + endpoint_id: { + required: false, + serialized_name: 'endpointId', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/heat_map_model.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/heat_map_model.rb new file mode 100644 index 0000000000..c71491ab76 --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/heat_map_model.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::ARM::TrafficManager + module Models + # + # Class representing a Traffic Manager HeatMap. + # + class HeatMapModel < ProxyResource + + include MsRestAzure + + # @return [DateTime] The beginning of the time window for this HeatMap, + # inclusive. + attr_accessor :start_time + + # @return [DateTime] The ending of the time window for this HeatMap, + # exclusive. + attr_accessor :end_time + + # @return [Array] The endpoints used in this HeatMap + # calculation. + attr_accessor :endpoints + + # @return [Array] The traffic flows produced in this HeatMap + # calculation. + attr_accessor :traffic_flows + + + # + # Mapper for HeatMapModel class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'HeatMapModel', + type: { + name: 'Composite', + class_name: 'HeatMapModel', + 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' + } + }, + start_time: { + required: false, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + endpoints: { + required: false, + serialized_name: 'properties.endpoints', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'HeatMapEndpointElementType', + type: { + name: 'Composite', + class_name: 'HeatMapEndpoint' + } + } + } + }, + traffic_flows: { + required: false, + serialized_name: 'properties.trafficFlows', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TrafficFlowElementType', + type: { + name: 'Composite', + class_name: 'TrafficFlow' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_config.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_config.rb index 1197ff1de6..ba61feb3fe 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_config.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class MonitorConfig include MsRestAzure - include MsRest::JSONable # @return [ProfileMonitorStatus] The profile-level monitoring status of # the Traffic Manager profile. Possible values include: # 'CheckingEndpoints', 'Online', 'Degraded', 'Disabled', 'Inactive' diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb index 3d7a352260..b1b0815b6a 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile.rb index 80be47c700..d9217f42b9 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Profile < TrackedResource include MsRestAzure - include MsRest::JSONable # @return [ProfileStatus] The status of the Traffic Manager profile. # Possible values include: 'Enabled', 'Disabled' attr_accessor :profile_status diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb index 4548054e5c..1cb7cfcc77 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ProfileListResult include MsRestAzure - include MsRest::JSONable # @return [Array] Gets the list of Traffic manager profiles. attr_accessor :value diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb index d389eb9c4d..3f1aee0b8e 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_status.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_status.rb index 2c8aa7a3b0..390c64ad57 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_status.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/profile_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb index 6569333627..e3eb5b68eb 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # The resource model definition for a ARM proxy resource. It will have # everything other than required location and tags # - class ProxyResource < MsRestAzure::Resource + class ProxyResource < Resource include MsRestAzure - include MsRest::JSONable # # Mapper for ProxyResource class as Ruby Hash. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/query_experience.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/query_experience.rb new file mode 100644 index 0000000000..3d1fb46604 --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/query_experience.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::ARM::TrafficManager + module Models + # + # Class representing a Traffic Manager HeatMap query experience properties. + # + class QueryExperience + + include MsRestAzure + + # @return [Integer] The id of the endpoint from the 'endpoints' array + # which these queries were routed to. + attr_accessor :endpoint_id + + # @return [Integer] The number of queries originating from this location. + attr_accessor :query_count + + # @return [Float] The latency experienced by queries originating from + # this location. + attr_accessor :latency + + + # + # Mapper for QueryExperience class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'QueryExperience', + type: { + name: 'Composite', + class_name: 'QueryExperience', + model_properties: { + endpoint_id: { + required: true, + serialized_name: 'endpointId', + type: { + name: 'Number' + } + }, + query_count: { + required: true, + serialized_name: 'queryCount', + type: { + name: 'Number' + } + }, + latency: { + required: false, + serialized_name: 'latency', + type: { + name: 'Double' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/region.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/region.rb index c24e1c38e9..0b889b48e7 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/region.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/region.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Region include MsRestAzure - include MsRest::JSONable # @return [String] The code of the region attr_accessor :code diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/resource.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/resource.rb new file mode 100644 index 0000000000..b0301a5e7f --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/resource.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::ARM::TrafficManager + module Models + # + # The core properties of ARM resources + # + class Resource + + include MsRestAzure + + # @return [String] Fully qualified resource Id for the resource. Ex - + # /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + attr_accessor :id + + # @return [String] The name of the resource + attr_accessor :name + + # @return [String] The type of the resource. Ex- + # Microsoft.Network/trafficmanagerProfiles. + 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_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb index 66e81ccf99..21a764ee86 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The resource model definition for a ARM tracked top level resource # - class TrackedResource < MsRestAzure::Resource + class TrackedResource < Resource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Resource tags. attr_accessor :tags diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_flow.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_flow.rb new file mode 100644 index 0000000000..e5005b5eb9 --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_flow.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::TrafficManager + module Models + # + # Class representing a Traffic Manager HeatMap traffic flow properties. + # + class TrafficFlow + + include MsRestAzure + + # @return [String] The IP address that this query experience originated + # from. + attr_accessor :source_ip + + # @return [Float] The approximate latitude that these queries originated + # from. + attr_accessor :latitude + + # @return [Float] The approximate longitude that these queries originated + # from. + attr_accessor :longitude + + # @return [Array] The query experiences produced in this + # HeatMap calculation. + attr_accessor :query_experiences + + + # + # Mapper for TrafficFlow class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TrafficFlow', + type: { + name: 'Composite', + class_name: 'TrafficFlow', + model_properties: { + source_ip: { + required: false, + serialized_name: 'sourceIp', + type: { + name: 'String' + } + }, + latitude: { + required: false, + serialized_name: 'latitude', + type: { + name: 'Double' + } + }, + longitude: { + required: false, + serialized_name: 'longitude', + type: { + name: 'Double' + } + }, + query_experiences: { + required: false, + serialized_name: 'queryExperiences', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'QueryExperienceElementType', + type: { + name: 'Composite', + class_name: 'QueryExperience' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb index d728f11820..a47dab3e74 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class TrafficManagerGeographicHierarchy < ProxyResource include MsRestAzure - include MsRest::JSONable # @return [Region] The region at the root of the hierarchy from all the # regions in the hierarchy can be retrieved. attr_accessor :geographic_hierarchy diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb index c7cfe9377b..285c9fc8fc 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TrafficManagerNameAvailability include MsRestAzure - include MsRest::JSONable # @return [String] The relative name. attr_accessor :name diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_user_metrics_key_model.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_user_metrics_key_model.rb new file mode 100644 index 0000000000..cdae652367 --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_manager_user_metrics_key_model.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::ARM::TrafficManager + module Models + # + # Class representing a Traffic Manager Real User Metrics key response. + # + class TrafficManagerUserMetricsKeyModel < ProxyResource + + include MsRestAzure + + # @return [String] The key returned by the Realtime User Metrics + # operation. + attr_accessor :key + + + # + # Mapper for TrafficManagerUserMetricsKeyModel class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TrafficManagerUserMetricsKeyModel', + type: { + name: 'Composite', + class_name: 'TrafficManagerUserMetricsKeyModel', + 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' + } + }, + key: { + required: false, + serialized_name: 'properties.key', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb index 4ef76fd6ec..f02a7b923b 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/module_definition.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/module_definition.rb index f2e2a9bfb5..3136eed3ab 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/module_definition.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/profiles.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/profiles.rb index 281624b316..e3d1f8dc83 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/profiles.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/profiles.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -65,7 +65,7 @@ def check_traffic_manager_relative_dns_name_availability_with_http_info(paramete # def check_traffic_manager_relative_dns_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? + api_version = '2017-05-01' request_headers = {} @@ -87,7 +87,7 @@ def check_traffic_manager_relative_dns_name_availability_async(parameters, custo options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -162,7 +162,7 @@ def list_by_resource_group_with_http_info(resource_group_name, custom_headers = # 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? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -178,7 +178,7 @@ def list_by_resource_group_async(resource_group_name, custom_headers = nil) 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}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -245,7 +245,7 @@ def list_by_subscription_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_by_subscription_async(custom_headers = nil) - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -261,7 +261,7 @@ def list_by_subscription_async(custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -339,7 +339,7 @@ def get_with_http_info(resource_group_name, profile_name, custom_headers = nil) def get_async(resource_group_name, profile_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -355,7 +355,7 @@ def get_async(resource_group_name, profile_name, custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -440,7 +440,7 @@ def create_or_update_async(resource_group_name, profile_name, parameters, custom fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -464,7 +464,7 @@ def create_or_update_async(resource_group_name, profile_name, parameters, custom options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -556,7 +556,7 @@ def delete_with_http_info(resource_group_name, profile_name, custom_headers = ni def delete_async(resource_group_name, profile_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -572,7 +572,7 @@ def delete_async(resource_group_name, profile_name, custom_headers = nil) options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -657,7 +657,7 @@ def update_async(resource_group_name, profile_name, parameters, custom_headers = fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + api_version = '2017-05-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -681,7 +681,7 @@ def update_async(resource_group_name, profile_name, parameters, custom_headers = options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => @client.api_version}, + query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb index 7b753489d1..c53b74aa41 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -22,9 +22,6 @@ class TrafficManagerManagementClient < MsRestAzure::AzureServiceClient # for every service call. attr_accessor :subscription_id - # @return [String] Client Api Version. - attr_reader :api_version - # @return [String] Gets or sets the preferred language for the response. attr_accessor :accept_language @@ -45,6 +42,12 @@ class TrafficManagerManagementClient < MsRestAzure::AzureServiceClient # @return [GeographicHierarchies] geographic_hierarchies attr_reader :geographic_hierarchies + # @return [HeatMap] heat_map + attr_reader :heat_map + + # @return [TrafficManagerUserMetricsKeys] traffic_manager_user_metrics_keys + attr_reader :traffic_manager_user_metrics_keys + # # Creates initializes a new instance of the TrafficManagerManagementClient class. # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @@ -61,7 +64,8 @@ def initialize(credentials = nil, base_url = nil, options = nil) @endpoints = Endpoints.new(self) @profiles = Profiles.new(self) @geographic_hierarchies = GeographicHierarchies.new(self) - @api_version = '2017-05-01' + @heat_map = HeatMap.new(self) + @traffic_manager_user_metrics_keys = TrafficManagerUserMetricsKeys.new(self) @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true diff --git a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/traffic_manager_user_metrics_keys.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/traffic_manager_user_metrics_keys.rb new file mode 100644 index 0000000000..24791b891a --- /dev/null +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/traffic_manager_user_metrics_keys.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::ARM::TrafficManager + # + # TrafficManagerUserMetricsKeys + # + class TrafficManagerUserMetricsKeys + include MsRestAzure + + # + # Creates and initializes a new instance of the TrafficManagerUserMetricsKeys class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [TrafficManagerManagementClient] reference to the TrafficManagerManagementClient + attr_reader :client + + # + # Get the subscription-level key used for Realtime User Metrics collection. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TrafficManagerUserMetricsKeyModel] operation results. + # + def get_default(custom_headers = nil) + response = get_default_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Get the subscription-level key used for Realtime User Metrics collection. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_default_with_http_info(custom_headers = nil) + get_default_async(custom_headers).value! + end + + # + # Get the subscription-level key used for Realtime User Metrics collection. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_default_async(custom_headers = nil) + api_version = '2017-09-01-preview' + 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.Network/trafficManagerUserMetricsKeys/default' + + 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' => 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 || 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? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::TrafficManager::Models::TrafficManagerUserMetricsKeyModel.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 or update a subscription-level key used for Realtime User Metrics + # collection. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TrafficManagerUserMetricsKeyModel] operation results. + # + def create_or_update(custom_headers = nil) + response = create_or_update_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Create or update a subscription-level key used for Realtime User Metrics + # collection. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_with_http_info(custom_headers = nil) + create_or_update_async(custom_headers).value! + end + + # + # Create or update a subscription-level key used for Realtime User Metrics + # collection. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_async(custom_headers = nil) + api_version = '2017-09-01-preview' + 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.Network/trafficManagerUserMetricsKeys/default' + + 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' => 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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::TrafficManager::Models::TrafficManagerUserMetricsKeyModel.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a subscription-level key used for Realtime User Metrics collection. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DeleteOperationResult] operation results. + # + def delete(custom_headers = nil) + response = delete_async(custom_headers).value! + response.body unless response.nil? + end + + # + # Delete a subscription-level key used for Realtime User Metrics collection. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(custom_headers = nil) + delete_async(custom_headers).value! + end + + # + # Delete a subscription-level key used for Realtime User Metrics collection. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(custom_headers = nil) + api_version = '2017-09-01-preview' + 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.Network/trafficManagerUserMetricsKeys/default' + + 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' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::TrafficManager::Models::DeleteOperationResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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_traffic_manager/lib/generated/azure_mgmt_traffic_manager/version.rb b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/version.rb index 54a2a8ac21..fc08bb8a80 100644 --- a/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/version.rb +++ b/management/azure_mgmt_traffic_manager/lib/generated/azure_mgmt_traffic_manager/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::TrafficManager - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_web/azure_mgmt_web.gemspec b/management/azure_mgmt_web/azure_mgmt_web.gemspec index 4d21393c05..80474f28e3 100644 --- a/management/azure_mgmt_web/azure_mgmt_web.gemspec +++ b/management/azure_mgmt_web/azure_mgmt_web.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3' spec.add_development_dependency 'dotenv', '~> 2' - spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' + spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb old mode 100755 new mode 100644 index 41051e2de4..1741050273 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -33,131 +33,150 @@ module Azure::ARM::Web autoload :WebSiteManagementClient, 'generated/azure_mgmt_web/web_site_management_client.rb' module Models - autoload :ResourceNameAvailabilityRequest, 'generated/azure_mgmt_web/models/resource_name_availability_request.rb' - autoload :AppServiceCertificate, 'generated/azure_mgmt_web/models/app_service_certificate.rb' - autoload :SkuInfos, 'generated/azure_mgmt_web/models/sku_infos.rb' + autoload :DatabaseBackupSetting, 'generated/azure_mgmt_web/models/database_backup_setting.rb' + autoload :TriggeredWebJobCollection, 'generated/azure_mgmt_web/models/triggered_web_job_collection.rb' + autoload :AutoHealActions, 'generated/azure_mgmt_web/models/auto_heal_actions.rb' autoload :AppServiceCertificateCollection, 'generated/azure_mgmt_web/models/app_service_certificate_collection.rb' - autoload :ResourceMetricAvailability, 'generated/azure_mgmt_web/models/resource_metric_availability.rb' - autoload :GeoRegionCollection, 'generated/azure_mgmt_web/models/geo_region_collection.rb' - autoload :AppServiceCertificateOrderCollection, 'generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb' - autoload :SkuCapacity, 'generated/azure_mgmt_web/models/sku_capacity.rb' - autoload :SiteCloneabilityCriterion, 'generated/azure_mgmt_web/models/site_cloneability_criterion.rb' - autoload :GlobalCsmSkuDescription, 'generated/azure_mgmt_web/models/global_csm_sku_description.rb' - autoload :VirtualIPMapping, 'generated/azure_mgmt_web/models/virtual_ipmapping.rb' - autoload :ResourceMetric, 'generated/azure_mgmt_web/models/resource_metric.rb' + autoload :RequestsBasedTrigger, 'generated/azure_mgmt_web/models/requests_based_trigger.rb' + autoload :SlotSwapStatus, 'generated/azure_mgmt_web/models/slot_swap_status.rb' + autoload :StatusCodesBasedTrigger, 'generated/azure_mgmt_web/models/status_codes_based_trigger.rb' + autoload :WebAppCollection, 'generated/azure_mgmt_web/models/web_app_collection.rb' + autoload :SlowRequestsBasedTrigger, 'generated/azure_mgmt_web/models/slow_requests_based_trigger.rb' + autoload :NameIdentifier, 'generated/azure_mgmt_web/models/name_identifier.rb' + autoload :AutoHealTriggers, 'generated/azure_mgmt_web/models/auto_heal_triggers.rb' + autoload :SiteConfig, 'generated/azure_mgmt_web/models/site_config.rb' + autoload :AutoHealRules, 'generated/azure_mgmt_web/models/auto_heal_rules.rb' autoload :Resource, 'generated/azure_mgmt_web/models/resource.rb' - autoload :PremierAddOnOfferCollection, 'generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb' + autoload :AzureBlobStorageHttpLogsConfig, 'generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb' autoload :SiteSealRequest, 'generated/azure_mgmt_web/models/site_seal_request.rb' - autoload :ResourceNameAvailability, 'generated/azure_mgmt_web/models/resource_name_availability.rb' + autoload :AppServiceCertificate, 'generated/azure_mgmt_web/models/app_service_certificate.rb' autoload :Contact, 'generated/azure_mgmt_web/models/contact.rb' - autoload :ResourceMetricValue, 'generated/azure_mgmt_web/models/resource_metric_value.rb' + autoload :ResourceMetricProperty, 'generated/azure_mgmt_web/models/resource_metric_property.rb' autoload :DomainPurchaseConsent, 'generated/azure_mgmt_web/models/domain_purchase_consent.rb' - autoload :CertificateDetails, 'generated/azure_mgmt_web/models/certificate_details.rb' + autoload :BackupItemCollection, 'generated/azure_mgmt_web/models/backup_item_collection.rb' autoload :DomainAvailablilityCheckResult, 'generated/azure_mgmt_web/models/domain_availablility_check_result.rb' - autoload :SlotDifferenceCollection, 'generated/azure_mgmt_web/models/slot_difference_collection.rb' + autoload :BackupSchedule, 'generated/azure_mgmt_web/models/backup_schedule.rb' autoload :DomainControlCenterSsoRequest, 'generated/azure_mgmt_web/models/domain_control_center_sso_request.rb' - autoload :SourceControlCollection, 'generated/azure_mgmt_web/models/source_control_collection.rb' + autoload :SiteExtensionInfoCollection, 'generated/azure_mgmt_web/models/site_extension_info_collection.rb' autoload :DomainOwnershipIdentifierCollection, 'generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb' - autoload :SnapshotCollection, 'generated/azure_mgmt_web/models/snapshot_collection.rb' + autoload :CloningInfo, 'generated/azure_mgmt_web/models/cloning_info.rb' autoload :NameIdentifierCollection, 'generated/azure_mgmt_web/models/name_identifier_collection.rb' - autoload :ValidateRequest, 'generated/azure_mgmt_web/models/validate_request.rb' + autoload :ConnStringInfo, 'generated/azure_mgmt_web/models/conn_string_info.rb' autoload :TldLegalAgreementCollection, 'generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb' - autoload :ValidateResponseError, 'generated/azure_mgmt_web/models/validate_response_error.rb' + autoload :ConnStringValueTypePair, 'generated/azure_mgmt_web/models/conn_string_value_type_pair.rb' autoload :TopLevelDomainAgreementOption, 'generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb' - autoload :ValidateResponse, 'generated/azure_mgmt_web/models/validate_response.rb' + autoload :SlotDifferenceCollection, 'generated/azure_mgmt_web/models/slot_difference_collection.rb' autoload :HostingEnvironmentProfile, 'generated/azure_mgmt_web/models/hosting_environment_profile.rb' - autoload :FileSystemApplicationLogsConfig, 'generated/azure_mgmt_web/models/file_system_application_logs_config.rb' - autoload :CertificateCollection, 'generated/azure_mgmt_web/models/certificate_collection.rb' - autoload :AzureTableStorageApplicationLogsConfig, 'generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb' - autoload :AutoHealCustomAction, 'generated/azure_mgmt_web/models/auto_heal_custom_action.rb' - autoload :AzureBlobStorageApplicationLogsConfig, 'generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb' - autoload :RequestsBasedTrigger, 'generated/azure_mgmt_web/models/requests_based_trigger.rb' - autoload :ApplicationLogsConfig, 'generated/azure_mgmt_web/models/application_logs_config.rb' - autoload :SlowRequestsBasedTrigger, 'generated/azure_mgmt_web/models/slow_requests_based_trigger.rb' - autoload :AzureBlobStorageHttpLogsConfig, 'generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb' - autoload :AutoHealRules, 'generated/azure_mgmt_web/models/auto_heal_rules.rb' - autoload :DatabaseBackupSetting, 'generated/azure_mgmt_web/models/database_backup_setting.rb' - autoload :ConnStringInfo, 'generated/azure_mgmt_web/models/conn_string_info.rb' - autoload :WebAppCollection, 'generated/azure_mgmt_web/models/web_app_collection.rb' - autoload :HostNameSslState, 'generated/azure_mgmt_web/models/host_name_ssl_state.rb' - autoload :BackupItemCollection, 'generated/azure_mgmt_web/models/backup_item_collection.rb' - autoload :SiteMachineKey, 'generated/azure_mgmt_web/models/site_machine_key.rb' - autoload :BackupSchedule, 'generated/azure_mgmt_web/models/backup_schedule.rb' - autoload :VirtualDirectory, 'generated/azure_mgmt_web/models/virtual_directory.rb' autoload :SiteConfigResourceCollection, 'generated/azure_mgmt_web/models/site_config_resource_collection.rb' - autoload :RampUpRule, 'generated/azure_mgmt_web/models/ramp_up_rule.rb' - autoload :ConnStringValueTypePair, 'generated/azure_mgmt_web/models/conn_string_value_type_pair.rb' - autoload :SiteLimits, 'generated/azure_mgmt_web/models/site_limits.rb' - autoload :IpSecurityRestriction, 'generated/azure_mgmt_web/models/ip_security_restriction.rb' - autoload :CsmPublishingProfileOptions, 'generated/azure_mgmt_web/models/csm_publishing_profile_options.rb' - autoload :SlotSwapStatus, 'generated/azure_mgmt_web/models/slot_swap_status.rb' - autoload :CsmSiteRecoveryEntity, 'generated/azure_mgmt_web/models/csm_site_recovery_entity.rb' + autoload :CertificateCollection, 'generated/azure_mgmt_web/models/certificate_collection.rb' + autoload :ContinuousWebJobCollection, 'generated/azure_mgmt_web/models/continuous_web_job_collection.rb' autoload :DeletedWebAppCollection, 'generated/azure_mgmt_web/models/deleted_web_app_collection.rb' + autoload :CorsSettings, 'generated/azure_mgmt_web/models/cors_settings.rb' + autoload :Dimension, 'generated/azure_mgmt_web/models/dimension.rb' + autoload :CsmPublishingProfileOptions, 'generated/azure_mgmt_web/models/csm_publishing_profile_options.rb' + autoload :MetricSpecification, 'generated/azure_mgmt_web/models/metric_specification.rb' autoload :CsmSlotEntity, 'generated/azure_mgmt_web/models/csm_slot_entity.rb' - autoload :RecommendationRule, 'generated/azure_mgmt_web/models/recommendation_rule.rb' + autoload :CsmOperationDescriptionProperties, 'generated/azure_mgmt_web/models/csm_operation_description_properties.rb' autoload :LocalizableString, 'generated/azure_mgmt_web/models/localizable_string.rb' - autoload :CsmMoveResourceEnvelope, 'generated/azure_mgmt_web/models/csm_move_resource_envelope.rb' + autoload :CsmOperationCollection, 'generated/azure_mgmt_web/models/csm_operation_collection.rb' autoload :CsmUsageQuota, 'generated/azure_mgmt_web/models/csm_usage_quota.rb' - autoload :SiteCloneability, 'generated/azure_mgmt_web/models/site_cloneability.rb' + autoload :RecommendationRule, 'generated/azure_mgmt_web/models/recommendation_rule.rb' autoload :CsmUsageQuotaCollection, 'generated/azure_mgmt_web/models/csm_usage_quota_collection.rb' - autoload :AddressResponse, 'generated/azure_mgmt_web/models/address_response.rb' + autoload :CsmMoveResourceEnvelope, 'generated/azure_mgmt_web/models/csm_move_resource_envelope.rb' autoload :ErrorEntity, 'generated/azure_mgmt_web/models/error_entity.rb' - autoload :Address, 'generated/azure_mgmt_web/models/address.rb' - autoload :ResourceCollection, 'generated/azure_mgmt_web/models/resource_collection.rb' - autoload :VirtualNetworkProfile, 'generated/azure_mgmt_web/models/virtual_network_profile.rb' - autoload :HybridConnectionCollection, 'generated/azure_mgmt_web/models/hybrid_connection_collection.rb' - autoload :WorkerPool, 'generated/azure_mgmt_web/models/worker_pool.rb' + autoload :GeoRegionCollection, 'generated/azure_mgmt_web/models/geo_region_collection.rb' + autoload :SnapshotCollection, 'generated/azure_mgmt_web/models/snapshot_collection.rb' + autoload :GlobalCsmSkuDescription, 'generated/azure_mgmt_web/models/global_csm_sku_description.rb' + autoload :SiteCloneability, 'generated/azure_mgmt_web/models/site_cloneability.rb' + autoload :PremierAddOnOfferCollection, 'generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb' autoload :DeploymentCollection, 'generated/azure_mgmt_web/models/deployment_collection.rb' - autoload :TldLegalAgreement, 'generated/azure_mgmt_web/models/tld_legal_agreement.rb' + autoload :ResourceNameAvailabilityRequest, 'generated/azure_mgmt_web/models/resource_name_availability_request.rb' autoload :EnabledConfig, 'generated/azure_mgmt_web/models/enabled_config.rb' - autoload :TopLevelDomainCollection, 'generated/azure_mgmt_web/models/top_level_domain_collection.rb' + autoload :VirtualIPMapping, 'generated/azure_mgmt_web/models/virtual_ipmapping.rb' + autoload :RampUpRule, 'generated/azure_mgmt_web/models/ramp_up_rule.rb' + autoload :ResourceMetricCollection, 'generated/azure_mgmt_web/models/resource_metric_collection.rb' + autoload :Experiments, 'generated/azure_mgmt_web/models/experiments.rb' + autoload :ValidateResponseError, 'generated/azure_mgmt_web/models/validate_response_error.rb' autoload :FileSystemHttpLogsConfig, 'generated/azure_mgmt_web/models/file_system_http_logs_config.rb' - autoload :ApiDefinitionInfo, 'generated/azure_mgmt_web/models/api_definition_info.rb' - autoload :WorkerPoolCollection, 'generated/azure_mgmt_web/models/worker_pool_collection.rb' - autoload :StatusCodesBasedTrigger, 'generated/azure_mgmt_web/models/status_codes_based_trigger.rb' + autoload :ResourceMetricAvailability, 'generated/azure_mgmt_web/models/resource_metric_availability.rb' + autoload :SiteCloneabilityCriterion, 'generated/azure_mgmt_web/models/site_cloneability_criterion.rb' + autoload :ResourceMetricValue, 'generated/azure_mgmt_web/models/resource_metric_value.rb' + autoload :FunctionEnvelopeCollection, 'generated/azure_mgmt_web/models/function_envelope_collection.rb' + autoload :FileSystemApplicationLogsConfig, 'generated/azure_mgmt_web/models/file_system_application_logs_config.rb' + autoload :TriggeredJobHistoryCollection, 'generated/azure_mgmt_web/models/triggered_job_history_collection.rb' + autoload :AzureBlobStorageApplicationLogsConfig, 'generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb' + autoload :HandlerMapping, 'generated/azure_mgmt_web/models/handler_mapping.rb' + autoload :AutoHealCustomAction, 'generated/azure_mgmt_web/models/auto_heal_custom_action.rb' + autoload :AppServiceCertificateOrderCollection, 'generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb' autoload :HostNameBindingCollection, 'generated/azure_mgmt_web/models/host_name_binding_collection.rb' - autoload :CloningInfo, 'generated/azure_mgmt_web/models/cloning_info.rb' + autoload :ProxyOnlyResource, 'generated/azure_mgmt_web/models/proxy_only_resource.rb' + autoload :HostNameSslState, 'generated/azure_mgmt_web/models/host_name_ssl_state.rb' + autoload :SiteSeal, 'generated/azure_mgmt_web/models/site_seal.rb' autoload :HttpLogsConfig, 'generated/azure_mgmt_web/models/http_logs_config.rb' - autoload :NameValuePair, 'generated/azure_mgmt_web/models/name_value_pair.rb' + autoload :HostName, 'generated/azure_mgmt_web/models/host_name.rb' + autoload :ResourceCollection, 'generated/azure_mgmt_web/models/resource_collection.rb' + autoload :DomainCollection, 'generated/azure_mgmt_web/models/domain_collection.rb' + autoload :HybridConnectionCollection, 'generated/azure_mgmt_web/models/hybrid_connection_collection.rb' + autoload :DomainRecommendationSearchParameters, 'generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb' + autoload :WorkerPoolCollection, 'generated/azure_mgmt_web/models/worker_pool_collection.rb' + autoload :SiteMachineKey, 'generated/azure_mgmt_web/models/site_machine_key.rb' + autoload :IdentifierCollection, 'generated/azure_mgmt_web/models/identifier_collection.rb' + autoload :WebAppInstanceCollection, 'generated/azure_mgmt_web/models/web_app_instance_collection.rb' + autoload :IpSecurityRestriction, 'generated/azure_mgmt_web/models/ip_security_restriction.rb' + autoload :CsmOperationDisplay, 'generated/azure_mgmt_web/models/csm_operation_display.rb' autoload :UsageCollection, 'generated/azure_mgmt_web/models/usage_collection.rb' - autoload :VirtualApplication, 'generated/azure_mgmt_web/models/virtual_application.rb' + autoload :ServiceSpecification, 'generated/azure_mgmt_web/models/service_specification.rb' + autoload :MSDeployLogEntry, 'generated/azure_mgmt_web/models/msdeploy_log_entry.rb' + autoload :Recommendation, 'generated/azure_mgmt_web/models/recommendation.rb' autoload :StampCapacityCollection, 'generated/azure_mgmt_web/models/stamp_capacity_collection.rb' - autoload :PushSettings, 'generated/azure_mgmt_web/models/push_settings.rb' + autoload :WebJobCollection, 'generated/azure_mgmt_web/models/web_job_collection.rb' autoload :SkuInfoCollection, 'generated/azure_mgmt_web/models/sku_info_collection.rb' - autoload :ResourceMetricCollection, 'generated/azure_mgmt_web/models/resource_metric_collection.rb' - autoload :IdentifierCollection, 'generated/azure_mgmt_web/models/identifier_collection.rb' - autoload :Capability, 'generated/azure_mgmt_web/models/capability.rb' + autoload :ResourceMetricDefinitionCollection, 'generated/azure_mgmt_web/models/resource_metric_definition_collection.rb' autoload :SkuInfo, 'generated/azure_mgmt_web/models/sku_info.rb' - autoload :NameIdentifier, 'generated/azure_mgmt_web/models/name_identifier.rb' + autoload :SkuInfos, 'generated/azure_mgmt_web/models/sku_infos.rb' autoload :MetricAvailabilily, 'generated/azure_mgmt_web/models/metric_availabilily.rb' - autoload :HostName, 'generated/azure_mgmt_web/models/host_name.rb' + autoload :ValidateRequest, 'generated/azure_mgmt_web/models/validate_request.rb' + autoload :NameValuePair, 'generated/azure_mgmt_web/models/name_value_pair.rb' + autoload :ResourceMetric, 'generated/azure_mgmt_web/models/resource_metric.rb' autoload :HostingEnvironmentDiagnostics, 'generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb' - autoload :DomainRecommendationSearchParameters, 'generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb' - autoload :VnetInfo, 'generated/azure_mgmt_web/models/vnet_info.rb' - autoload :StampCapacity, 'generated/azure_mgmt_web/models/stamp_capacity.rb' + autoload :AzureTableStorageApplicationLogsConfig, 'generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb' autoload :AppServicePlanCollection, 'generated/azure_mgmt_web/models/app_service_plan_collection.rb' - autoload :AutoHealTriggers, 'generated/azure_mgmt_web/models/auto_heal_triggers.rb' + autoload :CertificateDetails, 'generated/azure_mgmt_web/models/certificate_details.rb' autoload :SkuDescription, 'generated/azure_mgmt_web/models/sku_description.rb' - autoload :HandlerMapping, 'generated/azure_mgmt_web/models/handler_mapping.rb' + autoload :SiteLimits, 'generated/azure_mgmt_web/models/site_limits.rb' + autoload :AppServiceEnvironmentCollection, 'generated/azure_mgmt_web/models/app_service_environment_collection.rb' + autoload :VirtualApplication, 'generated/azure_mgmt_web/models/virtual_application.rb' autoload :Operation, 'generated/azure_mgmt_web/models/operation.rb' - autoload :SiteConfig, 'generated/azure_mgmt_web/models/site_config.rb' + autoload :TldLegalAgreement, 'generated/azure_mgmt_web/models/tld_legal_agreement.rb' autoload :PerfMonSample, 'generated/azure_mgmt_web/models/perf_mon_sample.rb' - autoload :WebAppInstanceCollection, 'generated/azure_mgmt_web/models/web_app_instance_collection.rb' + autoload :DeletedSite, 'generated/azure_mgmt_web/models/deleted_site.rb' autoload :PerfMonSet, 'generated/azure_mgmt_web/models/perf_mon_set.rb' - autoload :DomainCollection, 'generated/azure_mgmt_web/models/domain_collection.rb' + autoload :CsmOperationDescription, 'generated/azure_mgmt_web/models/csm_operation_description.rb' autoload :PerfMonResponse, 'generated/azure_mgmt_web/models/perf_mon_response.rb' - autoload :AutoHealActions, 'generated/azure_mgmt_web/models/auto_heal_actions.rb' + autoload :SkuCapacity, 'generated/azure_mgmt_web/models/sku_capacity.rb' autoload :PerfMonCounterCollection, 'generated/azure_mgmt_web/models/perf_mon_counter_collection.rb' - autoload :Experiments, 'generated/azure_mgmt_web/models/experiments.rb' - autoload :AppServiceEnvironmentCollection, 'generated/azure_mgmt_web/models/app_service_environment_collection.rb' - autoload :SiteSeal, 'generated/azure_mgmt_web/models/site_seal.rb' + autoload :SourceControlCollection, 'generated/azure_mgmt_web/models/source_control_collection.rb' autoload :AppServiceEnvironment, 'generated/azure_mgmt_web/models/app_service_environment.rb' - autoload :CorsSettings, 'generated/azure_mgmt_web/models/cors_settings.rb' + autoload :ApiDefinitionInfo, 'generated/azure_mgmt_web/models/api_definition_info.rb' autoload :NetworkAccessControlEntry, 'generated/azure_mgmt_web/models/network_access_control_entry.rb' - autoload :ResourceMetricDefinitionCollection, 'generated/azure_mgmt_web/models/resource_metric_definition_collection.rb' + autoload :SnapshotRecoveryTarget, 'generated/azure_mgmt_web/models/snapshot_recovery_target.rb' + autoload :StampCapacity, 'generated/azure_mgmt_web/models/stamp_capacity.rb' + autoload :VirtualDirectory, 'generated/azure_mgmt_web/models/virtual_directory.rb' + autoload :WorkerPool, 'generated/azure_mgmt_web/models/worker_pool.rb' + autoload :MetricAvailability, 'generated/azure_mgmt_web/models/metric_availability.rb' + autoload :ProcessInfoCollection, 'generated/azure_mgmt_web/models/process_info_collection.rb' + autoload :ResourceNameAvailability, 'generated/azure_mgmt_web/models/resource_name_availability.rb' + autoload :ProcessModuleInfoCollection, 'generated/azure_mgmt_web/models/process_module_info_collection.rb' + autoload :ApplicationLogsConfig, 'generated/azure_mgmt_web/models/application_logs_config.rb' + autoload :ProcessThreadInfoCollection, 'generated/azure_mgmt_web/models/process_thread_info_collection.rb' + autoload :TopLevelDomainCollection, 'generated/azure_mgmt_web/models/top_level_domain_collection.rb' + autoload :VirtualNetworkProfile, 'generated/azure_mgmt_web/models/virtual_network_profile.rb' + autoload :ValidateResponse, 'generated/azure_mgmt_web/models/validate_response.rb' + autoload :PublicCertificateCollection, 'generated/azure_mgmt_web/models/public_certificate_collection.rb' + autoload :Capability, 'generated/azure_mgmt_web/models/capability.rb' + autoload :AddressResponse, 'generated/azure_mgmt_web/models/address_response.rb' + autoload :Address, 'generated/azure_mgmt_web/models/address.rb' autoload :ResourceMetricName, 'generated/azure_mgmt_web/models/resource_metric_name.rb' - autoload :Recommendation, 'generated/azure_mgmt_web/models/recommendation.rb' - autoload :ResourceMetricProperty, 'generated/azure_mgmt_web/models/resource_metric_property.rb' autoload :AppServiceCertificateResource, 'generated/azure_mgmt_web/models/app_service_certificate_resource.rb' autoload :AppServiceCertificateOrder, 'generated/azure_mgmt_web/models/app_service_certificate_order.rb' autoload :CertificateEmail, 'generated/azure_mgmt_web/models/certificate_email.rb' @@ -168,35 +187,49 @@ module Models autoload :DomainOwnershipIdentifier, 'generated/azure_mgmt_web/models/domain_ownership_identifier.rb' autoload :TopLevelDomain, 'generated/azure_mgmt_web/models/top_level_domain.rb' autoload :Certificate, 'generated/azure_mgmt_web/models/certificate.rb' - autoload :DeletedSite, 'generated/azure_mgmt_web/models/deleted_site.rb' autoload :GeoRegion, 'generated/azure_mgmt_web/models/geo_region.rb' autoload :PremierAddOnOffer, 'generated/azure_mgmt_web/models/premier_add_on_offer.rb' autoload :SourceControl, 'generated/azure_mgmt_web/models/source_control.rb' autoload :User, 'generated/azure_mgmt_web/models/user.rb' + autoload :VnetParameters, 'generated/azure_mgmt_web/models/vnet_parameters.rb' + autoload :VnetValidationTestFailure, 'generated/azure_mgmt_web/models/vnet_validation_test_failure.rb' + autoload :VnetValidationFailureDetails, 'generated/azure_mgmt_web/models/vnet_validation_failure_details.rb' autoload :BackupItem, 'generated/azure_mgmt_web/models/backup_item.rb' autoload :BackupRequest, 'generated/azure_mgmt_web/models/backup_request.rb' autoload :ConnectionStringDictionary, 'generated/azure_mgmt_web/models/connection_string_dictionary.rb' + autoload :ContinuousWebJob, 'generated/azure_mgmt_web/models/continuous_web_job.rb' autoload :CustomHostnameAnalysisResult, 'generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb' autoload :Deployment, 'generated/azure_mgmt_web/models/deployment.rb' + autoload :FunctionEnvelope, 'generated/azure_mgmt_web/models/function_envelope.rb' + autoload :FunctionSecrets, 'generated/azure_mgmt_web/models/function_secrets.rb' autoload :HostNameBinding, 'generated/azure_mgmt_web/models/host_name_binding.rb' autoload :HybridConnection, 'generated/azure_mgmt_web/models/hybrid_connection.rb' autoload :HybridConnectionKey, 'generated/azure_mgmt_web/models/hybrid_connection_key.rb' autoload :Identifier, 'generated/azure_mgmt_web/models/identifier.rb' + autoload :MSDeploy, 'generated/azure_mgmt_web/models/msdeploy.rb' + autoload :MSDeployLog, 'generated/azure_mgmt_web/models/msdeploy_log.rb' + autoload :MSDeployStatus, 'generated/azure_mgmt_web/models/msdeploy_status.rb' autoload :MigrateMySqlRequest, 'generated/azure_mgmt_web/models/migrate_my_sql_request.rb' autoload :MigrateMySqlStatus, 'generated/azure_mgmt_web/models/migrate_my_sql_status.rb' autoload :VnetRoute, 'generated/azure_mgmt_web/models/vnet_route.rb' + autoload :VnetInfo, 'generated/azure_mgmt_web/models/vnet_info.rb' autoload :RelayServiceConnectionEntity, 'generated/azure_mgmt_web/models/relay_service_connection_entity.rb' autoload :NetworkFeatures, 'generated/azure_mgmt_web/models/network_features.rb' autoload :PremierAddOn, 'generated/azure_mgmt_web/models/premier_add_on.rb' - autoload :RecoverResponse, 'generated/azure_mgmt_web/models/recover_response.rb' - autoload :ResourceHealthMetadata, 'generated/azure_mgmt_web/models/resource_health_metadata.rb' + autoload :ProcessThreadInfo, 'generated/azure_mgmt_web/models/process_thread_info.rb' + autoload :ProcessModuleInfo, 'generated/azure_mgmt_web/models/process_module_info.rb' + autoload :ProcessInfo, 'generated/azure_mgmt_web/models/process_info.rb' + autoload :PublicCertificate, 'generated/azure_mgmt_web/models/public_certificate.rb' + autoload :PushSettings, 'generated/azure_mgmt_web/models/push_settings.rb' autoload :ResourceMetricDefinition, 'generated/azure_mgmt_web/models/resource_metric_definition.rb' autoload :RestoreRequest, 'generated/azure_mgmt_web/models/restore_request.rb' autoload :RestoreResponse, 'generated/azure_mgmt_web/models/restore_response.rb' + autoload :SnapshotRecoveryRequest, 'generated/azure_mgmt_web/models/snapshot_recovery_request.rb' autoload :Site, 'generated/azure_mgmt_web/models/site.rb' autoload :SiteAuthSettings, 'generated/azure_mgmt_web/models/site_auth_settings.rb' autoload :SiteConfigResource, 'generated/azure_mgmt_web/models/site_config_resource.rb' autoload :SiteConfigurationSnapshotInfo, 'generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb' + autoload :SiteExtensionInfo, 'generated/azure_mgmt_web/models/site_extension_info.rb' autoload :SiteInstance, 'generated/azure_mgmt_web/models/site_instance.rb' autoload :SiteLogsConfig, 'generated/azure_mgmt_web/models/site_logs_config.rb' autoload :SitePhpErrorLogFlag, 'generated/azure_mgmt_web/models/site_php_error_log_flag.rb' @@ -207,7 +240,11 @@ module Models autoload :StorageMigrationOptions, 'generated/azure_mgmt_web/models/storage_migration_options.rb' autoload :StorageMigrationResponse, 'generated/azure_mgmt_web/models/storage_migration_response.rb' autoload :StringDictionary, 'generated/azure_mgmt_web/models/string_dictionary.rb' + autoload :TriggeredJobRun, 'generated/azure_mgmt_web/models/triggered_job_run.rb' + autoload :TriggeredJobHistory, 'generated/azure_mgmt_web/models/triggered_job_history.rb' + autoload :TriggeredWebJob, 'generated/azure_mgmt_web/models/triggered_web_job.rb' autoload :VnetGateway, 'generated/azure_mgmt_web/models/vnet_gateway.rb' + autoload :WebJob, 'generated/azure_mgmt_web/models/web_job.rb' autoload :AppServiceEnvironmentResource, 'generated/azure_mgmt_web/models/app_service_environment_resource.rb' autoload :AppServicePlan, 'generated/azure_mgmt_web/models/app_service_plan.rb' autoload :MetricDefinition, 'generated/azure_mgmt_web/models/metric_definition.rb' @@ -225,15 +262,6 @@ module Models autoload :HostNameType, 'generated/azure_mgmt_web/models/host_name_type.rb' autoload :DnsType, 'generated/azure_mgmt_web/models/dns_type.rb' autoload :DomainType, 'generated/azure_mgmt_web/models/domain_type.rb' - autoload :AutoHealActionType, 'generated/azure_mgmt_web/models/auto_heal_action_type.rb' - autoload :ConnectionStringType, 'generated/azure_mgmt_web/models/connection_string_type.rb' - autoload :UsageState, 'generated/azure_mgmt_web/models/usage_state.rb' - autoload :SiteAvailabilityState, 'generated/azure_mgmt_web/models/site_availability_state.rb' - autoload :SslState, 'generated/azure_mgmt_web/models/ssl_state.rb' - autoload :HostType, 'generated/azure_mgmt_web/models/host_type.rb' - autoload :ScmType, 'generated/azure_mgmt_web/models/scm_type.rb' - autoload :ManagedPipelineMode, 'generated/azure_mgmt_web/models/managed_pipeline_mode.rb' - autoload :SiteLoadBalancing, 'generated/azure_mgmt_web/models/site_load_balancing.rb' autoload :ResourceScopeType, 'generated/azure_mgmt_web/models/resource_scope_type.rb' autoload :NotificationLevel, 'generated/azure_mgmt_web/models/notification_level.rb' autoload :Channels, 'generated/azure_mgmt_web/models/channels.rb' @@ -242,17 +270,34 @@ module Models autoload :CheckNameResourceTypes, 'generated/azure_mgmt_web/models/check_name_resource_types.rb' autoload :ValidateResourceTypes, 'generated/azure_mgmt_web/models/validate_resource_types.rb' autoload :LogLevel, 'generated/azure_mgmt_web/models/log_level.rb' + autoload :AutoHealActionType, 'generated/azure_mgmt_web/models/auto_heal_action_type.rb' autoload :BackupItemStatus, 'generated/azure_mgmt_web/models/backup_item_status.rb' autoload :DatabaseType, 'generated/azure_mgmt_web/models/database_type.rb' autoload :FrequencyUnit, 'generated/azure_mgmt_web/models/frequency_unit.rb' autoload :BackupRestoreOperationType, 'generated/azure_mgmt_web/models/backup_restore_operation_type.rb' + autoload :ConnectionStringType, 'generated/azure_mgmt_web/models/connection_string_type.rb' + autoload :ContinuousWebJobStatus, 'generated/azure_mgmt_web/models/continuous_web_job_status.rb' + autoload :WebJobType, 'generated/azure_mgmt_web/models/web_job_type.rb' autoload :PublishingProfileFormat, 'generated/azure_mgmt_web/models/publishing_profile_format.rb' autoload :DnsVerificationTestResult, 'generated/azure_mgmt_web/models/dns_verification_test_result.rb' + autoload :SslState, 'generated/azure_mgmt_web/models/ssl_state.rb' + autoload :HostType, 'generated/azure_mgmt_web/models/host_type.rb' + autoload :MSDeployLogEntryType, 'generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb' + autoload :MSDeployProvisioningState, 'generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb' + autoload :MySqlMigrationType, 'generated/azure_mgmt_web/models/my_sql_migration_type.rb' autoload :OperationStatus, 'generated/azure_mgmt_web/models/operation_status.rb' autoload :RouteType, 'generated/azure_mgmt_web/models/route_type.rb' + autoload :PublicCertificateLocation, 'generated/azure_mgmt_web/models/public_certificate_location.rb' + autoload :UsageState, 'generated/azure_mgmt_web/models/usage_state.rb' + autoload :SiteAvailabilityState, 'generated/azure_mgmt_web/models/site_availability_state.rb' + autoload :ScmType, 'generated/azure_mgmt_web/models/scm_type.rb' + autoload :ManagedPipelineMode, 'generated/azure_mgmt_web/models/managed_pipeline_mode.rb' + autoload :SiteLoadBalancing, 'generated/azure_mgmt_web/models/site_load_balancing.rb' autoload :UnauthenticatedClientAction, 'generated/azure_mgmt_web/models/unauthenticated_client_action.rb' autoload :BuiltInAuthenticationProvider, 'generated/azure_mgmt_web/models/built_in_authentication_provider.rb' autoload :CloneAbilityResult, 'generated/azure_mgmt_web/models/clone_ability_result.rb' + autoload :SiteExtensionType, 'generated/azure_mgmt_web/models/site_extension_type.rb' + autoload :TriggeredWebJobStatus, 'generated/azure_mgmt_web/models/triggered_web_job_status.rb' autoload :HostingEnvironmentStatus, 'generated/azure_mgmt_web/models/hosting_environment_status.rb' autoload :InternalLoadBalancingMode, 'generated/azure_mgmt_web/models/internal_load_balancing_mode.rb' autoload :ComputeModeOptions, 'generated/azure_mgmt_web/models/compute_mode_options.rb' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_certificate_orders.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_certificate_orders.rb old mode 100755 new mode 100644 index 7e33a5f8ae..1077b201bb --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_certificate_orders.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_certificate_orders.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_environments.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_environments.rb old mode 100755 new mode 100644 index f76244a95f..fc6df9e467 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_environments.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_environments.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_plans.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_plans.rb old mode 100755 new mode 100644 index c23066f808..859a2a5037 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_plans.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_plans.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/certificates.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/certificates.rb old mode 100755 new mode 100644 index 886784e7d1..743e5239ee --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/certificates.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/certificates.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/deleted_web_apps.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/deleted_web_apps.rb old mode 100755 new mode 100644 index 06be4a0a39..8b9ce783e5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/deleted_web_apps.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/deleted_web_apps.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -81,102 +81,6 @@ def list_async(custom_headers = nil) headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeletedWebAppCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 deleted web apps in subscription. - # - # Gets deleted web apps in subscription. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Array] operation results. - # - def list_by_resource_group(resource_group_name, custom_headers = nil) - first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers) - first_page.get_all_items - end - - # - # Gets deleted web apps in subscription. - # - # Gets deleted web apps in subscription. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) - list_by_resource_group_async(resource_group_name, custom_headers).value! - end - - # - # Gets deleted web apps in subscription. - # - # Gets deleted web apps in subscription. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def list_by_resource_group_async(resource_group_name, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2016-03-01' - - - request_headers = {} - - # Set Headers - request_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.Web/deletedSites' - - 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' => 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| @@ -255,99 +159,6 @@ 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(:post, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeletedWebAppCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue 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 deleted web apps in subscription. - # - # Gets deleted web apps in 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 [DeletedWebAppCollection] operation results. - # - def list_by_resource_group_next(next_page_link, custom_headers = nil) - response = list_by_resource_group_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? - end - - # - # Gets deleted web apps in subscription. - # - # Gets deleted web apps in 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_resource_group_next_with_http_info(next_page_link, custom_headers = nil) - list_by_resource_group_next_async(next_page_link, custom_headers).value! - end - - # - # Gets deleted web apps in subscription. - # - # Gets deleted web apps in 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_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 @@ -414,29 +225,5 @@ def list_as_lazy(custom_headers = nil) end end - # - # Gets deleted web apps in subscription. - # - # Gets deleted web apps in subscription. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [DeletedWebAppCollection] which provide lazy access to pages of the - # response. - # - def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil) - response = list_by_resource_group_async(resource_group_name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_by_resource_group_next_async(next_page_link, custom_headers) - end - page - end - end - end end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/domains.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/domains.rb old mode 100755 new mode 100644 index ae96462833..f7f4c1d1de --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/domains.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/domains.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb old mode 100755 new mode 100644 index cddd7b60aa..fb35827d60 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address.rb old mode 100755 new mode 100644 index 7c15678495..03428ce516 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Address include MsRestAzure - include MsRest::JSONable # @return [String] Address 1. attr_accessor :address1 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address_response.rb old mode 100755 new mode 100644 index 759bf49d01..d7b45a1373 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AddressResponse include MsRestAzure - include MsRest::JSONable # @return [String] Main public virtual IP. attr_accessor :service_ip_address diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/api_definition_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/api_definition_info.rb old mode 100755 new mode 100644 index 9abdb4edfd..3ef99bfa81 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/api_definition_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/api_definition_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApiDefinitionInfo include MsRestAzure - include MsRest::JSONable # @return [String] The URL of the API definition. attr_accessor :url diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate.rb old mode 100755 new mode 100644 index ea91577141..9dd8055617 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AppServiceCertificate include MsRestAzure - include MsRest::JSONable # @return [String] Key Vault resource Id. attr_accessor :key_vault_id diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb old mode 100755 new mode 100644 index bf1457d683..b48c0998b8 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb old mode 100755 new mode 100644 index a8b77d707a..bf5eac38b1 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # SSL certificate purchase order. # - class AppServiceCertificateOrder < MsRestAzure::Resource + class AppServiceCertificateOrder < Resource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => AppServiceCertificate}] State of the Key Vault # secret. attr_accessor :certificates @@ -107,6 +106,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -128,6 +128,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb old mode 100755 new mode 100644 index 85ef6e0524..9a0944528b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb old mode 100755 new mode 100644 index b29aa8d2f1..bf71a0601e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Key Vault container ARM resource for a certificate that is purchased # through Azure. # - class AppServiceCertificateResource < MsRestAzure::Resource + class AppServiceCertificateResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Key Vault resource Id. attr_accessor :key_vault_id @@ -52,6 +51,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -73,6 +73,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment.rb old mode 100755 new mode 100644 index a6ca6f5e46..bcf4e28df9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AppServiceEnvironment include MsRestAzure - include MsRest::JSONable # @return [String] Name of the App Service Environment. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_collection.rb old mode 100755 new mode 100644 index 35b14fe145..1badc36952 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb old mode 100755 new mode 100644 index 626504688c..19bfdccaf3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # App Service Environment ARM resource. # - class AppServiceEnvironmentResource < MsRestAzure::Resource + class AppServiceEnvironmentResource < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Name of the App Service Environment. attr_accessor :app_service_environment_resource_name @@ -170,6 +169,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -191,6 +191,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb old mode 100755 new mode 100644 index cb0bb82f98..121aa21dee --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # App Service plan. # - class AppServicePlan < MsRestAzure::Resource + class AppServicePlan < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Name for the App Service plan. attr_accessor :app_service_plan_name @@ -92,6 +91,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -113,6 +113,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_collection.rb old mode 100755 new mode 100644 index 5922c4b0ea..d16e5bba5f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb old mode 100755 new mode 100644 index f53b8c5f2e..9e3beb9c30 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/application_logs_config.rb old mode 100755 new mode 100644 index dd651a508b..cf6d5a8ead --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/application_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/application_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ApplicationLogsConfig include MsRestAzure - include MsRest::JSONable # @return [FileSystemApplicationLogsConfig] Application logs to file # system configuration. attr_accessor :file_system diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb old mode 100755 new mode 100644 index b5457579d2..8850cb9e1c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb old mode 100755 new mode 100644 index d61bc8f8e3..29087748f3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AutoHealActions include MsRestAzure - include MsRest::JSONable # @return [AutoHealActionType] Predefined action to be taken. Possible # values include: 'Recycle', 'LogEvent', 'CustomAction' attr_accessor :action_type diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb old mode 100755 new mode 100644 index 41dd2d6ee8..24fbf2b15f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class AutoHealCustomAction include MsRestAzure - include MsRest::JSONable # @return [String] Executable to be run. attr_accessor :exe diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb old mode 100755 new mode 100644 index 3bd27fe6d8..6f621a6bd1 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AutoHealRules include MsRestAzure - include MsRest::JSONable # @return [AutoHealTriggers] Conditions that describe when to execute the # auto-heal actions. attr_accessor :triggers diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb old mode 100755 new mode 100644 index 144e3f8a4f..bbec07ab2c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AutoHealTriggers include MsRestAzure - include MsRest::JSONable # @return [RequestsBasedTrigger] A rule based on total requests. attr_accessor :requests diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb old mode 100755 new mode 100644 index 94f0af0cfd..b7af49cfb3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AzureBlobStorageApplicationLogsConfig include MsRestAzure - include MsRest::JSONable # @return [LogLevel] Log level. Possible values include: 'Off', # 'Verbose', 'Information', 'Warning', 'Error' attr_accessor :level diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb old mode 100755 new mode 100644 index d84ec6c101..0d6a6024bd --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AzureBlobStorageHttpLogsConfig include MsRestAzure - include MsRest::JSONable # @return [String] SAS url to a azure blob container with # read/write/list/delete permissions. attr_accessor :sas_url @@ -22,7 +21,8 @@ class AzureBlobStorageHttpLogsConfig # 0 or lower means no retention. attr_accessor :retention_in_days - # @return [Boolean] Enabled. + # @return [Boolean] True if configuration is enabled, false if it is + # disabled and null if configuration is not set. attr_accessor :enabled diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_resource_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_resource_type.rb old mode 100755 new mode 100644 index 5cae62bbfe..21bcf54b4f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_resource_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_resource_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb old mode 100755 new mode 100644 index 81ca29583c..3f0f640ae1 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class AzureTableStorageApplicationLogsConfig include MsRestAzure - include MsRest::JSONable # @return [LogLevel] Log level. Possible values include: 'Off', # 'Verbose', 'Information', 'Warning', 'Error' attr_accessor :level diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb old mode 100755 new mode 100644 index cbd0b21cd4..c0f0c91eb7 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Backup description. # - class BackupItem < MsRestAzure::Resource + class BackupItem < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Integer] Id of the backup. attr_accessor :backup_id @@ -87,6 +86,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -99,34 +99,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, backup_id: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_collection.rb old mode 100755 new mode 100644 index 017893b099..c55ca0d4db --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_status.rb old mode 100755 new mode 100644 index 952a54eae8..e042b3de21 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb old mode 100755 new mode 100644 index 99ac8081be..e147e9695c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a backup which will be performed. # - class BackupRequest < MsRestAzure::Resource + class BackupRequest < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Name of the backup. attr_accessor :backup_request_name @@ -33,7 +32,7 @@ class BackupRequest < MsRestAzure::Resource attr_accessor :databases # @return [BackupRestoreOperationType] Type of the backup. Possible - # values include: 'Default', 'Clone', 'Relocation' + # values include: 'Default', 'Clone', 'Relocation', 'Snapshot' attr_accessor :backup_request_type @@ -59,6 +58,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -71,34 +71,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, backup_request_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb old mode 100755 new mode 100644 index 33c69bd33d..0dbc8b06ff --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,6 +12,7 @@ module BackupRestoreOperationType Default = "Default" Clone = "Clone" Relocation = "Relocation" + Snapshot = "Snapshot" end end end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_schedule.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_schedule.rb old mode 100755 new mode 100644 index 6f1ce4b3bc..c70fb5bd5d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_schedule.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_schedule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class BackupSchedule include MsRestAzure - include MsRest::JSONable # @return [Integer] How often the backup should be executed (e.g. for # weekly backup, this should be set to 7 and FrequencyUnit should be set # to Day). Default value: 7 . diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb old mode 100755 new mode 100644 index 7d66749889..9083f4a23c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/capability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/capability.rb old mode 100755 new mode 100644 index 088bde96b4..fdaf9b3738 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/capability.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/capability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Capability include MsRestAzure - include MsRest::JSONable # @return [String] Name of the SKU capability. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb old mode 100755 new mode 100644 index 6cbf43fed5..fd1b742089 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # SSL certificate for an app. # - class Certificate < MsRestAzure::Resource + class Certificate < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Friendly name of the certificate. attr_accessor :friendly_name @@ -108,6 +107,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -129,6 +129,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_collection.rb old mode 100755 new mode 100644 index a53ac71e81..5869a6e8db --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_details.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_details.rb old mode 100755 new mode 100644 index 0bf5ec2b34..a9f1b1fb9a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_details.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_details.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CertificateDetails include MsRestAzure - include MsRest::JSONable # @return [Integer] Version. attr_accessor :version diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb old mode 100755 new mode 100644 index 64f10583a3..2a93f67009 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # SSL certificate email. # - class CertificateEmail < MsRestAzure::Resource + class CertificateEmail < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Email id. attr_accessor :email_id @@ -42,6 +41,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -54,34 +54,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, email_id: { required: false, serialized_name: 'properties.emailId', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb old mode 100755 new mode 100644 index cba2c9202c..96ace15c17 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Certificate order action. # - class CertificateOrderAction < MsRestAzure::Resource + class CertificateOrderAction < Resource include MsRestAzure - include MsRest::JSONable # @return [CertificateOrderActionType] Action type. Possible values # include: 'CertificateIssued', 'CertificateOrderCanceled', # 'CertificateOrderCreated', 'CertificateRevoked', @@ -48,6 +47,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -69,6 +69,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb old mode 100755 new mode 100644 index c305ae26c6..0e62783f55 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_status.rb old mode 100755 new mode 100644 index 2d098c3f95..2b74cc3690 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_product_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_product_type.rb old mode 100755 new mode 100644 index 7e6d15fc7b..b06d068857 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_product_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_product_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/channels.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/channels.rb old mode 100755 new mode 100644 index d4cf94a416..8f80a78d58 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/channels.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/channels.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb old mode 100755 new mode 100644 index c7fbc0a692..d44d767da2 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/clone_ability_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/clone_ability_result.rb old mode 100755 new mode 100644 index fd4ff9849b..97fc963925 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/clone_ability_result.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/clone_ability_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cloning_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cloning_info.rb old mode 100755 new mode 100644 index 6b33cbdf20..91f9fe12c7 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cloning_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cloning_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CloningInfo include MsRestAzure - include MsRest::JSONable # @return [String] Correlation ID of cloning operation. This ID ties # multiple cloning operations # together to use the same snapshot. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/compute_mode_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/compute_mode_options.rb old mode 100755 new mode 100644 index f26aec2030..403a2f2c2c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/compute_mode_options.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/compute_mode_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_info.rb old mode 100755 new mode 100644 index 7cd99f7db4..86444a9995 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnStringInfo include MsRestAzure - include MsRest::JSONable # @return [String] Name of connection string. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb old mode 100755 new mode 100644 index 8cc74111de..e20ccff033 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ConnStringValueTypePair include MsRestAzure - include MsRest::JSONable # @return [String] Value of pair. attr_accessor :value diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb old mode 100755 new mode 100644 index a675ecf57c..e98526829a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # String dictionary resource. # - class ConnectionStringDictionary < MsRestAzure::Resource + class ConnectionStringDictionary < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => ConnStringValueTypePair}] Connection strings. attr_accessor :properties @@ -39,6 +38,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +51,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, properties: { required: false, serialized_name: 'properties', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_type.rb old mode 100755 new mode 100644 index a9f2919f54..ac74bb92d5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/contact.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/contact.rb old mode 100755 new mode 100644 index f299474961..e9417f93be --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/contact.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/contact.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -15,7 +15,6 @@ class Contact include MsRestAzure - include MsRest::JSONable # @return [Address] Mailing address. attr_accessor :address_mailing diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job.rb new file mode 100644 index 0000000000..c6a9179579 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job.rb @@ -0,0 +1,180 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Continuous Web Job Information. + # + class ContinuousWebJob < ProxyOnlyResource + + include MsRestAzure + + # @return [ContinuousWebJobStatus] Job status. Possible values include: + # 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped' + attr_accessor :status + + # @return [String] Detailed status. + attr_accessor :detailed_status + + # @return [String] Log URL. + attr_accessor :log_url + + # @return [String] Job name. Used as job identifier in ARM resource URI. + attr_accessor :continuous_web_job_name + + # @return [String] Run command. + attr_accessor :run_command + + # @return [String] Job URL. + attr_accessor :url + + # @return [String] Extra Info URL. + attr_accessor :extra_info_url + + # @return [WebJobType] Job type. Possible values include: 'Continuous', + # 'Triggered' + attr_accessor :job_type + + # @return [String] Error information. + attr_accessor :error + + # @return [Boolean] Using SDK? + attr_accessor :using_sdk + + # @return Job settings. + attr_accessor :settings + + + # + # Mapper for ContinuousWebJob class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContinuousWebJob', + type: { + name: 'Composite', + class_name: 'ContinuousWebJob', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'Enum', + module: 'ContinuousWebJobStatus' + } + }, + detailed_status: { + required: false, + serialized_name: 'properties.detailedStatus', + type: { + name: 'String' + } + }, + log_url: { + required: false, + serialized_name: 'properties.logUrl', + type: { + name: 'String' + } + }, + continuous_web_job_name: { + required: false, + read_only: true, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + run_command: { + required: false, + serialized_name: 'properties.runCommand', + type: { + name: 'String' + } + }, + url: { + required: false, + serialized_name: 'properties.url', + type: { + name: 'String' + } + }, + extra_info_url: { + required: false, + serialized_name: 'properties.extraInfoUrl', + type: { + name: 'String' + } + }, + job_type: { + required: false, + serialized_name: 'properties.jobType', + type: { + name: 'Enum', + module: 'WebJobType' + } + }, + error: { + required: false, + serialized_name: 'properties.error', + type: { + name: 'String' + } + }, + using_sdk: { + required: false, + serialized_name: 'properties.usingSdk', + type: { + name: 'Boolean' + } + }, + settings: { + required: false, + serialized_name: 'properties.settings', + type: { + name: 'Object' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job_collection.rb new file mode 100644 index 0000000000..27acc6a231 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job_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::ARM::Web + module Models + # + # Collection of Kudu continuous web job information elements. + # + class ContinuousWebJobCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [ContinuousWebJobCollection] 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 ContinuousWebJobCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContinuousWebJobCollection', + type: { + name: 'Composite', + class_name: 'ContinuousWebJobCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ContinuousWebJobElementType', + type: { + name: 'Composite', + class_name: 'ContinuousWebJob' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job_status.rb new file mode 100644 index 0000000000..8933e6b2f5 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/continuous_web_job_status.rb @@ -0,0 +1,19 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Defines values for ContinuousWebJobStatus + # + module ContinuousWebJobStatus + Initializing = "Initializing" + Starting = "Starting" + Running = "Running" + PendingRestart = "PendingRestart" + Stopped = "Stopped" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cors_settings.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cors_settings.rb old mode 100755 new mode 100644 index 1ab77c8a53..8aa9396565 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cors_settings.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cors_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CorsSettings include MsRestAzure - include MsRest::JSONable # @return [Array] Gets or sets the list of origins that should be # allowed to make cross-origin # calls (for example: http://example.com:12345). Use "*" to allow all. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb old mode 100755 new mode 100644 index 6550bbe743..09c02a55fb --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class CsmMoveResourceEnvelope include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :target_resource_group diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_collection.rb new file mode 100644 index 0000000000..ead37903df --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_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::ARM::Web + module Models + # + # Collection of Azure resource manager operation metadata. + # + class CsmOperationCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [CsmOperationCollection] 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 CsmOperationCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationCollection', + type: { + name: 'Composite', + class_name: 'CsmOperationCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CsmOperationDescriptionElementType', + type: { + name: 'Composite', + class_name: 'CsmOperationDescription' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description.rb new file mode 100644 index 0000000000..5bb152f749 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description.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::ARM::Web + module Models + # + # Model object. + # + # + class CsmOperationDescription + + include MsRestAzure + + # @return [String] + attr_accessor :name + + # @return [CsmOperationDisplay] + attr_accessor :display + + # @return [String] + attr_accessor :origin + + # @return [CsmOperationDescriptionProperties] + attr_accessor :properties + + + # + # Mapper for CsmOperationDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationDescription', + type: { + name: 'Composite', + class_name: 'CsmOperationDescription', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'CsmOperationDisplay' + } + }, + origin: { + required: false, + serialized_name: 'origin', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CsmOperationDescriptionProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description_properties.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description_properties.rb new file mode 100644 index 0000000000..abb585aca4 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description_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::ARM::Web + module Models + # + # Model object. + # + # + class CsmOperationDescriptionProperties + + include MsRestAzure + + # @return [ServiceSpecification] + attr_accessor :service_specification + + + # + # Mapper for CsmOperationDescriptionProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationDescriptionProperties', + type: { + name: 'Composite', + class_name: 'CsmOperationDescriptionProperties', + model_properties: { + service_specification: { + required: false, + serialized_name: 'serviceSpecification', + type: { + name: 'Composite', + class_name: 'ServiceSpecification' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_display.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_display.rb new file mode 100644 index 0000000000..93ac46bcb1 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_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::ARM::Web + module Models + # + # Model object. + # + # + class CsmOperationDisplay + + include MsRestAzure + + # @return [String] + attr_accessor :provider + + # @return [String] + attr_accessor :resource + + # @return [String] + attr_accessor :operation + + # @return [String] + attr_accessor :description + + + # + # Mapper for CsmOperationDisplay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationDisplay', + type: { + name: 'Composite', + class_name: 'CsmOperationDisplay', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb old mode 100755 new mode 100644 index b773159f9e..3f1bd0efad --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CsmPublishingProfileOptions include MsRestAzure - include MsRest::JSONable # @return [PublishingProfileFormat] Name of the format. Valid values are: # FileZilla3 # WebDeploy -- default diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb deleted file mode 100755 index ff7633abcb..0000000000 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb +++ /dev/null @@ -1,68 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::Web - module Models - # - # Details about app recovery operation. - # - class CsmSiteRecoveryEntity - - include MsRestAzure - - include MsRest::JSONable - # @return [DateTime] Point in time in which the app recovery should be - # attempted. - attr_accessor :snapshot_time - - # @return [String] [Optional] Destination app name into which app should - # be recovered. This is case when new app should be created instead. - attr_accessor :site_name - - # @return [String] [Optional] Destination app slot name into which app - # should be recovered. - attr_accessor :slot_name - - - # - # Mapper for CsmSiteRecoveryEntity class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'CsmSiteRecoveryEntity', - type: { - name: 'Composite', - class_name: 'CsmSiteRecoveryEntity', - model_properties: { - snapshot_time: { - required: false, - serialized_name: 'snapshotTime', - type: { - name: 'DateTime' - } - }, - site_name: { - required: false, - serialized_name: 'siteName', - type: { - name: 'String' - } - }, - slot_name: { - required: false, - serialized_name: 'slotName', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb old mode 100755 new mode 100644 index 614c570bb4..eaf249c3b0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CsmSlotEntity include MsRestAzure - include MsRest::JSONable # @return [String] Destination deployment slot during swap operation. attr_accessor :target_slot diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb old mode 100755 new mode 100644 index 8371ad0d10..fc838fc56b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class CsmUsageQuota include MsRestAzure - include MsRest::JSONable # @return [String] Units of measurement for the quota resourse. attr_accessor :unit diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb old mode 100755 new mode 100644 index bdedf91d54..34fa96b894 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb old mode 100755 new mode 100644 index 012c6fc8c1..9118c5d02c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb old mode 100755 new mode 100644 index 84bec5fb1f..a1f47cd4a0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Custom domain analysis. # - class CustomHostnameAnalysisResult < MsRestAzure::Resource + class CustomHostnameAnalysisResult < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Boolean] true if hostname is already verified; # otherwise, false. attr_accessor :is_hostname_already_verified @@ -79,6 +78,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -91,34 +91,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, is_hostname_already_verified: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_backup_setting.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_backup_setting.rb old mode 100755 new mode 100644 index e56e803529..ab6fe2acb7 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_backup_setting.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_backup_setting.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DatabaseBackupSetting include MsRestAzure - include MsRest::JSONable # @return [DatabaseType] Database type (e.g. SqlAzure / MySql). Possible # values include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql' attr_accessor :database_type diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_type.rb old mode 100755 new mode 100644 index 8a6c43c49d..6535a21c40 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb old mode 100755 new mode 100644 index b31dd48337..a916bc764a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,142 +8,24 @@ module Models # # A deleted app. # - class DeletedSite < MsRestAzure::Resource + class DeletedSite include MsRestAzure - include MsRest::JSONable - # @return [DateTime] Time in UTC when the app was deleted. - attr_accessor :deleted_timestamp - - # @return [String] Current state of the app. - attr_accessor :state - - # @return [Array] Hostnames associated with the app. - attr_accessor :host_names - - # @return [String] Name of the repository site. - attr_accessor :repository_site_name - - # @return [UsageState] State indicating whether the app has exceeded its - # quota usage. Read-only. Possible values include: 'Normal', 'Exceeded' - attr_accessor :usage_state - - # @return [Boolean] true if the app is enabled; otherwise, - # false. Setting this value to false disables the app (takes - # the app offline). - attr_accessor :enabled - - # @return [Array] Enabled hostnames for the app.Hostnames need to - # be assigned (see HostNames) AND enabled. Otherwise, - # the app is not served on those hostnames. - attr_accessor :enabled_host_names - - # @return [SiteAvailabilityState] Management information availability - # state for the app. Possible values include: 'Normal', 'Limited', - # 'DisasterRecoveryMode' - attr_accessor :availability_state - - # @return [Array] Hostname SSL states are used to - # manage the SSL bindings for app's hostnames. - attr_accessor :host_name_ssl_states - - # @return [String] Resource ID of the associated App Service plan, - # formatted as: - # "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - attr_accessor :server_farm_id - - # @return [Boolean] true if reserved; otherwise, - # false. Default value: false . - attr_accessor :reserved - - # @return [DateTime] Last time the app was modified, in UTC. Read-only. - attr_accessor :last_modified_time_utc - - # @return [SiteConfig] Configuration of the app. - attr_accessor :site_config - - # @return [Array] Azure Traffic Manager hostnames associated with - # the app. Read-only. - attr_accessor :traffic_manager_host_names - - # @return [Boolean] Indicates whether app is deployed as a premium app. - attr_accessor :premium_app_deployed - - # @return [Boolean] true to stop SCM (KUDU) site when the - # app is stopped; otherwise, false. The default is - # false. Default value: false . - attr_accessor :scm_site_also_stopped - - # @return [String] Specifies which deployment slot this app will swap - # into. Read-only. - attr_accessor :target_swap_slot - - # @return [HostingEnvironmentProfile] App Service Environment to use for - # the app. - attr_accessor :hosting_environment_profile - - # @return [String] Micro services like apps, logic apps. Default value: - # 'WebSites' . - attr_accessor :micro_service - - # @return [String] Name of gateway app associated with the app. - attr_accessor :gateway_site_name - - # @return [Boolean] true to enable client affinity; - # false to stop sending session affinity cookies, which - # route client requests in the same session to the same instance. Default - # is true. - attr_accessor :client_affinity_enabled - - # @return [Boolean] true to enable client certificate - # authentication (TLS mutual authentication); otherwise, - # false. Default is false. - attr_accessor :client_cert_enabled - - # @return [Boolean] true to disable the public hostnames of - # the app; otherwise, false. - # If true, the app is only accessible via API management - # process. - attr_accessor :host_names_disabled - - # @return [String] List of IP addresses that the app uses for outbound - # connections (e.g. database access). Read-only. - attr_accessor :outbound_ip_addresses - - # @return [Integer] Size of the function container. - attr_accessor :container_size + # @return [Integer] Numeric id for the deleted site + attr_accessor :id - # @return [Integer] Maximum allowed daily memory-time quota (applicable - # on dynamic apps only). - attr_accessor :daily_memory_time_quota - - # @return [DateTime] App suspended till in case memory-time quota is - # exceeded. - attr_accessor :suspended_till - - # @return [Integer] Maximum number of workers. - # This only applies to Functions container. - attr_accessor :max_number_of_workers + # @return [String] Time in UTC when the app was deleted. + attr_accessor :deleted_timestamp - # @return [CloningInfo] If specified during app creation, the app is - # cloned from a source app. - attr_accessor :cloning_info + # @return [String] Subscription containing the deleted site + attr_accessor :subscription - # @return [String] Name of the resource group the app belongs to. - # Read-only. + # @return [String] ResourceGroup that contained the deleted site attr_accessor :resource_group - # @return [Boolean] true if the app is a default container; - # otherwise, false. - attr_accessor :is_default_container - - # @return [String] Default hostname of the app. Read-only. - attr_accessor :default_host_name - - # @return [SlotSwapStatus] Status of the last deployment slot swap - # operation. - attr_accessor :slot_swap_status + # @return [String] Name of the deleted site + attr_accessor :name # @@ -160,340 +42,42 @@ def self.mapper() model_properties: { id: { required: false, - read_only: true, serialized_name: 'id', type: { - name: 'String' - } - }, - name: { - required: false, - serialized_name: 'name', - type: { - name: 'String' - } - }, - kind: { - required: false, - serialized_name: 'kind', - type: { - name: 'String' - } - }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, - type: { - required: false, - serialized_name: 'type', - type: { - name: 'String' - } - }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } + name: 'Number' } }, deleted_timestamp: { required: false, read_only: true, - serialized_name: 'properties.deletedTimestamp', - type: { - name: 'DateTime' - } - }, - state: { - required: false, - read_only: true, - serialized_name: 'properties.state', - type: { - name: 'String' - } - }, - host_names: { - required: false, - read_only: true, - serialized_name: 'properties.hostNames', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - repository_site_name: { - required: false, - read_only: true, - serialized_name: 'properties.repositorySiteName', - type: { - name: 'String' - } - }, - usage_state: { - required: false, - read_only: true, - serialized_name: 'properties.usageState', - type: { - name: 'Enum', - module: 'UsageState' - } - }, - enabled: { - required: false, - serialized_name: 'properties.enabled', - type: { - name: 'Boolean' - } - }, - enabled_host_names: { - required: false, - read_only: true, - serialized_name: 'properties.enabledHostNames', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - availability_state: { - required: false, - read_only: true, - serialized_name: 'properties.availabilityState', - type: { - name: 'Enum', - module: 'SiteAvailabilityState' - } - }, - host_name_ssl_states: { - required: false, - serialized_name: 'properties.hostNameSslStates', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'HostNameSslStateElementType', - type: { - name: 'Composite', - class_name: 'HostNameSslState' - } - } - } - }, - server_farm_id: { - required: false, - serialized_name: 'properties.serverFarmId', - type: { - name: 'String' - } - }, - reserved: { - required: false, - serialized_name: 'properties.reserved', - default_value: false, - type: { - name: 'Boolean' - } - }, - last_modified_time_utc: { - required: false, - read_only: true, - serialized_name: 'properties.lastModifiedTimeUtc', - type: { - name: 'DateTime' - } - }, - site_config: { - required: false, - serialized_name: 'properties.siteConfig', - type: { - name: 'Composite', - class_name: 'SiteConfig' - } - }, - traffic_manager_host_names: { - required: false, - read_only: true, - serialized_name: 'properties.trafficManagerHostNames', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - premium_app_deployed: { - required: false, - read_only: true, - serialized_name: 'properties.premiumAppDeployed', - type: { - name: 'Boolean' - } - }, - scm_site_also_stopped: { - required: false, - serialized_name: 'properties.scmSiteAlsoStopped', - default_value: false, - type: { - name: 'Boolean' - } - }, - target_swap_slot: { - required: false, - read_only: true, - serialized_name: 'properties.targetSwapSlot', - type: { - name: 'String' - } - }, - hosting_environment_profile: { - required: false, - serialized_name: 'properties.hostingEnvironmentProfile', - type: { - name: 'Composite', - class_name: 'HostingEnvironmentProfile' - } - }, - micro_service: { - required: false, - serialized_name: 'properties.microService', - default_value: 'WebSites', - type: { - name: 'String' - } - }, - gateway_site_name: { - required: false, - serialized_name: 'properties.gatewaySiteName', + serialized_name: 'deletedTimestamp', type: { name: 'String' } }, - client_affinity_enabled: { - required: false, - serialized_name: 'properties.clientAffinityEnabled', - type: { - name: 'Boolean' - } - }, - client_cert_enabled: { - required: false, - serialized_name: 'properties.clientCertEnabled', - type: { - name: 'Boolean' - } - }, - host_names_disabled: { - required: false, - serialized_name: 'properties.hostNamesDisabled', - type: { - name: 'Boolean' - } - }, - outbound_ip_addresses: { + subscription: { required: false, read_only: true, - serialized_name: 'properties.outboundIpAddresses', + serialized_name: 'subscription', type: { name: 'String' } }, - container_size: { - required: false, - serialized_name: 'properties.containerSize', - type: { - name: 'Number' - } - }, - daily_memory_time_quota: { - required: false, - serialized_name: 'properties.dailyMemoryTimeQuota', - type: { - name: 'Number' - } - }, - suspended_till: { - required: false, - read_only: true, - serialized_name: 'properties.suspendedTill', - type: { - name: 'DateTime' - } - }, - max_number_of_workers: { - required: false, - read_only: true, - serialized_name: 'properties.maxNumberOfWorkers', - type: { - name: 'Number' - } - }, - cloning_info: { - required: false, - serialized_name: 'properties.cloningInfo', - type: { - name: 'Composite', - class_name: 'CloningInfo' - } - }, resource_group: { required: false, read_only: true, - serialized_name: 'properties.resourceGroup', + serialized_name: 'resourceGroup', type: { name: 'String' } }, - is_default_container: { - required: false, - read_only: true, - serialized_name: 'properties.isDefaultContainer', - type: { - name: 'Boolean' - } - }, - default_host_name: { + name: { required: false, read_only: true, - serialized_name: 'properties.defaultHostName', + serialized_name: 'name', type: { name: 'String' } - }, - slot_swap_status: { - required: false, - read_only: true, - serialized_name: 'properties.slotSwapStatus', - type: { - name: 'Composite', - class_name: 'SlotSwapStatus' - } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_web_app_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_web_app_collection.rb old mode 100755 new mode 100644 index 8e2dbf912f..d045bff71e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_web_app_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_web_app_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb old mode 100755 new mode 100644 index 1584a7b76b..83f81e7d31 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,24 +8,23 @@ module Models # # User crendentials used for publishing activity. # - class Deployment < MsRestAzure::Resource + class Deployment < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable - # @return [String] ID. + # @return [String] Identifier for deployment. attr_accessor :deployment_id - # @return [Integer] Status. + # @return [Integer] Deployment status. attr_accessor :status - # @return [String] Message. + # @return [String] Details about deployment status. attr_accessor :message - # @return [String] Author. + # @return [String] Who authored the deployment. attr_accessor :author - # @return [String] Deployer. + # @return [String] Who performed the deployment. attr_accessor :deployer # @return [String] Author email. @@ -37,10 +36,11 @@ class Deployment < MsRestAzure::Resource # @return [DateTime] End time. attr_accessor :end_time - # @return [Boolean] Active. + # @return [Boolean] True if deployment is currently active, false if + # completed and null if not started. attr_accessor :active - # @return [String] Detail. + # @return [String] Details on deployment. attr_accessor :details @@ -66,6 +66,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -78,34 +79,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, deployment_id: { required: false, serialized_name: 'properties.id', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment_collection.rb old mode 100755 new mode 100644 index 479a51a5f7..bd8d0f3b35 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dimension.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dimension.rb new file mode 100644 index 0000000000..12bece5b9b --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dimension.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::ARM::Web + module Models + # + # Model object. + # + # + class Dimension + + include MsRestAzure + + # @return [String] + attr_accessor :name + + # @return [String] + attr_accessor :display_name + + # @return [String] + attr_accessor :internal_name + + # @return [Boolean] + attr_accessor :to_be_exported_for_shoebox + + + # + # Mapper for Dimension class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Dimension', + type: { + name: 'Composite', + class_name: 'Dimension', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + internal_name: { + required: false, + serialized_name: 'internalName', + type: { + name: 'String' + } + }, + to_be_exported_for_shoebox: { + required: false, + serialized_name: 'toBeExportedForShoebox', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_type.rb old mode 100755 new mode 100644 index fe26ff0190..111b2c265b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb old mode 100755 new mode 100644 index 549e60a2c4..9efa11a478 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb old mode 100755 new mode 100644 index 72ad8046e2..baebc41e95 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Information about a domain. # - class Domain < MsRestAzure::Resource + class Domain < Resource include MsRestAzure - include MsRest::JSONable # @return [Contact] Administrative contact. attr_accessor :contact_admin @@ -110,6 +109,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -131,6 +131,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb old mode 100755 new mode 100644 index d9345f1894..658691692d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DomainAvailablilityCheckResult include MsRestAzure - include MsRest::JSONable # @return [String] Name of the domain. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_collection.rb old mode 100755 new mode 100644 index 3470275e47..9840772622 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb old mode 100755 new mode 100644 index 45c9643aea..41970395c0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DomainControlCenterSsoRequest include MsRestAzure - include MsRest::JSONable # @return [String] URL where the single sign-on request is to be made. attr_accessor :url diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb old mode 100755 new mode 100644 index 3d64f5fdfc..96b25aedd2 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Domain ownership Identifier. # - class DomainOwnershipIdentifier < MsRestAzure::Resource + class DomainOwnershipIdentifier < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Ownership Id. attr_accessor :ownership_id @@ -39,6 +38,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,6 +60,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb old mode 100755 new mode 100644 index d9129d5e0e..bb0815cf7f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb old mode 100755 new mode 100644 index 94faef6a10..b303fa821f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class DomainPurchaseConsent include MsRestAzure - include MsRest::JSONable # @return [Array] List of applicable legal agreement keys. This # list can be retrieved using ListLegalAgreements API under # TopLevelDomain resource. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb old mode 100755 new mode 100644 index c53ca6bf5d..5479eeb227 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class DomainRecommendationSearchParameters include MsRestAzure - include MsRest::JSONable # @return [String] Keywords to be used for generating domain # recommendations. attr_accessor :keywords diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_status.rb old mode 100755 new mode 100644 index 09072ca4f2..d821c58b6d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_type.rb old mode 100755 new mode 100644 index b4b6cd1697..d26dbdf221 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb old mode 100755 new mode 100644 index 3731d10f0e..191ffcf1db --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,8 +12,8 @@ class EnabledConfig include MsRestAzure - include MsRest::JSONable - # @return [Boolean] Enabled. + # @return [Boolean] True if configuration is enabled, false if it is + # disabled and null if configuration is not set. attr_accessor :enabled diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb old mode 100755 new mode 100644 index a3d4439649..4672c42fd3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,12 @@ class ErrorEntity include MsRestAzure - include MsRest::JSONable + # @return [String] Basic error code. + attr_accessor :code + + # @return [String] Any details of the error. + attr_accessor :message + # @return [String] Type of error. attr_accessor :extended_code @@ -25,12 +30,6 @@ class ErrorEntity # @return [Array] Inner errors. attr_accessor :inner_errors - # @return [String] Basic error code. - attr_accessor :code - - # @return [String] Any details of the error. - attr_accessor :message - # # Mapper for ErrorEntity class as Ruby Hash. @@ -44,6 +43,20 @@ def self.mapper() name: 'Composite', class_name: 'ErrorEntity', model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, extended_code: { required: false, serialized_name: 'extendedCode', @@ -86,20 +99,6 @@ def self.mapper() } } } - }, - code: { - required: false, - serialized_name: 'code', - type: { - name: 'String' - } - }, - message: { - required: false, - serialized_name: 'message', - type: { - name: 'String' - } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/experiments.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/experiments.rb old mode 100755 new mode 100644 index b3fe302f6c..de68a3c8bd --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/experiments.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/experiments.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Experiments include MsRestAzure - include MsRest::JSONable # @return [Array] List of ramp-up rules. attr_accessor :ramp_up_rules diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb old mode 100755 new mode 100644 index 5c3d137216..d7a37d6b6e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FileSystemApplicationLogsConfig include MsRestAzure - include MsRest::JSONable # @return [LogLevel] Log level. Possible values include: 'Off', # 'Verbose', 'Information', 'Warning', 'Error'. Default value: 'Off' . attr_accessor :level diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb old mode 100755 new mode 100644 index 77e1829848..edad2acf71 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class FileSystemHttpLogsConfig include MsRestAzure - include MsRest::JSONable # @return [Integer] Maximum size in megabytes that http log files can # use. # When reached old log files will be removed to make space for new ones. @@ -24,7 +23,8 @@ class FileSystemHttpLogsConfig # 0 or lower means no retention. attr_accessor :retention_in_days - # @return [Boolean] Enabled. + # @return [Boolean] True if configuration is enabled, false if it is + # disabled and null if configuration is not set. attr_accessor :enabled diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/frequency_unit.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/frequency_unit.rb old mode 100755 new mode 100644 index 94e2dadfe9..8b30cd6494 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/frequency_unit.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/frequency_unit.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_envelope.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_envelope.rb new file mode 100644 index 0000000000..1365324898 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_envelope.rb @@ -0,0 +1,174 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Web Job Information. + # + class FunctionEnvelope < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Function name. + attr_accessor :function_envelope_name + + # @return [String] Function App ID. + attr_accessor :function_app_id + + # @return [String] Script root path URI. + attr_accessor :script_root_path_href + + # @return [String] Script URI. + attr_accessor :script_href + + # @return [String] Config URI. + attr_accessor :config_href + + # @return [String] Secrets file URI. + attr_accessor :secrets_file_href + + # @return [String] Function URI. + attr_accessor :href + + # @return Config information. + attr_accessor :config + + # @return [Hash{String => String}] File list. + attr_accessor :files + + # @return [String] Test data used when testing via the Azure Portal. + attr_accessor :test_data + + + # + # Mapper for FunctionEnvelope class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FunctionEnvelope', + type: { + name: 'Composite', + class_name: 'FunctionEnvelope', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + function_envelope_name: { + required: false, + read_only: true, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + function_app_id: { + required: false, + read_only: true, + serialized_name: 'properties.functionAppId', + type: { + name: 'String' + } + }, + script_root_path_href: { + required: false, + serialized_name: 'properties.scriptRootPathHref', + type: { + name: 'String' + } + }, + script_href: { + required: false, + serialized_name: 'properties.scriptHref', + type: { + name: 'String' + } + }, + config_href: { + required: false, + serialized_name: 'properties.configHref', + type: { + name: 'String' + } + }, + secrets_file_href: { + required: false, + serialized_name: 'properties.secretsFileHref', + type: { + name: 'String' + } + }, + href: { + required: false, + serialized_name: 'properties.href', + type: { + name: 'String' + } + }, + config: { + required: false, + serialized_name: 'properties.config', + type: { + name: 'Object' + } + }, + files: { + required: false, + serialized_name: 'properties.files', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + test_data: { + required: false, + serialized_name: 'properties.testData', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_envelope_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_envelope_collection.rb new file mode 100644 index 0000000000..bcc26fdb5c --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_envelope_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::ARM::Web + module Models + # + # Collection of Kudu function information elements. + # + class FunctionEnvelopeCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [FunctionEnvelopeCollection] 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 FunctionEnvelopeCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FunctionEnvelopeCollection', + type: { + name: 'Composite', + class_name: 'FunctionEnvelopeCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FunctionEnvelopeElementType', + type: { + name: 'Composite', + class_name: 'FunctionEnvelope' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_secrets.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_secrets.rb new file mode 100644 index 0000000000..2b74210670 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/function_secrets.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::ARM::Web + module Models + # + # Function secrets. + # + class FunctionSecrets < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Secret key. + attr_accessor :key + + # @return [String] Trigger URL. + attr_accessor :trigger_url + + + # + # Mapper for FunctionSecrets class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'FunctionSecrets', + type: { + name: 'Composite', + class_name: 'FunctionSecrets', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + key: { + required: false, + serialized_name: 'properties.key', + type: { + name: 'String' + } + }, + trigger_url: { + required: false, + serialized_name: 'properties.triggerUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb old mode 100755 new mode 100644 index b4978f9349..26c9f12314 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Geographical region. # - class GeoRegion < MsRestAzure::Resource + class GeoRegion < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Region name. attr_accessor :geo_region_name @@ -45,6 +44,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -57,34 +57,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, geo_region_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region_collection.rb old mode 100755 new mode 100644 index 793fc59261..07a6e3c4b1 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/global_csm_sku_description.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/global_csm_sku_description.rb old mode 100755 new mode 100644 index 1d96157423..f5cee773ae --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/global_csm_sku_description.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/global_csm_sku_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class GlobalCsmSkuDescription include MsRestAzure - include MsRest::JSONable # @return [String] Name of the resource SKU. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/handler_mapping.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/handler_mapping.rb old mode 100755 new mode 100644 index 14550d3ca4..c906f2adc5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/handler_mapping.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/handler_mapping.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -15,7 +15,6 @@ class HandlerMapping include MsRestAzure - include MsRest::JSONable # @return [String] Requests with this extension will be handled using the # specified FastCGI application. attr_accessor :extension diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name.rb old mode 100755 new mode 100644 index 06dccd5838..9a697a3ca7 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HostName include MsRestAzure - include MsRest::JSONable # @return [String] Name of the hostname. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb old mode 100755 new mode 100644 index ab974e914f..383531968c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A hostname binding object. # - class HostNameBinding < MsRestAzure::Resource + class HostNameBinding < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Hostname. attr_accessor :host_name_binding_name @@ -71,6 +70,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -83,34 +83,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, host_name_binding_name: { required: false, serialized_name: 'properties.name', @@ -180,6 +160,7 @@ def self.mapper() }, virtual_ip: { required: false, + read_only: true, serialized_name: 'properties.virtualIP', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb old mode 100755 new mode 100644 index 8717ea5261..4e7c306c94 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb old mode 100755 new mode 100644 index bcbe4bce38..4b1297ac5a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HostNameSslState include MsRestAzure - include MsRest::JSONable # @return [String] Hostname. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_type.rb old mode 100755 new mode 100644 index 8925f5a9f4..da2af02c76 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_type.rb old mode 100755 new mode 100644 index af35b45bde..d67d8c27ca --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb old mode 100755 new mode 100644 index c4e4ff12dd..f9eba17bec --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HostingEnvironmentDiagnostics include MsRestAzure - include MsRest::JSONable # @return [String] Name/identifier of the diagnostics. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb old mode 100755 new mode 100644 index bcaf7b979b..0349e6a70e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HostingEnvironmentProfile include MsRestAzure - include MsRest::JSONable # @return [String] Resource ID of the App Service Environment. attr_accessor :id diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb old mode 100755 new mode 100644 index 2e3af57617..dd18f85c27 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/http_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/http_logs_config.rb old mode 100755 new mode 100644 index e497f8ce3c..b5d6ef2465 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/http_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/http_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class HttpLogsConfig include MsRestAzure - include MsRest::JSONable # @return [FileSystemHttpLogsConfig] Http logs to file system # configuration. attr_accessor :file_system diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb old mode 100755 new mode 100644 index b880ab6712..0c21ff7373 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Hybrid Connection contract. This is used to configure a Hybrid # Connection. # - class HybridConnection < MsRestAzure::Resource + class HybridConnection < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] The name of the Service Bus namespace. attr_accessor :service_bus_namespace @@ -38,6 +37,10 @@ class HybridConnection < MsRestAzure::Resource # normally, use the POST /listKeys API instead. attr_accessor :send_key_value + # @return [String] The suffix for the service bus endpoint. By default + # this is .servicebus.windows.net + attr_accessor :service_bus_suffix + # # Mapper for HybridConnection class as Ruby Hash. @@ -61,6 +64,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -73,34 +77,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, service_bus_namespace: { required: false, serialized_name: 'properties.serviceBusNamespace', @@ -149,6 +133,13 @@ def self.mapper() type: { name: 'String' } + }, + service_bus_suffix: { + required: false, + serialized_name: 'properties.serviceBusSuffix', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_collection.rb old mode 100755 new mode 100644 index a33fc631ef..af741d5b91 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb old mode 100755 new mode 100644 index bbc3a3fa09..cbf715cbe6 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Hybrid Connection key contract. This has the send key name and value for # a Hybrid Connection. # - class HybridConnectionKey < MsRestAzure::Resource + class HybridConnectionKey < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] The name of the send key. attr_accessor :send_key_name @@ -43,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +55,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, send_key_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb old mode 100755 new mode 100644 index a9ac0f5e7b..234174d518 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Hybrid Connection limits contract. This is used to return the plan limits # of Hybrid Connections. # - class HybridConnectionLimits < MsRestAzure::Resource + class HybridConnectionLimits < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Integer] The current number of Hybrid Connections. attr_accessor :current @@ -43,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +55,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, current: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb old mode 100755 new mode 100644 index d6a03f45be..b7a5b9ccb7 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,12 +8,11 @@ module Models # # Identifier. # - class Identifier < MsRestAzure::Resource + class Identifier < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable - # @return [String] ID. + # @return [String] String representation of the identity. attr_accessor :identifier_id @@ -39,6 +38,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +51,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, identifier_id: { required: false, serialized_name: 'properties.id', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier_collection.rb old mode 100755 new mode 100644 index 1fdd4f474a..49c87b0739 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/in_availability_reason_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/in_availability_reason_type.rb old mode 100755 new mode 100644 index 90b1eae708..7b5813a746 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/in_availability_reason_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/in_availability_reason_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb old mode 100755 new mode 100644 index e1f60f5ed0..9716d13060 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb old mode 100755 new mode 100644 index 4d574d595c..c4bd659301 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class IpSecurityRestriction include MsRestAzure - include MsRest::JSONable # @return [String] IP address the security restriction is valid for. attr_accessor :ip_address diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb old mode 100755 new mode 100644 index ea856cb59c..72e176560f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/localizable_string.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/localizable_string.rb old mode 100755 new mode 100644 index b52c7c96a0..35c5f6a605 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/localizable_string.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/localizable_string.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class LocalizableString include MsRestAzure - include MsRest::JSONable # @return [String] Non-localized name. attr_accessor :value diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/log_level.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/log_level.rb old mode 100755 new mode 100644 index 3af8877ccb..7169890320 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/log_level.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/log_level.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb old mode 100755 new mode 100644 index 0a3c27cf78..3980daa40a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availabilily.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availabilily.rb old mode 100755 new mode 100644 index c842abc254..bf5742c3f2 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availabilily.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availabilily.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class MetricAvailabilily include MsRestAzure - include MsRest::JSONable # @return [String] Time grain. attr_accessor :time_grain diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availability.rb new file mode 100644 index 0000000000..480a8e4429 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availability.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::ARM::Web + module Models + # + # Model object. + # + # + class MetricAvailability + + include MsRestAzure + + # @return [String] + attr_accessor :time_grain + + # @return [String] + attr_accessor :blob_duration + + + # + # Mapper for MetricAvailability class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricAvailability', + type: { + name: 'Composite', + class_name: 'MetricAvailability', + model_properties: { + time_grain: { + required: false, + serialized_name: 'timeGrain', + type: { + name: 'String' + } + }, + blob_duration: { + required: false, + serialized_name: 'blobDuration', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb old mode 100755 new mode 100644 index 74d0578610..6eb47ebcac --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Metadata for a metric. # - class MetricDefinition < MsRestAzure::Resource + class MetricDefinition < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Name of the metric. attr_accessor :metric_definition_name @@ -52,6 +51,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -64,34 +64,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, metric_definition_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_specification.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_specification.rb new file mode 100644 index 0000000000..0e77886ff0 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_specification.rb @@ -0,0 +1,201 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class MetricSpecification + + include MsRestAzure + + # @return [String] + attr_accessor :name + + # @return [String] + attr_accessor :display_name + + # @return [String] + attr_accessor :display_description + + # @return [String] + attr_accessor :unit + + # @return [String] + attr_accessor :aggregation_type + + # @return [Boolean] + attr_accessor :supports_instance_level_aggregation + + # @return [Boolean] + attr_accessor :enable_regional_mdm_account + + # @return [String] + attr_accessor :source_mdm_account + + # @return [String] + attr_accessor :source_mdm_namespace + + # @return [String] + attr_accessor :metric_filter_pattern + + # @return [Boolean] + attr_accessor :fill_gap_with_zero + + # @return [Boolean] + attr_accessor :is_internal + + # @return [Array] + attr_accessor :dimensions + + # @return [String] + attr_accessor :category + + # @return [Array] + attr_accessor :availabilities + + + # + # Mapper for MetricSpecification class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricSpecification', + type: { + name: 'Composite', + class_name: 'MetricSpecification', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + display_description: { + required: false, + serialized_name: 'displayDescription', + type: { + name: 'String' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + aggregation_type: { + required: false, + serialized_name: 'aggregationType', + type: { + name: 'String' + } + }, + supports_instance_level_aggregation: { + required: false, + serialized_name: 'supportsInstanceLevelAggregation', + type: { + name: 'Boolean' + } + }, + enable_regional_mdm_account: { + required: false, + serialized_name: 'enableRegionalMdmAccount', + type: { + name: 'Boolean' + } + }, + source_mdm_account: { + required: false, + serialized_name: 'sourceMdmAccount', + type: { + name: 'String' + } + }, + source_mdm_namespace: { + required: false, + serialized_name: 'sourceMdmNamespace', + type: { + name: 'String' + } + }, + metric_filter_pattern: { + required: false, + serialized_name: 'metricFilterPattern', + type: { + name: 'String' + } + }, + fill_gap_with_zero: { + required: false, + serialized_name: 'fillGapWithZero', + type: { + name: 'Boolean' + } + }, + is_internal: { + required: false, + serialized_name: 'isInternal', + type: { + name: 'Boolean' + } + }, + dimensions: { + required: false, + serialized_name: 'dimensions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DimensionElementType', + type: { + name: 'Composite', + class_name: 'Dimension' + } + } + } + }, + category: { + required: false, + serialized_name: 'category', + type: { + name: 'String' + } + }, + availabilities: { + required: false, + serialized_name: 'availabilities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricAvailabilityElementType', + type: { + name: 'Composite', + class_name: 'MetricAvailability' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb old mode 100755 new mode 100644 index ee46a4db9d..3042f69cc5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,15 +8,17 @@ module Models # # MySQL migration request. # - class MigrateMySqlRequest < MsRestAzure::Resource + class MigrateMySqlRequest < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable - # @return [String] Connection string to the remote MySQL database to - # which data should be migrated. + # @return [String] Connection string to the remote MySQL database. attr_accessor :connection_string + # @return [MySqlMigrationType] The type of migration operation to be + # done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + attr_accessor :migration_type + # # Mapper for MigrateMySqlRequest class as Ruby Hash. @@ -40,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -52,39 +55,27 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { + connection_string: { required: false, - serialized_name: 'tags', + serialized_name: 'properties.connectionString', type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' } }, - connection_string: { + migration_type: { required: false, - serialized_name: 'properties.connectionString', + serialized_name: 'properties.migrationType', type: { - name: 'String' + name: 'Enum', + module: 'MySqlMigrationType' } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb old mode 100755 new mode 100644 index 382ed0c2d3..b6b119eb4f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # MySQL migration status. # - class MigrateMySqlStatus < MsRestAzure::Resource + class MigrateMySqlStatus < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [OperationStatus] Status of the migration task. Possible values # include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' attr_accessor :migration_operation_status @@ -46,6 +45,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -58,34 +58,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, migration_operation_status: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy.rb new file mode 100644 index 0000000000..7c3605ca33 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy.rb @@ -0,0 +1,152 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # MSDeploy ARM PUT information + # + class MSDeploy < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Package URI + attr_accessor :package_uri + + # @return [String] SQL Connection String + attr_accessor :connection_string + + # @return [String] Database Type + attr_accessor :db_type + + # @return [String] URI of MSDeploy Parameters file. Must not be set if + # SetParameters is used. + attr_accessor :set_parameters_xml_file_uri + + # @return [Hash{String => String}] MSDeploy Parameters. Must not be set + # if SetParametersXmlFileUri is used. + attr_accessor :set_parameters + + # @return [Boolean] Controls whether the MSDeploy operation skips the + # App_Data directory. + # If set to true, the existing App_Data directory on the + # destination + # will not be deleted, and any App_Data directory in the source will be + # ignored. + # Setting is false by default. + attr_accessor :skip_app_data + + # @return [Boolean] Sets the AppOffline rule while the MSDeploy operation + # executes. + # Setting is false by default. + attr_accessor :app_offline + + + # + # Mapper for MSDeploy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeploy', + type: { + name: 'Composite', + class_name: 'MSDeploy', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + package_uri: { + required: false, + serialized_name: 'properties.packageUri', + type: { + name: 'String' + } + }, + connection_string: { + required: false, + serialized_name: 'properties.connectionString', + type: { + name: 'String' + } + }, + db_type: { + required: false, + serialized_name: 'properties.dbType', + type: { + name: 'String' + } + }, + set_parameters_xml_file_uri: { + required: false, + serialized_name: 'properties.setParametersXmlFileUri', + type: { + name: 'String' + } + }, + set_parameters: { + required: false, + serialized_name: 'properties.setParameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + skip_app_data: { + required: false, + serialized_name: 'properties.skipAppData', + type: { + name: 'Boolean' + } + }, + app_offline: { + required: false, + serialized_name: 'properties.appOffline', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log.rb new file mode 100644 index 0000000000..e085081ea0 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # MSDeploy log + # + class MSDeployLog < ProxyOnlyResource + + include MsRestAzure + + # @return [Array] List of log entry messages + attr_accessor :entries + + + # + # Mapper for MSDeployLog class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeployLog', + type: { + name: 'Composite', + class_name: 'MSDeployLog', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + entries: { + required: false, + read_only: true, + serialized_name: 'properties.entries', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MSDeployLogEntryElementType', + type: { + name: 'Composite', + class_name: 'MSDeployLogEntry' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry.rb new file mode 100644 index 0000000000..1d57556553 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry.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::ARM::Web + module Models + # + # MSDeploy log entry + # + class MSDeployLogEntry + + include MsRestAzure + + # @return [DateTime] Timestamp of log entry + attr_accessor :time + + # @return [MSDeployLogEntryType] Log entry type. Possible values include: + # 'Message', 'Warning', 'Error' + attr_accessor :type + + # @return [String] Log entry message + attr_accessor :message + + + # + # Mapper for MSDeployLogEntry class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeployLogEntry', + type: { + name: 'Composite', + class_name: 'MSDeployLogEntry', + model_properties: { + time: { + required: false, + read_only: true, + serialized_name: 'time', + type: { + name: 'DateTime' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'MSDeployLogEntryType' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb new file mode 100644 index 0000000000..b16eb3fe14 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry_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::ARM::Web + module Models + # + # Defines values for MSDeployLogEntryType + # + module MSDeployLogEntryType + Message = "Message" + Warning = "Warning" + Error = "Error" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb new file mode 100644 index 0000000000..926d6699dd --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb @@ -0,0 +1,19 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Defines values for MSDeployProvisioningState + # + module MSDeployProvisioningState + Accepted = "accepted" + Running = "running" + Succeeded = "succeeded" + Failed = "failed" + Canceled = "canceled" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_status.rb new file mode 100644 index 0000000000..ef28c70995 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_status.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::ARM::Web + module Models + # + # MSDeploy ARM response + # + class MSDeployStatus < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Username of deployer + attr_accessor :deployer + + # @return [MSDeployProvisioningState] Provisioning state. Possible values + # include: 'accepted', 'running', 'succeeded', 'failed', 'canceled' + attr_accessor :provisioning_state + + # @return [DateTime] Start time of deploy operation + attr_accessor :start_time + + # @return [DateTime] End time of deploy operation + attr_accessor :end_time + + # @return [Boolean] Whether the deployment operation has completed + attr_accessor :complete + + + # + # Mapper for MSDeployStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeployStatus', + type: { + name: 'Composite', + class_name: 'MSDeployStatus', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + deployer: { + required: false, + read_only: true, + serialized_name: 'properties.deployer', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'MSDeployProvisioningState' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + read_only: true, + serialized_name: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + complete: { + required: false, + read_only: true, + serialized_name: 'properties.complete', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/my_sql_migration_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/my_sql_migration_type.rb new file mode 100644 index 0000000000..d90e9b8005 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/my_sql_migration_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::ARM::Web + module Models + # + # Defines values for MySqlMigrationType + # + module MySqlMigrationType + LocalToRemote = "LocalToRemote" + RemoteToLocal = "RemoteToLocal" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier.rb old mode 100755 new mode 100644 index dda386fa8d..5cfacde1e4 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NameIdentifier include MsRestAzure - include MsRest::JSONable # @return [String] Name of the object. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb old mode 100755 new mode 100644 index 70d22e5678..6d26f2a685 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_value_pair.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_value_pair.rb old mode 100755 new mode 100644 index be065329d9..e4fd6701da --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_value_pair.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_value_pair.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NameValuePair include MsRestAzure - include MsRest::JSONable # @return [String] Pair name. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb old mode 100755 new mode 100644 index cd80de4d11..34da7119c5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class NetworkAccessControlEntry include MsRestAzure - include MsRest::JSONable # @return [AccessControlEntryAction] Action object. Possible values # include: 'Permit', 'Deny' attr_accessor :action diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb old mode 100755 new mode 100644 index 6070172681..3aa6aef3c3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Full view of network features for an app (presently VNET integration and # Hybrid Connections). # - class NetworkFeatures < MsRestAzure::Resource + class NetworkFeatures < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] The Virtual Network name. attr_accessor :virtual_network_name @@ -51,6 +50,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +63,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, virtual_network_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/notification_level.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/notification_level.rb old mode 100755 new mode 100644 index 702d622068..c138adee78 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/notification_level.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/notification_level.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation.rb old mode 100755 new mode 100644 index f2f2255986..82e76130c3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class Operation include MsRestAzure - include MsRest::JSONable # @return [String] Operation ID. attr_accessor :id diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation_status.rb old mode 100755 new mode 100644 index 23bccefcfc..a2e6370f83 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb old mode 100755 new mode 100644 index 143336120c..45e2663c98 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_response.rb old mode 100755 new mode 100644 index d6d5e232d3..135413243d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PerfMonResponse include MsRestAzure - include MsRest::JSONable # @return [String] The response code. attr_accessor :code diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb old mode 100755 new mode 100644 index 44c040c7b8..b2a656a7cb --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PerfMonSample include MsRestAzure - include MsRest::JSONable # @return [DateTime] Point in time for which counter was measured. attr_accessor :time @@ -22,6 +21,9 @@ class PerfMonSample # @return [Float] Value of counter at a certain time. attr_accessor :value + # @return [Integer] Core Count of worker. Not a data member + attr_accessor :core_count + # # Mapper for PerfMonSample class as Ruby Hash. @@ -55,6 +57,13 @@ def self.mapper() type: { name: 'Double' } + }, + core_count: { + required: false, + serialized_name: 'coreCount', + type: { + name: 'Number' + } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_set.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_set.rb old mode 100755 new mode 100644 index c2da3c3267..edb82ab092 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_set.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_set.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class PerfMonSet include MsRestAzure - include MsRest::JSONable # @return [String] Unique key name of the counter. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb old mode 100755 new mode 100644 index f332db7d6b..41b8ed1dee --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Premier add-on. # - class PremierAddOn < MsRestAzure::Resource + class PremierAddOn < Resource include MsRestAzure - include MsRest::JSONable # @return [String] SKU. attr_accessor :sku @@ -60,6 +59,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -81,6 +81,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb old mode 100755 new mode 100644 index c459468d1d..70ce242c99 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Premier add-on offer. # - class PremierAddOnOffer < MsRestAzure::Resource + class PremierAddOnOffer < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] SKU. attr_accessor :sku @@ -72,6 +71,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -84,34 +84,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, sku: { required: false, serialized_name: 'properties.sku', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb old mode 100755 new mode 100644 index 71e88e5afd..8c7f40797f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_info.rb new file mode 100644 index 0000000000..3f764e2422 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_info.rb @@ -0,0 +1,462 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Process Information. + # + class ProcessInfo < ProxyOnlyResource + + include MsRestAzure + + # @return [Integer] ARM Identifier for deployment. + attr_accessor :process_info_id + + # @return [String] Deployment name. + attr_accessor :process_info_name + + # @return [String] HRef URI. + attr_accessor :href + + # @return [String] Minidump URI. + attr_accessor :mini_dump + + # @return [Boolean] Is profile running? + attr_accessor :is_profile_running + + # @return [Boolean] Is the IIS Profile running? + attr_accessor :is_iis_profile_running + + # @return [Float] IIS Profile timeout (seconds). + attr_accessor :iis_profile_timeout_in_seconds + + # @return [String] Parent process. + attr_accessor :parent + + # @return [Array] Child process list. + attr_accessor :children + + # @return [Array] Thread list. + attr_accessor :threads + + # @return [Array] List of open files. + attr_accessor :open_file_handles + + # @return [Array] List of modules. + attr_accessor :modules + + # @return [String] File name of this process. + attr_accessor :file_name + + # @return [String] Command line. + attr_accessor :command_line + + # @return [String] User name. + attr_accessor :user_name + + # @return [Integer] Handle count. + attr_accessor :handle_count + + # @return [Integer] Module count. + attr_accessor :module_count + + # @return [Integer] Thread count. + attr_accessor :thread_count + + # @return [DateTime] Start time. + attr_accessor :start_time + + # @return [String] Total CPU time. + attr_accessor :total_processor_time + + # @return [String] User CPU time. + attr_accessor :user_processor_time + + # @return [String] Privileged CPU time. + attr_accessor :privileged_processor_time + + # @return [Integer] Working set. + attr_accessor :working_set64 + + # @return [Integer] Peak working set. + attr_accessor :peak_working_set64 + + # @return [Integer] Private memory size. + attr_accessor :private_memory_size64 + + # @return [Integer] Virtual memory size. + attr_accessor :virtual_memory_size64 + + # @return [Integer] Peak virtual memory usage. + attr_accessor :peak_virtual_memory_size64 + + # @return [Integer] Paged system memory. + attr_accessor :paged_system_memory_size64 + + # @return [Integer] Non-paged system memory. + attr_accessor :nonpaged_system_memory_size64 + + # @return [Integer] Paged memory. + attr_accessor :paged_memory_size64 + + # @return [Integer] Peak paged memory. + attr_accessor :peak_paged_memory_size64 + + # @return [DateTime] Time stamp. + attr_accessor :time_stamp + + # @return [Hash{String => String}] List of environment variables. + attr_accessor :environment_variables + + # @return [Boolean] Is this the SCM site? + attr_accessor :is_scm_site + + # @return [Boolean] Is this a Web Job? + attr_accessor :is_web_job + + # @return [String] Description of process. + attr_accessor :description + + + # + # Mapper for ProcessInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProcessInfo', + type: { + name: 'Composite', + class_name: 'ProcessInfo', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + process_info_id: { + required: false, + serialized_name: 'properties.id', + type: { + name: 'Number' + } + }, + process_info_name: { + required: false, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + href: { + required: false, + serialized_name: 'properties.href', + type: { + name: 'String' + } + }, + mini_dump: { + required: false, + serialized_name: 'properties.miniDump', + type: { + name: 'String' + } + }, + is_profile_running: { + required: false, + serialized_name: 'properties.isProfileRunning', + type: { + name: 'Boolean' + } + }, + is_iis_profile_running: { + required: false, + serialized_name: 'properties.isIisProfileRunning', + type: { + name: 'Boolean' + } + }, + iis_profile_timeout_in_seconds: { + required: false, + serialized_name: 'properties.iisProfileTimeoutInSeconds', + type: { + name: 'Double' + } + }, + parent: { + required: false, + serialized_name: 'properties.parent', + type: { + name: 'String' + } + }, + children: { + required: false, + serialized_name: 'properties.children', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + threads: { + required: false, + serialized_name: 'properties.threads', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProcessThreadInfoElementType', + type: { + name: 'Composite', + class_name: 'ProcessThreadInfo' + } + } + } + }, + open_file_handles: { + required: false, + serialized_name: 'properties.openFileHandles', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + modules: { + required: false, + serialized_name: 'properties.modules', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProcessModuleInfoElementType', + type: { + name: 'Composite', + class_name: 'ProcessModuleInfo' + } + } + } + }, + file_name: { + required: false, + serialized_name: 'properties.fileName', + type: { + name: 'String' + } + }, + command_line: { + required: false, + serialized_name: 'properties.commandLine', + type: { + name: 'String' + } + }, + user_name: { + required: false, + serialized_name: 'properties.userName', + type: { + name: 'String' + } + }, + handle_count: { + required: false, + serialized_name: 'properties.handleCount', + type: { + name: 'Number' + } + }, + module_count: { + required: false, + serialized_name: 'properties.moduleCount', + type: { + name: 'Number' + } + }, + thread_count: { + required: false, + serialized_name: 'properties.threadCount', + type: { + name: 'Number' + } + }, + start_time: { + required: false, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + total_processor_time: { + required: false, + serialized_name: 'properties.totalProcessorTime', + type: { + name: 'String' + } + }, + user_processor_time: { + required: false, + serialized_name: 'properties.userProcessorTime', + type: { + name: 'String' + } + }, + privileged_processor_time: { + required: false, + serialized_name: 'properties.privilegedProcessorTime', + type: { + name: 'String' + } + }, + working_set64: { + required: false, + serialized_name: 'properties.workingSet64', + type: { + name: 'Number' + } + }, + peak_working_set64: { + required: false, + serialized_name: 'properties.peakWorkingSet64', + type: { + name: 'Number' + } + }, + private_memory_size64: { + required: false, + serialized_name: 'properties.privateMemorySize64', + type: { + name: 'Number' + } + }, + virtual_memory_size64: { + required: false, + serialized_name: 'properties.virtualMemorySize64', + type: { + name: 'Number' + } + }, + peak_virtual_memory_size64: { + required: false, + serialized_name: 'properties.peakVirtualMemorySize64', + type: { + name: 'Number' + } + }, + paged_system_memory_size64: { + required: false, + serialized_name: 'properties.pagedSystemMemorySize64', + type: { + name: 'Number' + } + }, + nonpaged_system_memory_size64: { + required: false, + serialized_name: 'properties.nonpagedSystemMemorySize64', + type: { + name: 'Number' + } + }, + paged_memory_size64: { + required: false, + serialized_name: 'properties.pagedMemorySize64', + type: { + name: 'Number' + } + }, + peak_paged_memory_size64: { + required: false, + serialized_name: 'properties.peakPagedMemorySize64', + type: { + name: 'Number' + } + }, + time_stamp: { + required: false, + serialized_name: 'properties.timeStamp', + type: { + name: 'DateTime' + } + }, + environment_variables: { + required: false, + serialized_name: 'properties.environmentVariables', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + is_scm_site: { + required: false, + serialized_name: 'properties.isScmSite', + type: { + name: 'Boolean' + } + }, + is_web_job: { + required: false, + serialized_name: 'properties.isWebJob', + type: { + name: 'Boolean' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_info_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_info_collection.rb new file mode 100644 index 0000000000..f511dbf8ab --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_info_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::ARM::Web + module Models + # + # Collection of Kudu process information elements. + # + class ProcessInfoCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [ProcessInfoCollection] 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 ProcessInfoCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProcessInfoCollection', + type: { + name: 'Composite', + class_name: 'ProcessInfoCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProcessInfoElementType', + type: { + name: 'Composite', + class_name: 'ProcessInfo' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_module_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_module_info.rb new file mode 100644 index 0000000000..c8411fcd76 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_module_info.rb @@ -0,0 +1,176 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Process Module Information. + # + class ProcessModuleInfo < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Base address. Used as module identifier in ARM + # resource URI. + attr_accessor :base_address + + # @return [String] File name. + attr_accessor :file_name + + # @return [String] HRef URI. + attr_accessor :href + + # @return [String] File path. + attr_accessor :file_path + + # @return [Integer] Module memory size. + attr_accessor :module_memory_size + + # @return [String] File version. + attr_accessor :file_version + + # @return [String] File description. + attr_accessor :file_description + + # @return [String] Product name. + attr_accessor :product + + # @return [String] Product version. + attr_accessor :product_version + + # @return [Boolean] Is debug? + attr_accessor :is_debug + + # @return [String] Module language (locale). + attr_accessor :language + + + # + # Mapper for ProcessModuleInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProcessModuleInfo', + type: { + name: 'Composite', + class_name: 'ProcessModuleInfo', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + base_address: { + required: false, + serialized_name: 'properties.baseAddress', + type: { + name: 'String' + } + }, + file_name: { + required: false, + serialized_name: 'properties.fileName', + type: { + name: 'String' + } + }, + href: { + required: false, + serialized_name: 'properties.href', + type: { + name: 'String' + } + }, + file_path: { + required: false, + serialized_name: 'properties.filePath', + type: { + name: 'String' + } + }, + module_memory_size: { + required: false, + serialized_name: 'properties.moduleMemorySize', + type: { + name: 'Number' + } + }, + file_version: { + required: false, + serialized_name: 'properties.fileVersion', + type: { + name: 'String' + } + }, + file_description: { + required: false, + serialized_name: 'properties.fileDescription', + type: { + name: 'String' + } + }, + product: { + required: false, + serialized_name: 'properties.product', + type: { + name: 'String' + } + }, + product_version: { + required: false, + serialized_name: 'properties.productVersion', + type: { + name: 'String' + } + }, + is_debug: { + required: false, + serialized_name: 'properties.isDebug', + type: { + name: 'Boolean' + } + }, + language: { + required: false, + serialized_name: 'properties.language', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_module_info_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_module_info_collection.rb new file mode 100644 index 0000000000..9af83532d8 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_module_info_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::ARM::Web + module Models + # + # Collection of Kudu thread information elements. + # + class ProcessModuleInfoCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [ProcessModuleInfoCollection] 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 ProcessModuleInfoCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProcessModuleInfoCollection', + type: { + name: 'Composite', + class_name: 'ProcessModuleInfoCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProcessModuleInfoElementType', + type: { + name: 'Composite', + class_name: 'ProcessModuleInfo' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_thread_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_thread_info.rb new file mode 100644 index 0000000000..f578b91710 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_thread_info.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::ARM::Web + module Models + # + # Process Thread Information. + # + class ProcessThreadInfo < ProxyOnlyResource + + include MsRestAzure + + # @return [Integer] ARM Identifier for deployment. + attr_accessor :process_thread_info_id + + # @return [String] HRef URI. + attr_accessor :href + + # @return [String] Process URI. + attr_accessor :process + + # @return [String] Start address. + attr_accessor :start_address + + # @return [Integer] Current thread priority. + attr_accessor :current_priority + + # @return [String] Thread priority level. + attr_accessor :priority_level + + # @return [Integer] Base priority. + attr_accessor :base_priority + + # @return [DateTime] Start time. + attr_accessor :start_time + + # @return [String] Total processor time. + attr_accessor :total_processor_time + + # @return [String] User processor time. + attr_accessor :user_processor_time + + # @return [String] Priviledged processor time. + attr_accessor :priviledged_processor_time + + # @return [String] Thread state. + attr_accessor :state + + # @return [String] Wait reason. + attr_accessor :wait_reason + + + # + # Mapper for ProcessThreadInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProcessThreadInfo', + type: { + name: 'Composite', + class_name: 'ProcessThreadInfo', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + process_thread_info_id: { + required: false, + serialized_name: 'properties.id', + type: { + name: 'Number' + } + }, + href: { + required: false, + serialized_name: 'properties.href', + type: { + name: 'String' + } + }, + process: { + required: false, + serialized_name: 'properties.process', + type: { + name: 'String' + } + }, + start_address: { + required: false, + serialized_name: 'properties.startAddress', + type: { + name: 'String' + } + }, + current_priority: { + required: false, + serialized_name: 'properties.currentPriority', + type: { + name: 'Number' + } + }, + priority_level: { + required: false, + serialized_name: 'properties.priorityLevel', + type: { + name: 'String' + } + }, + base_priority: { + required: false, + serialized_name: 'properties.basePriority', + type: { + name: 'Number' + } + }, + start_time: { + required: false, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + total_processor_time: { + required: false, + serialized_name: 'properties.totalProcessorTime', + type: { + name: 'String' + } + }, + user_processor_time: { + required: false, + serialized_name: 'properties.userProcessorTime', + type: { + name: 'String' + } + }, + priviledged_processor_time: { + required: false, + serialized_name: 'properties.priviledgedProcessorTime', + type: { + name: 'String' + } + }, + state: { + required: false, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + wait_reason: { + required: false, + serialized_name: 'properties.waitReason', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_thread_info_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_thread_info_collection.rb new file mode 100644 index 0000000000..b97dfb7f8f --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/process_thread_info_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::ARM::Web + module Models + # + # Collection of Kudu thread information elements. + # + class ProcessThreadInfoCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [ProcessThreadInfoCollection] 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 ProcessThreadInfoCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProcessThreadInfoCollection', + type: { + name: 'Composite', + class_name: 'ProcessThreadInfoCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProcessThreadInfoElementType', + type: { + name: 'Composite', + class_name: 'ProcessThreadInfo' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/provisioning_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/provisioning_state.rb old mode 100755 new mode 100644 index f47fc4c9e0..e71929823f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/provisioning_state.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/provisioning_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/proxy_only_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/proxy_only_resource.rb new file mode 100644 index 0000000000..6489a48da2 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/proxy_only_resource.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::ARM::Web + module Models + # + # Azure proxy only resource. This resource is not tracked by Azure Resource + # Manager. + # + class ProxyOnlyResource + + include MsRestAzure + + # @return [String] Resource Id. + attr_accessor :id + + # @return [String] Resource Name. + attr_accessor :name + + # @return [String] Kind of resource. + attr_accessor :kind + + # @return [String] Resource type. + attr_accessor :type + + + # + # Mapper for ProxyOnlyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProxyOnlyResource', + type: { + name: 'Composite', + class_name: 'ProxyOnlyResource', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + 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_web/lib/generated/azure_mgmt_web/models/public_certificate.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate.rb new file mode 100644 index 0000000000..4ae7148d82 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate.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::ARM::Web + module Models + # + # Public certificate object + # + class PublicCertificate < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Public Certificate byte array + attr_accessor :blob + + # @return [PublicCertificateLocation] Public Certificate Location. + # Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown' + attr_accessor :public_certificate_location + + # @return [String] Certificate Thumbprint + attr_accessor :thumbprint + + + # + # Mapper for PublicCertificate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PublicCertificate', + type: { + name: 'Composite', + class_name: 'PublicCertificate', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + blob: { + required: false, + serialized_name: 'properties.blob', + type: { + name: 'String' + } + }, + public_certificate_location: { + required: false, + serialized_name: 'properties.publicCertificateLocation', + type: { + name: 'Enum', + module: 'PublicCertificateLocation' + } + }, + thumbprint: { + required: false, + read_only: true, + serialized_name: 'properties.thumbprint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_collection.rb new file mode 100644 index 0000000000..1c42f97076 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_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::ARM::Web + module Models + # + # Collection of public certificates + # + class PublicCertificateCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [PublicCertificateCollection] 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 PublicCertificateCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PublicCertificateCollection', + type: { + name: 'Composite', + class_name: 'PublicCertificateCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PublicCertificateElementType', + type: { + name: 'Composite', + class_name: 'PublicCertificate' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_location.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_location.rb new file mode 100644 index 0000000000..b9247faf83 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_location.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::ARM::Web + module Models + # + # Defines values for PublicCertificateLocation + # + module PublicCertificateLocation + CurrentUserMy = "CurrentUserMy" + LocalMachineMy = "LocalMachineMy" + Unknown = "Unknown" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/publishing_profile_format.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/publishing_profile_format.rb old mode 100755 new mode 100644 index 27fac2a5d8..969ff2af97 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/publishing_profile_format.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/publishing_profile_format.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb old mode 100755 new mode 100644 index dd82f0e402..6c022991d5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Push settings for the App. # - class PushSettings + class PushSettings < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Boolean] Gets or sets a flag indicating whether the Push # endpoint is enabled. attr_accessor :is_push_enabled @@ -47,30 +46,61 @@ def self.mapper() name: 'Composite', class_name: 'PushSettings', 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, is_push_enabled: { - required: true, - serialized_name: 'isPushEnabled', + required: false, + serialized_name: 'properties.isPushEnabled', type: { name: 'Boolean' } }, tag_whitelist_json: { required: false, - serialized_name: 'tagWhitelistJson', + serialized_name: 'properties.tagWhitelistJson', type: { name: 'String' } }, tags_requiring_auth: { required: false, - serialized_name: 'tagsRequiringAuth', + serialized_name: 'properties.tagsRequiringAuth', type: { name: 'String' } }, dynamic_tags_json: { required: false, - serialized_name: 'dynamicTagsJson', + serialized_name: 'properties.dynamicTagsJson', type: { name: 'String' } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb old mode 100755 new mode 100644 index 4d74155df8..a58594d441 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -14,7 +14,6 @@ class RampUpRule include MsRestAzure - include MsRest::JSONable # @return [String] Hostname of a slot to which the traffic will be # redirected if decided to. E.g. myapp-stage.azurewebsites.net. attr_accessor :action_host_name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation.rb old mode 100755 new mode 100644 index 62b1cf6b87..150a7d636e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class Recommendation include MsRestAzure - include MsRest::JSONable # @return [DateTime] Timestamp when this instance was created. attr_accessor :creation_time diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation_rule.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation_rule.rb old mode 100755 new mode 100644 index 567dea38ed..699bc87676 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation_rule.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation_rule.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -13,7 +13,6 @@ class RecommendationRule include MsRestAzure - include MsRest::JSONable # @return [String] Unique name of the rule. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb old mode 100755 new mode 100644 index 8c3b7f1bd7..4314f80b55 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Class representing certificate reissue request. # - class ReissueCertificateOrderRequest < MsRestAzure::Resource + class ReissueCertificateOrderRequest < Resource include MsRestAzure - include MsRest::JSONable # @return [Integer] Certificate Key Size. attr_accessor :key_size @@ -50,6 +49,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -71,6 +71,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb old mode 100755 new mode 100644 index 38c48a5a1e..9b33b20a06 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Hybrid Connection for an App Service app. # - class RelayServiceConnectionEntity < MsRestAzure::Resource + class RelayServiceConnectionEntity < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] attr_accessor :entity_name @@ -57,6 +56,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -69,34 +69,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, entity_name: { required: false, serialized_name: 'properties.entityName', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb old mode 100755 new mode 100644 index 6b4d343bd2..dc7cd13a61 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Class representing certificate renew request. # - class RenewCertificateOrderRequest < MsRestAzure::Resource + class RenewCertificateOrderRequest < Resource include MsRestAzure - include MsRest::JSONable # @return [Integer] Certificate Key Size. attr_accessor :key_size @@ -46,6 +45,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -67,6 +67,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb old mode 100755 new mode 100644 index 038271aeb3..d56ee73ca9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class RequestsBasedTrigger include MsRestAzure - include MsRest::JSONable # @return [Integer] Count. attr_accessor :count diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb old mode 100755 new mode 100644 index 5f4dfa292f..1b6f8b1e8c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb @@ -1,21 +1,35 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Web module Models # - # Azure resource. + # Azure resource. This resource is tracked in Azure Resource Manager # - class Resource < MsRestAzure::Resource + class Resource include MsRestAzure - include MsRest::JSONable + # @return [String] Resource Id. + attr_accessor :id + + # @return [String] Resource Name. + attr_accessor :name + # @return [String] Kind of resource. attr_accessor :kind + # @return [String] Resource Location. + attr_accessor :location + + # @return [String] Resource type. + attr_accessor :type + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + # # Mapper for Resource class as Ruby Hash. @@ -39,6 +53,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,6 +75,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_collection.rb old mode 100755 new mode 100644 index 9b88e28d30..4997bac2b4 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric.rb old mode 100755 new mode 100644 index ab0663def1..b00de217cc --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceMetric include MsRestAzure - include MsRest::JSONable # @return [ResourceMetricName] Name of metric. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_availability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_availability.rb old mode 100755 new mode 100644 index ec2e8fc3b8..df2da7055f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_availability.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_availability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceMetricAvailability include MsRestAzure - include MsRest::JSONable # @return [String] Time grain . attr_accessor :time_grain diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb old mode 100755 new mode 100644 index 3ed7118efe..eae7cfbf37 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb old mode 100755 new mode 100644 index dac5ed9a81..818d3a7544 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Metadata for the metrics. # - class ResourceMetricDefinition < MsRestAzure::Resource + class ResourceMetricDefinition < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [ResourceMetricName] Name of the metric. attr_accessor :resource_metric_definition_name @@ -58,6 +57,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -70,34 +70,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, resource_metric_definition_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb old mode 100755 new mode 100644 index c80ea36411..9631c686dd --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_name.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_name.rb old mode 100755 new mode 100644 index 36d010f0c6..7e820db29b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_name.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceMetricName include MsRestAzure - include MsRest::JSONable # @return [String] metric name value. attr_accessor :value diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_property.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_property.rb old mode 100755 new mode 100644 index 646b39f2ac..2d17387145 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_property.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_property.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceMetricProperty include MsRestAzure - include MsRest::JSONable # @return [String] Key for resource metric property. attr_accessor :key diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_value.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_value.rb old mode 100755 new mode 100644 index b069411776..4d27792d1f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_value.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_value.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceMetricValue include MsRestAzure - include MsRest::JSONable # @return [String] Value timestamp. attr_accessor :timestamp diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability.rb old mode 100755 new mode 100644 index 3f040ecf26..1f47e79dab --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceNameAvailability include MsRestAzure - include MsRest::JSONable # @return [Boolean] true indicates name is valid and # available. false indicates the name is invalid, # unavailable, or both. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb old mode 100755 new mode 100644 index 9552bc3263..2bccc70802 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ResourceNameAvailabilityRequest include MsRestAzure - include MsRest::JSONable # @return [String] Resource name to verify. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_scope_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_scope_type.rb old mode 100755 new mode 100644 index 5246eee085..4d821641a6 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_scope_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_scope_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb old mode 100755 new mode 100644 index 9294cb7392..343e8ed011 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Description of a restore request. # - class RestoreRequest < MsRestAzure::Resource + class RestoreRequest < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] SAS URL to the container. attr_accessor :storage_account_url @@ -39,8 +38,16 @@ class RestoreRequest < MsRestAzure::Resource # conflicts during the operation. Default value: false . attr_accessor :ignore_conflicting_host_names + # @return [Boolean] Ignore the databases and only restore the site + # content. Default value: false . + attr_accessor :ignore_databases + + # @return [String] Specify app service plan that will own restored site. + attr_accessor :app_service_plan + # @return [BackupRestoreOperationType] Operation type. Possible values - # include: 'Default', 'Clone', 'Relocation'. Default value: 'Default' . + # include: 'Default', 'Clone', 'Relocation', 'Snapshot'. Default value: + # 'Default' . attr_accessor :operation_type # @return [Boolean] true if SiteConfig.ConnectionStrings @@ -74,6 +81,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -86,34 +94,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, storage_account_url: { required: false, serialized_name: 'properties.storageAccountUrl', @@ -165,6 +153,21 @@ def self.mapper() name: 'Boolean' } }, + ignore_databases: { + required: false, + serialized_name: 'properties.ignoreDatabases', + default_value: false, + type: { + name: 'Boolean' + } + }, + app_service_plan: { + required: false, + serialized_name: 'properties.appServicePlan', + type: { + name: 'String' + } + }, operation_type: { required: false, serialized_name: 'properties.operationType', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb old mode 100755 new mode 100644 index 50e603f94f..4611c7b564 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Response for an app restore request. # - class RestoreResponse < MsRestAzure::Resource + class RestoreResponse < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] When server starts the restore process, it will return # an operation ID identifying that particular restore operation. attr_accessor :operation_id @@ -40,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -52,34 +52,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, operation_id: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/route_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/route_type.rb old mode 100755 new mode 100644 index 1caf2a0f90..7c92b7eb90 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/route_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/route_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/scm_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/scm_type.rb old mode 100755 new mode 100644 index 71eff7f769..efbd063edb --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/scm_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/scm_type.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/service_specification.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/service_specification.rb new file mode 100644 index 0000000000..d05a164a01 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/service_specification.rb @@ -0,0 +1,53 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class ServiceSpecification + + include MsRestAzure + + # @return [Array] + attr_accessor :metric_specifications + + + # + # Mapper for ServiceSpecification class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ServiceSpecification', + type: { + name: 'Composite', + class_name: 'ServiceSpecification', + model_properties: { + metric_specifications: { + required: false, + serialized_name: 'metricSpecifications', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricSpecificationElementType', + type: { + name: 'Composite', + class_name: 'MetricSpecification' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb old mode 100755 new mode 100644 index a3ffe2d9cb..08ddeeb0d8 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A web app, a mobile app backend, or an API app. # - class Site < MsRestAzure::Resource + class Site < Resource include MsRestAzure - include MsRest::JSONable # @return [String] Current state of the app. attr_accessor :state @@ -64,9 +63,6 @@ class Site < MsRestAzure::Resource # the app. Read-only. attr_accessor :traffic_manager_host_names - # @return [Boolean] Indicates whether app is deployed as a premium app. - attr_accessor :premium_app_deployed - # @return [Boolean] true to stop SCM (KUDU) site when the # app is stopped; otherwise, false. The default is # false. Default value: false . @@ -80,13 +76,6 @@ class Site < MsRestAzure::Resource # the app. attr_accessor :hosting_environment_profile - # @return [String] Micro services like apps, logic apps. Default value: - # 'WebSites' . - attr_accessor :micro_service - - # @return [String] Name of gateway app associated with the app. - attr_accessor :gateway_site_name - # @return [Boolean] true to enable client affinity; # false to stop sending session affinity cookies, which # route client requests in the same session to the same instance. Default @@ -127,6 +116,10 @@ class Site < MsRestAzure::Resource # cloned from a source app. attr_accessor :cloning_info + # @return [SnapshotRecoveryRequest] If specified during app creation, the + # app is created from a previous snapshot. + attr_accessor :snapshot_info + # @return [String] Name of the resource group the app belongs to. # Read-only. attr_accessor :resource_group @@ -142,6 +135,16 @@ class Site < MsRestAzure::Resource # operation. attr_accessor :slot_swap_status + # @return [Boolean] Indicates whether app is deployed as a premium app. + attr_accessor :premium_app_deployed + + # @return [String] Micro services like apps, logic apps. Default value: + # 'WebSites' . + attr_accessor :micro_service + + # @return [String] Name of gateway app associated with the app. + attr_accessor :gateway_site_name + # # Mapper for Site class as Ruby Hash. @@ -165,6 +168,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -186,6 +190,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' @@ -337,14 +342,6 @@ def self.mapper() } } }, - premium_app_deployed: { - required: false, - read_only: true, - serialized_name: 'properties.premiumAppDeployed', - type: { - name: 'Boolean' - } - }, scm_site_also_stopped: { required: false, serialized_name: 'properties.scmSiteAlsoStopped', @@ -369,21 +366,6 @@ def self.mapper() class_name: 'HostingEnvironmentProfile' } }, - micro_service: { - required: false, - serialized_name: 'properties.microService', - default_value: 'WebSites', - type: { - name: 'String' - } - }, - gateway_site_name: { - required: false, - serialized_name: 'properties.gatewaySiteName', - type: { - name: 'String' - } - }, client_affinity_enabled: { required: false, serialized_name: 'properties.clientAffinityEnabled', @@ -451,6 +433,14 @@ def self.mapper() class_name: 'CloningInfo' } }, + snapshot_info: { + required: false, + serialized_name: 'properties.snapshotInfo', + type: { + name: 'Composite', + class_name: 'SnapshotRecoveryRequest' + } + }, resource_group: { required: false, read_only: true, @@ -483,6 +473,29 @@ def self.mapper() name: 'Composite', class_name: 'SlotSwapStatus' } + }, + premium_app_deployed: { + required: false, + read_only: true, + serialized_name: 'properties.premiumAppDeployed', + type: { + name: 'Boolean' + } + }, + micro_service: { + required: false, + serialized_name: 'properties.microService', + default_value: 'WebSites', + type: { + name: 'String' + } + }, + gateway_site_name: { + required: false, + serialized_name: 'properties.gatewaySiteName', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb old mode 100755 new mode 100644 index 0c4ac3326e..77d783a4b5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Configuration settings for the Azure App Service Authentication / # Authorization feature. # - class SiteAuthSettings < MsRestAzure::Resource + class SiteAuthSettings < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Boolean] true if the Authentication / # Authorization feature is enabled for the current app; otherwise, # false. @@ -197,6 +196,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -209,34 +209,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, enabled: { required: false, serialized_name: 'properties.enabled', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_availability_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_availability_state.rb old mode 100755 new mode 100644 index 5bcb813b65..33a5c13a9a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_availability_state.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_availability_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability.rb old mode 100755 new mode 100644 index 597257c0f1..8317fb147e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SiteCloneability include MsRestAzure - include MsRest::JSONable # @return [CloneAbilityResult] Name of app. Possible values include: # 'Cloneable', 'PartiallyCloneable', 'NotCloneable' attr_accessor :result diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb old mode 100755 new mode 100644 index 7b1c192ea2..ce0366fd36 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SiteCloneabilityCriterion include MsRestAzure - include MsRest::JSONable # @return [String] Name of criterion. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config.rb old mode 100755 new mode 100644 index 27932f8911..66ba1d8812 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SiteConfig include MsRestAzure - include MsRest::JSONable # @return [Integer] Number of workers. attr_accessor :number_of_workers diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb old mode 100755 new mode 100644 index 2af2b7d454..bef0c92539 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Web app configuration ARM resource. # - class SiteConfigResource < MsRestAzure::Resource + class SiteConfigResource < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Integer] Number of workers. attr_accessor :number_of_workers @@ -181,6 +180,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -193,34 +193,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, number_of_workers: { required: false, serialized_name: 'properties.numberOfWorkers', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource_collection.rb old mode 100755 new mode 100644 index ca6d16d9ce..fd1c708a5e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb old mode 100755 new mode 100644 index 7bca650451..3f16395c24 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A snapshot of a web app configuration. # - class SiteConfigurationSnapshotInfo < MsRestAzure::Resource + class SiteConfigurationSnapshotInfo < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [DateTime] The time the snapshot was taken. attr_accessor :time @@ -42,6 +41,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -54,34 +54,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, time: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_info.rb new file mode 100644 index 0000000000..3f9c29a48c --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_info.rb @@ -0,0 +1,275 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Site Extension Information. + # + class SiteExtensionInfo < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Site extension ID. + attr_accessor :site_extension_info_id + + # @return [String] Site extension title. + attr_accessor :title + + # @return [SiteExtensionType] Site extension type. Possible values + # include: 'Gallery', 'WebRoot' + attr_accessor :site_extension_info_type + + # @return [String] Summary description. + attr_accessor :summary + + # @return [String] Detailed description. + attr_accessor :description + + # @return [String] Version information. + attr_accessor :version + + # @return [String] Extension URL. + attr_accessor :extension_url + + # @return [String] Project URL. + attr_accessor :project_url + + # @return [String] Icon URL. + attr_accessor :icon_url + + # @return [String] License URL. + attr_accessor :license_url + + # @return [String] Feed URL. + attr_accessor :feed_url + + # @return [Array] List of authors. + attr_accessor :authors + + # @return [String] Installer command line parameters. + attr_accessor :installation_args + + # @return [DateTime] Published timestamp. + attr_accessor :published_date_time + + # @return [Integer] Count of downloads. + attr_accessor :download_count + + # @return [Boolean] true if the local version is the latest + # version; false otherwise. + attr_accessor :local_is_latest_version + + # @return [String] Local path. + attr_accessor :local_path + + # @return [DateTime] Installed timestamp. + attr_accessor :installed_date_time + + # @return [String] Provisioning state. + attr_accessor :provisioning_state + + # @return [String] Site Extension comment. + attr_accessor :comment + + + # + # Mapper for SiteExtensionInfo class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SiteExtensionInfo', + type: { + name: 'Composite', + class_name: 'SiteExtensionInfo', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + site_extension_info_id: { + required: false, + serialized_name: 'properties.id', + type: { + name: 'String' + } + }, + title: { + required: false, + serialized_name: 'properties.title', + type: { + name: 'String' + } + }, + site_extension_info_type: { + required: false, + serialized_name: 'properties.type', + type: { + name: 'Enum', + module: 'SiteExtensionType' + } + }, + summary: { + required: false, + serialized_name: 'properties.summary', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'properties.description', + type: { + name: 'String' + } + }, + version: { + required: false, + serialized_name: 'properties.version', + type: { + name: 'String' + } + }, + extension_url: { + required: false, + serialized_name: 'properties.extensionUrl', + type: { + name: 'String' + } + }, + project_url: { + required: false, + serialized_name: 'properties.projectUrl', + type: { + name: 'String' + } + }, + icon_url: { + required: false, + serialized_name: 'properties.iconUrl', + type: { + name: 'String' + } + }, + license_url: { + required: false, + serialized_name: 'properties.licenseUrl', + type: { + name: 'String' + } + }, + feed_url: { + required: false, + serialized_name: 'properties.feedUrl', + type: { + name: 'String' + } + }, + authors: { + required: false, + serialized_name: 'properties.authors', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + installation_args: { + required: false, + serialized_name: 'properties.installationArgs', + type: { + name: 'String' + } + }, + published_date_time: { + required: false, + serialized_name: 'properties.publishedDateTime', + type: { + name: 'DateTime' + } + }, + download_count: { + required: false, + serialized_name: 'properties.downloadCount', + type: { + name: 'Number' + } + }, + local_is_latest_version: { + required: false, + serialized_name: 'properties.localIsLatestVersion', + type: { + name: 'Boolean' + } + }, + local_path: { + required: false, + serialized_name: 'properties.localPath', + type: { + name: 'String' + } + }, + installed_date_time: { + required: false, + serialized_name: 'properties.installedDateTime', + type: { + name: 'DateTime' + } + }, + provisioning_state: { + required: false, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + comment: { + required: false, + serialized_name: 'properties.comment', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_info_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_info_collection.rb new file mode 100644 index 0000000000..221e8efc60 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_info_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::ARM::Web + module Models + # + # Collection of Kudu site extension information elements. + # + class SiteExtensionInfoCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [SiteExtensionInfoCollection] 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 SiteExtensionInfoCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SiteExtensionInfoCollection', + type: { + name: 'Composite', + class_name: 'SiteExtensionInfoCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SiteExtensionInfoElementType', + type: { + name: 'Composite', + class_name: 'SiteExtensionInfo' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_type.rb new file mode 100644 index 0000000000..44fd9b829c --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_extension_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::ARM::Web + module Models + # + # Defines values for SiteExtensionType + # + module SiteExtensionType + Gallery = "Gallery" + WebRoot = "WebRoot" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb old mode 100755 new mode 100644 index 9454aa12a1..66f308fb31 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Instance of an app. # - class SiteInstance < MsRestAzure::Resource + class SiteInstance < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Name of instance. attr_accessor :site_instance_name @@ -39,6 +38,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +51,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, site_instance_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_limits.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_limits.rb old mode 100755 new mode 100644 index 029a3b5f3e..ec6bbe4aaa --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_limits.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_limits.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SiteLimits include MsRestAzure - include MsRest::JSONable # @return [Float] Maximum allowed CPU usage percentage. attr_accessor :max_percentage_cpu diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_load_balancing.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_load_balancing.rb old mode 100755 new mode 100644 index 5736ed9293..3f9e78507a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_load_balancing.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_load_balancing.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb old mode 100755 new mode 100644 index 4dfd47e574..92841e495e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Configuration of App Service site logs. # - class SiteLogsConfig < MsRestAzure::Resource + class SiteLogsConfig < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [ApplicationLogsConfig] Application logs configuration. attr_accessor :application_logs @@ -48,6 +47,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,34 +60,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, application_logs: { required: false, serialized_name: 'properties.applicationLogs', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_machine_key.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_machine_key.rb old mode 100755 new mode 100644 index e8081f4f0d..bff8e13900 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_machine_key.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_machine_key.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SiteMachineKey include MsRestAzure - include MsRest::JSONable # @return [String] MachineKey validation. attr_accessor :validation diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb old mode 100755 new mode 100644 index 34ce470603..2240801e83 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Used for getting PHP error logging flag. # - class SitePhpErrorLogFlag < MsRestAzure::Resource + class SitePhpErrorLogFlag < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Local log_errors setting. attr_accessor :local_log_errors @@ -48,6 +47,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,34 +60,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, local_log_errors: { required: false, serialized_name: 'properties.localLogErrors', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal.rb old mode 100755 new mode 100644 index a93c726f01..cfed5a75c5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SiteSeal include MsRestAzure - include MsRest::JSONable # @return [String] HTML snippet attr_accessor :html diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal_request.rb old mode 100755 new mode 100644 index 5e86475f65..82ca6fb9be --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SiteSealRequest include MsRestAzure - include MsRest::JSONable # @return [Boolean] Theme attr_accessor :light_theme diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb old mode 100755 new mode 100644 index c8026985e2..785173845e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Source control configuration for an app. # - class SiteSourceControl < MsRestAzure::Resource + class SiteSourceControl < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Repository or source control URL. attr_accessor :repo_url @@ -55,6 +54,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -67,34 +67,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, repo_url: { required: false, serialized_name: 'properties.repoUrl', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_capacity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_capacity.rb old mode 100755 new mode 100644 index 9bbcdcc243..a5033d1f18 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_capacity.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_capacity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SkuCapacity include MsRestAzure - include MsRest::JSONable # @return [Integer] Minimum number of workers for this App Service plan # SKU. attr_accessor :minimum diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_description.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_description.rb old mode 100755 new mode 100644 index 6a89933003..76d0720968 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_description.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_description.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SkuDescription include MsRestAzure - include MsRest::JSONable # @return [String] Name of the resource SKU. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info.rb old mode 100755 new mode 100644 index 5f09fa1866..178f50f0c9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SkuInfo include MsRestAzure - include MsRest::JSONable # @return [String] Resource type that this SKU applies to. attr_accessor :resource_type diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info_collection.rb old mode 100755 new mode 100644 index a614bbdbe0..b357a1de28 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_infos.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_infos.rb old mode 100755 new mode 100644 index bffad352e0..c092d85462 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_infos.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_infos.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SkuInfos include MsRestAzure - include MsRest::JSONable # @return [String] Resource type that this SKU applies to. attr_accessor :resource_type diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_name.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_name.rb old mode 100755 new mode 100644 index b6df202059..03e38cf1e9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_name.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_name.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -14,6 +14,7 @@ module SkuName Basic = "Basic" Standard = "Standard" Premium = "Premium" + PremiumV2 = "PremiumV2" Dynamic = "Dynamic" Isolated = "Isolated" end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb old mode 100755 new mode 100644 index 2cfbe3c1c2..80d2645b55 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Slot Config names azure resource. # - class SlotConfigNamesResource < MsRestAzure::Resource + class SlotConfigNamesResource < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Array] List of connection string names. attr_accessor :connection_string_names @@ -42,6 +41,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -54,34 +54,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, connection_string_names: { required: false, serialized_name: 'properties.connectionStringNames', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb old mode 100755 new mode 100644 index 5de32d0f52..633c4041d2 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A setting difference between two deployment slots of an app. # - class SlotDifference < MsRestAzure::Resource + class SlotDifference < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Type of the difference: Information, Warning or Error. attr_accessor :slot_difference_type @@ -59,6 +58,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -71,34 +71,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, slot_difference_type: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb old mode 100755 new mode 100644 index 1154b8c857..905ad26493 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_swap_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_swap_status.rb old mode 100755 new mode 100644 index 6328df9786..b943f17dbe --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_swap_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_swap_status.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SlotSwapStatus include MsRestAzure - include MsRest::JSONable # @return [DateTime] The time the last successful slot swap completed. attr_accessor :timestamp_utc diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb old mode 100755 new mode 100644 index 7eeeeea402..b539412dcb --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class SlowRequestsBasedTrigger include MsRestAzure - include MsRest::JSONable # @return [String] Time taken. attr_accessor :time_taken diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb old mode 100755 new mode 100644 index 9539c708ec..47fc7e9ac9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,12 +8,11 @@ module Models # # A snapshot of an app. # - class Snapshot < MsRestAzure::Resource + class Snapshot < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable - # @return [DateTime] The time the snapshot was taken. + # @return [String] The time the snapshot was taken. attr_accessor :time @@ -39,6 +38,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,40 +51,20 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, time: { required: false, read_only: true, serialized_name: 'properties.time', type: { - name: 'DateTime' + name: 'String' } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_collection.rb old mode 100755 new mode 100644 index 07a5d29e00..e4ec71c33c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_request.rb new file mode 100644 index 0000000000..04bee1aeb8 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_request.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::ARM::Web + module Models + # + # Details about app recovery operation. + # + class SnapshotRecoveryRequest < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Point in time in which the app recovery should be + # attempted, formatted as a DateTime string. + attr_accessor :snapshot_time + + # @return [SnapshotRecoveryTarget] Specifies the web app that snapshot + # contents will be written to. + attr_accessor :recovery_target + + # @return [Boolean] If true the recovery operation can + # overwrite source app; otherwise, false. + attr_accessor :overwrite + + # @return [Boolean] If true, site configuration, in addition to content, + # will be reverted. + attr_accessor :recover_configuration + + # @return [Boolean] If true, custom hostname conflicts will be ignored + # when recovering to a target web app. + # This setting is only necessary when RecoverConfiguration is enabled. + attr_accessor :ignore_conflicting_host_names + + + # + # Mapper for SnapshotRecoveryRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SnapshotRecoveryRequest', + type: { + name: 'Composite', + class_name: 'SnapshotRecoveryRequest', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + snapshot_time: { + required: false, + serialized_name: 'properties.snapshotTime', + type: { + name: 'String' + } + }, + recovery_target: { + required: false, + serialized_name: 'properties.recoveryTarget', + type: { + name: 'Composite', + class_name: 'SnapshotRecoveryTarget' + } + }, + overwrite: { + required: false, + serialized_name: 'properties.overwrite', + type: { + name: 'Boolean' + } + }, + recover_configuration: { + required: false, + serialized_name: 'properties.recoverConfiguration', + type: { + name: 'Boolean' + } + }, + ignore_conflicting_host_names: { + required: false, + serialized_name: 'properties.ignoreConflictingHostNames', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_target.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_target.rb new file mode 100644 index 0000000000..a8babe89f4 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_target.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Specifies the web app that snapshot contents will be written to. + # + class SnapshotRecoveryTarget + + include MsRestAzure + + # @return [String] Geographical location of the target web app, e.g. + # SouthEastAsia, SouthCentralUS + attr_accessor :location + + # @return [String] ARM resource ID of the target app. + # /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + # for production slots and + # /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + # for other slots. + attr_accessor :id + + + # + # Mapper for SnapshotRecoveryTarget class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SnapshotRecoveryTarget', + type: { + name: 'Composite', + class_name: 'SnapshotRecoveryTarget', + model_properties: { + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb old mode 100755 new mode 100644 index 19b35330af..336b71aa27 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # The source control OAuth token. # - class SourceControl < MsRestAzure::Resource + class SourceControl < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Name or source control type. attr_accessor :source_control_name @@ -51,6 +50,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +63,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, source_control_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control_collection.rb old mode 100755 new mode 100644 index 42af8d1d5e..fa2b2ff4c9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ssl_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ssl_state.rb old mode 100755 new mode 100644 index bf1d4ef3cf..e0a62482b9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ssl_state.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ssl_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity.rb old mode 100755 new mode 100644 index 5360411c16..fc308a3f52 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StampCapacity include MsRestAzure - include MsRest::JSONable # @return [String] Name of the stamp. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb old mode 100755 new mode 100644 index 1a6f8e7484..544c75586b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb old mode 100755 new mode 100644 index 4b4b221f48..833c0de9a0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class StatusCodesBasedTrigger include MsRestAzure - include MsRest::JSONable # @return [Integer] HTTP status code. attr_accessor :status diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_options.rb old mode 100755 new mode 100644 index bf1f72ad8a..8672ede993 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_options.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb old mode 100755 new mode 100644 index f0b043afd4..3d7cee10d9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Options for app content migration. # - class StorageMigrationOptions < MsRestAzure::Resource + class StorageMigrationOptions < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] AzureFiles connection string. attr_accessor :azurefiles_connection_string @@ -51,6 +50,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +63,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, azurefiles_connection_string: { required: false, serialized_name: 'properties.azurefilesConnectionString', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb old mode 100755 new mode 100644 index 9c8620d690..e564828b18 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Response for a migration of app content request. # - class StorageMigrationResponse < MsRestAzure::Resource + class StorageMigrationResponse < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] When server starts the migration process, it will # return an operation ID identifying that particular migration operation. attr_accessor :operation_id @@ -40,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -52,34 +52,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, operation_id: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb old mode 100755 new mode 100644 index a4bc740378..9f8b6c6a0a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # String dictionary resource. # - class StringDictionary < MsRestAzure::Resource + class StringDictionary < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Hash{String => String}] Settings. attr_accessor :properties @@ -39,6 +38,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +51,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, properties: { required: false, serialized_name: 'properties', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb old mode 100755 new mode 100644 index 77823e3d09..f301132ad8 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TldLegalAgreement include MsRestAzure - include MsRest::JSONable # @return [String] Unique identifier for the agreement. attr_accessor :agreement_key diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb old mode 100755 new mode 100644 index b65267f724..a115a0927e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb old mode 100755 new mode 100644 index bb7cf58f0f..4b79efba3d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # A top level domain object. # - class TopLevelDomain < MsRestAzure::Resource + class TopLevelDomain < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Name of the top level domain. attr_accessor :domain_name @@ -43,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +55,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, domain_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb old mode 100755 new mode 100644 index a1dfde494d..ad799df1fb --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class TopLevelDomainAgreementOption include MsRestAzure - include MsRest::JSONable # @return [Boolean] If true, then the list of agreements # will include agreements for domain privacy as well; otherwise, # false. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb old mode 100755 new mode 100644 index 0e53730cdd..59fbc57a89 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_history.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_history.rb new file mode 100644 index 0000000000..eebbbe29f4 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_history.rb @@ -0,0 +1,84 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Triggered Web Job History. List of Triggered Web Job Run Information + # elements. + # + class TriggeredJobHistory < ProxyOnlyResource + + include MsRestAzure + + # @return [Array] List of triggered web job runs. + attr_accessor :triggered_job_runs + + + # + # Mapper for TriggeredJobHistory class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TriggeredJobHistory', + type: { + name: 'Composite', + class_name: 'TriggeredJobHistory', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + triggered_job_runs: { + required: false, + serialized_name: 'properties.triggeredJobRuns', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TriggeredJobRunElementType', + type: { + name: 'Composite', + class_name: 'TriggeredJobRun' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_history_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_history_collection.rb new file mode 100644 index 0000000000..8e009aeac6 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_history_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::ARM::Web + module Models + # + # Collection of Kudu continuous web job information elements. + # + class TriggeredJobHistoryCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [TriggeredJobHistoryCollection] 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 TriggeredJobHistoryCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TriggeredJobHistoryCollection', + type: { + name: 'Composite', + class_name: 'TriggeredJobHistoryCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TriggeredJobHistoryElementType', + type: { + name: 'Composite', + class_name: 'TriggeredJobHistory' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_run.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_run.rb new file mode 100644 index 0000000000..46a6227131 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_job_run.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::ARM::Web + module Models + # + # Triggered Web Job Run Information. + # + class TriggeredJobRun < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Job ID. + attr_accessor :triggered_job_run_id + + # @return [String] Job name. + attr_accessor :triggered_job_run_name + + # @return [TriggeredWebJobStatus] Job status. Possible values include: + # 'Success', 'Failed', 'Error' + attr_accessor :status + + # @return [DateTime] Start time. + attr_accessor :start_time + + # @return [DateTime] End time. + attr_accessor :end_time + + # @return [String] Job duration. + attr_accessor :duration + + # @return [String] Output URL. + attr_accessor :output_url + + # @return [String] Error URL. + attr_accessor :error_url + + # @return [String] Job URL. + attr_accessor :url + + # @return [String] Job name. + attr_accessor :job_name + + # @return [String] Job trigger. + attr_accessor :trigger + + + # + # Mapper for TriggeredJobRun class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TriggeredJobRun', + type: { + name: 'Composite', + class_name: 'TriggeredJobRun', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + triggered_job_run_id: { + required: false, + serialized_name: 'properties.id', + type: { + name: 'String' + } + }, + triggered_job_run_name: { + required: false, + read_only: true, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + status: { + required: false, + serialized_name: 'properties.status', + type: { + name: 'Enum', + module: 'TriggeredWebJobStatus' + } + }, + start_time: { + required: false, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + serialized_name: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + duration: { + required: false, + serialized_name: 'properties.duration', + type: { + name: 'String' + } + }, + output_url: { + required: false, + serialized_name: 'properties.outputUrl', + type: { + name: 'String' + } + }, + error_url: { + required: false, + serialized_name: 'properties.errorUrl', + type: { + name: 'String' + } + }, + url: { + required: false, + serialized_name: 'properties.url', + type: { + name: 'String' + } + }, + job_name: { + required: false, + serialized_name: 'properties.jobName', + type: { + name: 'String' + } + }, + trigger: { + required: false, + serialized_name: 'properties.trigger', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job.rb new file mode 100644 index 0000000000..171aabaf2d --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job.rb @@ -0,0 +1,179 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Triggered Web Job Information. + # + class TriggeredWebJob < ProxyOnlyResource + + include MsRestAzure + + # @return [TriggeredJobRun] Latest job run information. + attr_accessor :latest_run + + # @return [String] History URL. + attr_accessor :history_url + + # @return [String] Scheduler Logs URL. + attr_accessor :scheduler_logs_url + + # @return [String] Job name. Used as job identifier in ARM resource URI. + attr_accessor :triggered_web_job_name + + # @return [String] Run command. + attr_accessor :run_command + + # @return [String] Job URL. + attr_accessor :url + + # @return [String] Extra Info URL. + attr_accessor :extra_info_url + + # @return [WebJobType] Job type. Possible values include: 'Continuous', + # 'Triggered' + attr_accessor :job_type + + # @return [String] Error information. + attr_accessor :error + + # @return [Boolean] Using SDK? + attr_accessor :using_sdk + + # @return Job settings. + attr_accessor :settings + + + # + # Mapper for TriggeredWebJob class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TriggeredWebJob', + type: { + name: 'Composite', + class_name: 'TriggeredWebJob', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + latest_run: { + required: false, + serialized_name: 'properties.latestRun', + type: { + name: 'Composite', + class_name: 'TriggeredJobRun' + } + }, + history_url: { + required: false, + serialized_name: 'properties.historyUrl', + type: { + name: 'String' + } + }, + scheduler_logs_url: { + required: false, + serialized_name: 'properties.schedulerLogsUrl', + type: { + name: 'String' + } + }, + triggered_web_job_name: { + required: false, + read_only: true, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + run_command: { + required: false, + serialized_name: 'properties.runCommand', + type: { + name: 'String' + } + }, + url: { + required: false, + serialized_name: 'properties.url', + type: { + name: 'String' + } + }, + extra_info_url: { + required: false, + serialized_name: 'properties.extraInfoUrl', + type: { + name: 'String' + } + }, + job_type: { + required: false, + serialized_name: 'properties.jobType', + type: { + name: 'Enum', + module: 'WebJobType' + } + }, + error: { + required: false, + serialized_name: 'properties.error', + type: { + name: 'String' + } + }, + using_sdk: { + required: false, + serialized_name: 'properties.usingSdk', + type: { + name: 'Boolean' + } + }, + settings: { + required: false, + serialized_name: 'properties.settings', + type: { + name: 'Object' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job_collection.rb new file mode 100644 index 0000000000..2723e25dce --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job_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::ARM::Web + module Models + # + # Collection of Kudu continuous web job information elements. + # + class TriggeredWebJobCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [TriggeredWebJobCollection] 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 TriggeredWebJobCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'TriggeredWebJobCollection', + type: { + name: 'Composite', + class_name: 'TriggeredWebJobCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TriggeredWebJobElementType', + type: { + name: 'Composite', + class_name: 'TriggeredWebJob' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job_status.rb new file mode 100644 index 0000000000..f003dc3115 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/triggered_web_job_status.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::ARM::Web + module Models + # + # Defines values for TriggeredWebJobStatus + # + module TriggeredWebJobStatus + Success = "Success" + Failed = "Failed" + Error = "Error" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb old mode 100755 new mode 100644 index 291cd3ac91..415d2f9979 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb old mode 100755 new mode 100644 index 67a1e3756e..916c9de1ff --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Usage of the quota resource. # - class Usage < MsRestAzure::Resource + class Usage < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Friendly name shown in the UI. attr_accessor :display_name @@ -64,6 +63,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -76,34 +76,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, display_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_collection.rb old mode 100755 new mode 100644 index 7fb4a1918f..65ed88e7b4 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_state.rb old mode 100755 new mode 100644 index 6ed5888c81..95eb1a3536 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_state.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_state.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb old mode 100755 new mode 100644 index 99cf3dc3d2..3bdc21cb7a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # User crendentials used for publishing activity. # - class User < MsRestAzure::Resource + class User < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] Username attr_accessor :user_name @@ -51,6 +50,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +63,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, user_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_request.rb old mode 100755 new mode 100644 index 98e50a43f2..1beb1a191d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_request.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ValidateRequest include MsRestAzure - include MsRest::JSONable # @return [String] Resource name to verify. attr_accessor :name diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_resource_types.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_resource_types.rb old mode 100755 new mode 100644 index a44b906753..3048b3596d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_resource_types.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_resource_types.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response.rb old mode 100755 new mode 100644 index 9f8de78e5d..00df012c17 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ValidateResponse include MsRestAzure - include MsRest::JSONable # @return [String] Result of validation. attr_accessor :status diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response_error.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response_error.rb old mode 100755 new mode 100644 index e4be059e14..f89bb3e96c --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response_error.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response_error.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class ValidateResponseError include MsRestAzure - include MsRest::JSONable # @return [String] Validation error code. attr_accessor :code diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_application.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_application.rb old mode 100755 new mode 100644 index 07af3de5e2..0768f3aa21 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_application.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_application.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualApplication include MsRestAzure - include MsRest::JSONable # @return [String] Virtual path. attr_accessor :virtual_path diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_directory.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_directory.rb old mode 100755 new mode 100644 index d89007b40d..c5cc6978a2 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_directory.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_directory.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualDirectory include MsRestAzure - include MsRest::JSONable # @return [String] Path to virtual application. attr_accessor :virtual_path diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb old mode 100755 new mode 100644 index 09fb1d957f..a69fa48cdb --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualIPMapping include MsRestAzure - include MsRest::JSONable # @return [String] Virtual IP address. attr_accessor :virtual_ip diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb old mode 100755 new mode 100644 index 3284ca6b18..4c17e4d167 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class VirtualNetworkProfile include MsRestAzure - include MsRest::JSONable # @return [String] Resource id of the Virtual Network. attr_accessor :id diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb old mode 100755 new mode 100644 index 610cf06f5b..e77bb749e6 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # The Virtual Network gateway contract. This is used to give the Virtual # Network gateway access to the VPN package. # - class VnetGateway < MsRestAzure::Resource + class VnetGateway < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] The Virtual Network name. attr_accessor :vnet_name @@ -43,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +55,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, vnet_name: { required: false, serialized_name: 'properties.vnetName', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb old mode 100755 new mode 100644 index 038b45a8fe..8c186727e1 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Virtual Network information contract. # - class VnetInfo + class VnetInfo < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] The Virtual Network's resource ID. attr_accessor :vnet_resource_id @@ -49,9 +48,40 @@ def self.mapper() name: 'Composite', class_name: 'VnetInfo', 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, vnet_resource_id: { required: false, - serialized_name: 'vnetResourceId', + serialized_name: 'properties.vnetResourceId', type: { name: 'String' } @@ -59,14 +89,14 @@ def self.mapper() cert_thumbprint: { required: false, read_only: true, - serialized_name: 'certThumbprint', + serialized_name: 'properties.certThumbprint', type: { name: 'String' } }, cert_blob: { required: false, - serialized_name: 'certBlob', + serialized_name: 'properties.certBlob', type: { name: 'String' } @@ -74,7 +104,7 @@ def self.mapper() routes: { required: false, read_only: true, - serialized_name: 'routes', + serialized_name: 'properties.routes', type: { name: 'Sequence', element: { @@ -90,14 +120,14 @@ def self.mapper() resync_required: { required: false, read_only: true, - serialized_name: 'resyncRequired', + serialized_name: 'properties.resyncRequired', type: { name: 'Boolean' } }, dns_servers: { required: false, - serialized_name: 'dnsServers', + serialized_name: 'properties.dnsServers', type: { name: 'String' } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_parameters.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_parameters.rb new file mode 100644 index 0000000000..03d9fd8f17 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_parameters.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::ARM::Web + module Models + # + # The required set of inputs to validate a VNET + # + class VnetParameters < ProxyOnlyResource + + include MsRestAzure + + # @return [String] The Resource Group of the VNET to be validated + attr_accessor :vnet_resource_group + + # @return [String] The name of the VNET to be validated + attr_accessor :vnet_name + + # @return [String] The subnet name to be validated + attr_accessor :vnet_subnet_name + + + # + # Mapper for VnetParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VnetParameters', + type: { + name: 'Composite', + class_name: 'VnetParameters', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + vnet_resource_group: { + required: false, + serialized_name: 'properties.vnetResourceGroup', + type: { + name: 'String' + } + }, + vnet_name: { + required: false, + serialized_name: 'properties.vnetName', + type: { + name: 'String' + } + }, + vnet_subnet_name: { + required: false, + serialized_name: 'properties.vnetSubnetName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb old mode 100755 new mode 100644 index 5a4438d3e7..da7066b570 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -9,11 +9,10 @@ module Models # Virtual Network route contract used to pass routing information for a # Virtual Network. # - class VnetRoute < MsRestAzure::Resource + class VnetRoute < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [String] The name of this route. This is only returned by the # server and does not need to be set by the client. attr_accessor :vnet_route_name @@ -61,6 +60,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -73,34 +73,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, vnet_route_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_validation_failure_details.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_validation_failure_details.rb new file mode 100644 index 0000000000..36af74fb0f --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_validation_failure_details.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::ARM::Web + module Models + # + # A class that describes the reason for a validation failure. + # + class VnetValidationFailureDetails < ProxyOnlyResource + + include MsRestAzure + + # @return [Boolean] A flag describing whether or not validation failed. + attr_accessor :failed + + # @return [Array] A list of tests that failed + # in the validation. + attr_accessor :failed_tests + + + # + # Mapper for VnetValidationFailureDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VnetValidationFailureDetails', + type: { + name: 'Composite', + class_name: 'VnetValidationFailureDetails', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + failed: { + required: false, + serialized_name: 'properties.failed', + type: { + name: 'Boolean' + } + }, + failed_tests: { + required: false, + serialized_name: 'properties.failedTests', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VnetValidationTestFailureElementType', + type: { + name: 'Composite', + class_name: 'VnetValidationTestFailure' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_validation_test_failure.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_validation_test_failure.rb new file mode 100644 index 0000000000..c3d25f7a06 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_validation_test_failure.rb @@ -0,0 +1,86 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # A class that describes a test that failed during NSG and UDR validation. + # + class VnetValidationTestFailure < ProxyOnlyResource + + include MsRestAzure + + # @return [String] The name of the test that failed. + attr_accessor :test_name + + # @return [String] The details of what caused the failure, e.g. the + # blocking rule name, etc. + attr_accessor :details + + + # + # Mapper for VnetValidationTestFailure class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VnetValidationTestFailure', + type: { + name: 'Composite', + class_name: 'VnetValidationTestFailure', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + test_name: { + required: false, + serialized_name: 'properties.testName', + type: { + name: 'String' + } + }, + details: { + required: false, + serialized_name: 'properties.details', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_collection.rb old mode 100755 new mode 100644 index ae66e7b3ab..ad54c7fd4d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_instance_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_instance_collection.rb old mode 100755 new mode 100644 index b6146218f4..411e8fb682 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_instance_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_instance_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job.rb new file mode 100644 index 0000000000..16f7d13283 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job.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::ARM::Web + module Models + # + # Web Job Information. + # + class WebJob < ProxyOnlyResource + + include MsRestAzure + + # @return [String] Job name. Used as job identifier in ARM resource URI. + attr_accessor :web_job_name + + # @return [String] Run command. + attr_accessor :run_command + + # @return [String] Job URL. + attr_accessor :url + + # @return [String] Extra Info URL. + attr_accessor :extra_info_url + + # @return [WebJobType] Job type. Possible values include: 'Continuous', + # 'Triggered' + attr_accessor :job_type + + # @return [String] Error information. + attr_accessor :error + + # @return [Boolean] Using SDK? + attr_accessor :using_sdk + + # @return Job settings. + attr_accessor :settings + + + # + # Mapper for WebJob class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebJob', + type: { + name: 'Composite', + class_name: 'WebJob', + 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' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + web_job_name: { + required: false, + read_only: true, + serialized_name: 'properties.name', + type: { + name: 'String' + } + }, + run_command: { + required: false, + serialized_name: 'properties.runCommand', + type: { + name: 'String' + } + }, + url: { + required: false, + serialized_name: 'properties.url', + type: { + name: 'String' + } + }, + extra_info_url: { + required: false, + serialized_name: 'properties.extraInfoUrl', + type: { + name: 'String' + } + }, + job_type: { + required: false, + serialized_name: 'properties.jobType', + type: { + name: 'Enum', + module: 'WebJobType' + } + }, + error: { + required: false, + serialized_name: 'properties.error', + type: { + name: 'String' + } + }, + using_sdk: { + required: false, + serialized_name: 'properties.usingSdk', + type: { + name: 'Boolean' + } + }, + settings: { + required: false, + serialized_name: 'properties.settings', + type: { + name: 'Object' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job_collection.rb new file mode 100644 index 0000000000..cf8b3fa384 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job_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::ARM::Web + module Models + # + # Collection of Kudu web job information elements. + # + class WebJobCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + 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 [WebJobCollection] 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 WebJobCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'WebJobCollection', + type: { + name: 'Composite', + class_name: 'WebJobCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'WebJobElementType', + type: { + name: 'Composite', + class_name: 'WebJob' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job_type.rb new file mode 100644 index 0000000000..0b1329e238 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_job_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::ARM::Web + module Models + # + # Defines values for WebJobType + # + module WebJobType + Continuous = "Continuous" + Triggered = "Triggered" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool.rb old mode 100755 new mode 100644 index 05a077d0e2..8711be0e43 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -12,7 +12,6 @@ class WorkerPool include MsRestAzure - include MsRest::JSONable # @return [Integer] Worker size ID for referencing this worker pool. attr_accessor :worker_size_id diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb old mode 100755 new mode 100644 index 628eaef44c..af10c8368e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb old mode 100755 new mode 100644 index d8c60c0efe..61ed667656 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -8,11 +8,10 @@ module Models # # Worker pool of an App Service Environment ARM resource. # - class WorkerPoolResource < MsRestAzure::Resource + class WorkerPoolResource < ProxyOnlyResource include MsRestAzure - include MsRest::JSONable # @return [Integer] Worker size ID for referencing this worker pool. attr_accessor :worker_size_id @@ -56,6 +55,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -68,34 +68,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - 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' - } - } - } - }, worker_size_id: { required: false, serialized_name: 'properties.workerSizeId', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_size_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_size_options.rb old mode 100755 new mode 100644 index 3056c922d5..fe4040abaa --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_size_options.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_size_options.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/module_definition.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/module_definition.rb old mode 100755 new mode 100644 index eabe9353a8..a2892814d6 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/module_definition.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/module_definition.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb old mode 100755 new mode 100644 index fcfcf3c969..4c9e924d28 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -98,6 +98,81 @@ def get_available_stacks_async(custom_headers = nil) promise.execute end + # + # @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_operations(custom_headers = nil) + first_page = list_operations_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # @param custom_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_operations_with_http_info(custom_headers = nil) + list_operations_async(custom_headers).value! + end + + # + # @param [Hash{String => String}] 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_operations_async(custom_headers = nil) + api_version = '2016-03-01' + + + request_headers = {} + + # Set 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.Web/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmOperationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 available application frameworks and their versions # @@ -177,5 +252,104 @@ def get_available_stacks_on_prem_async(custom_headers = nil) promise.execute end + # + # @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 [CsmOperationCollection] operation results. + # + def list_operations_next(next_page_link, custom_headers = nil) + response = list_operations_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # @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_operations_next_with_http_info(next_page_link, custom_headers = nil) + list_operations_next_async(next_page_link, custom_headers).value! + end + + # + # @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_operations_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmOperationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CsmOperationCollection] which provide lazy access to pages of the + # response. + # + def list_operations_as_lazy(custom_headers = nil) + response = list_operations_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_operations_next_async(next_page_link, custom_headers) + end + page + end + end + end end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/recommendations.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/recommendations.rb old mode 100755 new mode 100644 index 68b25f005b..7cd52e7ff4 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/recommendations.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/recommendations.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/top_level_domains.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/top_level_domains.rb old mode 100755 new mode 100644 index 6c434a2613..1b49022173 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/top_level_domains.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/top_level_domains.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/version.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/version.rb old mode 100755 new mode 100644 index 3947c7dedb..3e9f958439 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/version.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/version.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Web - VERSION = '0.11.0' + VERSION = '0.14.0' end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb old mode 100755 new mode 100644 index e0f6bb81bb..5b5868325a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -330,13 +330,13 @@ def get_async(resource_group_name, name, custom_headers = nil) # example. # @param skip_dns_registration [Boolean] If true web app hostname is not # registered with DNS on creation. This parameter is - # only used for app creation + # only used for app creation. # @param skip_custom_domain_verification [Boolean] If true, custom (non # *.azurewebsites.net) domains associated with web app are not verified. # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS + # registered with DNS. # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # domain name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -356,13 +356,13 @@ def create_or_update(resource_group_name, name, site_envelope, skip_dns_registra # example. # @param skip_dns_registration [Boolean] If true web app hostname is not # registered with DNS on creation. This parameter is - # only used for app creation + # only used for app creation. # @param skip_custom_domain_verification [Boolean] If true, custom (non # *.azurewebsites.net) domains associated with web app are not verified. # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS + # registered with DNS. # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # domain name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -395,11 +395,11 @@ def create_or_update_async(resource_group_name, name, site_envelope, skip_dns_re # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app to delete. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted + # @param delete_metrics [Boolean] If true, web app metrics are also deleted. # @param delete_empty_server_farm [Boolean] Specify true if the App Service # plan will be empty after app deletion and you want to delete the empty App # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -417,11 +417,11 @@ def delete(resource_group_name, name, delete_metrics = nil, delete_empty_server_ # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app to delete. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted + # @param delete_metrics [Boolean] If true, web app metrics are also deleted. # @param delete_empty_server_farm [Boolean] Specify true if the App Service # plan will be empty after app deletion and you want to delete the empty App # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -439,11 +439,11 @@ def delete_with_http_info(resource_group_name, name, delete_metrics = nil, delet # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app to delete. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted + # @param delete_metrics [Boolean] If true, web app metrics are also deleted. # @param delete_empty_server_farm [Boolean] Specify true if the App Service # plan will be empty after app deletion and you want to delete the empty App # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -498,8 +498,8 @@ def delete_async(resource_group_name, name, delete_metrics = nil, delete_empty_s # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param host_name [String] Custom hostname + # @param name [String] Name of web app. + # @param host_name [String] Custom hostname. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -517,8 +517,8 @@ def analyze_custom_hostname(resource_group_name, name, host_name = nil, custom_h # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param host_name [String] Custom hostname + # @param name [String] Name of web app. + # @param host_name [String] Custom hostname. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -535,8 +535,8 @@ def analyze_custom_hostname_with_http_info(resource_group_name, name, host_name # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param host_name [String] Custom hostname + # @param name [String] Name of web app. + # @param host_name [String] Custom hostname. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -1253,9 +1253,9 @@ def delete_backup_async(resource_group_name, name, backup_id, custom_headers = n # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request + # @param name [String] Name of web app. + # @param backup_id [String] ID of backup. + # @param request [BackupRequest] Information on backup request. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -1279,9 +1279,9 @@ def list_backup_status_secrets(resource_group_name, name, backup_id, request, cu # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request + # @param name [String] Name of web app. + # @param backup_id [String] ID of backup. + # @param request [BackupRequest] Information on backup request. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -1304,9 +1304,9 @@ def list_backup_status_secrets_with_http_info(resource_group_name, name, backup_ # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request + # @param name [String] Name of web app. + # @param backup_id [String] ID of backup. + # @param request [BackupRequest] Information on backup request. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -1384,7 +1384,7 @@ def list_backup_status_secrets_async(resource_group_name, name, backup_id, reque # resource belongs. # @param name [String] Name of the app. # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request + # @param request [RestoreRequest] Information on restore request . # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -1400,7 +1400,7 @@ def restore(resource_group_name, name, backup_id, request, custom_headers = nil) # resource belongs. # @param name [String] Name of the app. # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request + # @param request [RestoreRequest] Information on restore request . # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -1745,9 +1745,9 @@ def list_application_settings_async(resource_group_name, name, custom_headers = # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app + # web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -1765,9 +1765,9 @@ def update_auth_settings(resource_group_name, name, site_auth_settings, custom_h # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app + # web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -1784,9 +1784,9 @@ def update_auth_settings_with_http_info(resource_group_name, name, site_auth_set # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app + # web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -2957,8 +2957,8 @@ def list_publishing_credentials_async(resource_group_name, name, custom_headers # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app + # @param name [String] Name of web app. + # @param push_settings [PushSettings] Push settings associated with web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -2976,8 +2976,8 @@ def update_site_push_settings(resource_group_name, name, push_settings, custom_h # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app + # @param name [String] Name of web app. + # @param push_settings [PushSettings] Push settings associated with web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -2994,8 +2994,8 @@ def update_site_push_settings_with_http_info(resource_group_name, name, push_set # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app + # @param name [String] Name of web app. + # @param push_settings [PushSettings] Push settings associated with web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -3070,7 +3070,7 @@ def update_site_push_settings_async(resource_group_name, name, push_settings, cu # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -3088,7 +3088,7 @@ def list_site_push_settings(resource_group_name, name, custom_headers = nil) # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -3105,7 +3105,7 @@ def list_site_push_settings_with_http_info(resource_group_name, name, custom_hea # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -4047,60 +4047,54 @@ def recover_site_configuration_snapshot_async(resource_group_name, name, snapsho end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List continuous web jobs for an app, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List continuous web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # - def list_deployments(resource_group_name, name, custom_headers = nil) - first_page = list_deployments_as_lazy(resource_group_name, name, custom_headers) + def list_continuous_web_jobs(resource_group_name, name, custom_headers = nil) + first_page = list_continuous_web_jobs_as_lazy(resource_group_name, name, custom_headers) first_page.get_all_items end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List continuous web jobs for an app, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List continuous web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_deployments_with_http_info(resource_group_name, name, custom_headers = nil) - list_deployments_async(resource_group_name, name, custom_headers).value! + def list_continuous_web_jobs_with_http_info(resource_group_name, name, custom_headers = nil) + list_continuous_web_jobs_async(resource_group_name, name, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List continuous web jobs for an app, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List continuous web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_deployments_async(resource_group_name, name, custom_headers = nil) + def list_continuous_web_jobs_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -4112,7 +4106,7 @@ def list_deployments_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/deployments' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs' request_url = @base_url || @client.base_url @@ -4139,7 +4133,7 @@ def list_deployments_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ContinuousWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -4153,66 +4147,64 @@ def list_deployments_async(resource_group_name, name, custom_headers = nil) end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets a continuous web job by its ID for an app, or a deployment slot. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [ContinuousWebJob] operation results. # - def get_deployment(resource_group_name, name, id, custom_headers = nil) - response = get_deployment_async(resource_group_name, name, id, custom_headers).value! + def get_continuous_web_job(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = get_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! response.body unless response.nil? end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets a continuous web job by its ID for an app, or a deployment slot. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_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_deployment_with_http_info(resource_group_name, name, id, custom_headers = nil) - get_deployment_async(resource_group_name, name, id, custom_headers).value! + def get_continuous_web_job_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + get_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets a continuous web job by its ID for an app, or a deployment slot. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param [Hash{String => String}] 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_deployment_async(resource_group_name, name, id, custom_headers = nil) + def get_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4222,14 +4214,14 @@ def get_deployment_async(resource_group_name, name, id, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -4239,7 +4231,7 @@ def get_deployment_async(resource_group_name, name, id, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -4249,7 +4241,7 @@ def get_deployment_async(resource_group_name, name, id, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::ContinuousWebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -4263,70 +4255,63 @@ def get_deployment_async(resource_group_name, name, id, custom_headers = nil) end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Delete a continuous web job by its ID for an app, or a deployment slot. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Delete a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param deployment [Deployment] Deployment details. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. # - def create_deployment(resource_group_name, name, id, deployment, custom_headers = nil) - response = create_deployment_async(resource_group_name, name, id, deployment, custom_headers).value! - response.body unless response.nil? + def delete_continuous_web_job(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = delete_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + nil end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Delete a continuous web job by its ID for an app, or a deployment slot. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Delete a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param deployment [Deployment] Deployment details. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_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_deployment_with_http_info(resource_group_name, name, id, deployment, custom_headers = nil) - create_deployment_async(resource_group_name, name, id, deployment, custom_headers).value! + def delete_continuous_web_job_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + delete_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Delete a continuous web job by its ID for an app, or a deployment slot. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Delete a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param deployment [Deployment] Deployment details. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param [Hash{String => String}] 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_deployment_async(resource_group_name, name, id, deployment, custom_headers = nil) + def delete_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? - fail ArgumentError, 'deployment is nil' if deployment.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4336,48 +4321,29 @@ def create_deployment_async(resource_group_name, name, id, deployment, custom_he # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Deployment.mapper() - request_content = @client.serialize(request_mapper, deployment) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - body: request_content, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + 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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -4386,65 +4352,63 @@ def create_deployment_async(resource_group_name, name, id, deployment, custom_he end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Start a continuous web job for an app, or a deployment slot. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Start a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def delete_deployment(resource_group_name, name, id, custom_headers = nil) - response = delete_deployment_async(resource_group_name, name, id, custom_headers).value! + def start_continuous_web_job(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = start_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! nil end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Start a continuous web job for an app, or a deployment slot. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Start a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_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_deployment_with_http_info(resource_group_name, name, id, custom_headers = nil) - delete_deployment_async(resource_group_name, name, id, custom_headers).value! + def start_continuous_web_job_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + start_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Start a continuous web job for an app, or a deployment slot. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Start a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param [Hash{String => String}] 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_deployment_async(resource_group_name, name, id, custom_headers = nil) + def start_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4454,24 +4418,24 @@ def delete_deployment_async(resource_group_name, name, id, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 204 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -4485,56 +4449,63 @@ def delete_deployment_async(resource_group_name, name, id, custom_headers = nil) end # - # Lists ownership identifiers for domain associated with web app. + # Stop a continuous web job for an app, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Stop a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @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_domain_ownership_identifiers(resource_group_name, name, custom_headers = nil) - first_page = list_domain_ownership_identifiers_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def stop_continuous_web_job(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = stop_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + nil end # - # Lists ownership identifiers for domain associated with web app. + # Stop a continuous web job for an app, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Stop a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_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_domain_ownership_identifiers_with_http_info(resource_group_name, name, custom_headers = nil) - list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers).value! + def stop_continuous_web_job_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + stop_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! end # - # Lists ownership identifiers for domain associated with web app. + # Stop a continuous web job for an app, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Stop a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param [Hash{String => String}] 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_domain_ownership_identifiers_async(resource_group_name, name, custom_headers = nil) + def stop_continuous_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4544,39 +4515,29 @@ def list_domain_ownership_identifiers_async(resource_group_name, name, custom_he # Set Headers request_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.Web/sites/{name}/domainOwnershipIdentifiers' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -4585,63 +4546,56 @@ def list_domain_ownership_identifiers_async(resource_group_name, name, custom_he end # - # Get domain ownership identifier for web app. + # List deployments for an app, or a deployment slot. # - # Get domain ownership identifier for web app. + # List deployments for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. + # @return [Array] operation results. # - def get_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) - response = get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! - response.body unless response.nil? + def list_deployments(resource_group_name, name, custom_headers = nil) + first_page = list_deployments_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Get domain ownership identifier for web app. + # List deployments for an app, or a deployment slot. # - # Get domain ownership identifier for web app. + # List deployments for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # 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_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) - get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! + def list_deployments_with_http_info(resource_group_name, name, custom_headers = nil) + list_deployments_async(resource_group_name, name, custom_headers).value! end # - # Get domain ownership identifier for web app. + # List deployments for an app, or a deployment slot. # - # Get domain ownership identifier for web app. + # List deployments for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # 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_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) + def list_deployments_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4651,13 +4605,13 @@ def get_domain_ownership_identifier_async(resource_group_name, name, domain_owne # Set Headers request_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.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -4678,7 +4632,7 @@ def get_domain_ownership_identifier_async(resource_group_name, name, domain_owne if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -4692,76 +4646,60 @@ def get_domain_ownership_identifier_async(resource_group_name, name, domain_owne end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Get a deployment by its ID for an app, or a deployment slot. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Get a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param id [String] Deployment ID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. + # @return [Deployment] operation results. # - def create_or_update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) - response = create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! + def get_deployment(resource_group_name, name, id, custom_headers = nil) + response = get_deployment_async(resource_group_name, name, id, custom_headers).value! response.body unless response.nil? end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Get a deployment by its ID for an app, or a deployment slot. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Get a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param id [String] Deployment ID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) - create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! + def get_deployment_with_http_info(resource_group_name, name, id, custom_headers = nil) + get_deployment_async(resource_group_name, name, id, custom_headers).value! end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Get a deployment by its ID for an app, or a deployment slot. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Get a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param id [String] Deployment ID. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) + def get_deployment_async(resource_group_name, name, id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? - fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4771,27 +4709,18 @@ def create_or_update_domain_ownership_identifier_async(resource_group_name, name # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Identifier.mapper() - request_content = @client.serialize(request_mapper, domain_ownership_identifier) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -4807,7 +4736,7 @@ def create_or_update_domain_ownership_identifier_async(resource_group_name, name if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -4821,62 +4750,64 @@ def create_or_update_domain_ownership_identifier_async(resource_group_name, name end # - # Deletes a domain ownership identifier for a web app. + # Create a deployment for an app, or a deployment slot. # - # Deletes a domain ownership identifier for a web app. + # Create a deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param id [String] ID of an existing deployment. + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Deployment] operation results. # - def delete_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) - response = delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! - nil + def create_deployment(resource_group_name, name, id, deployment, custom_headers = nil) + response = create_deployment_async(resource_group_name, name, id, deployment, custom_headers).value! + response.body unless response.nil? end # - # Deletes a domain ownership identifier for a web app. + # Create a deployment for an app, or a deployment slot. # - # Deletes a domain ownership identifier for a web app. + # Create a deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param id [String] ID of an existing deployment. + # @param deployment [Deployment] Deployment details. # @param custom_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_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) - delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! + def create_deployment_with_http_info(resource_group_name, name, id, deployment, custom_headers = nil) + create_deployment_async(resource_group_name, name, id, deployment, custom_headers).value! end # - # Deletes a domain ownership identifier for a web app. + # Create a deployment for an app, or a deployment slot. # - # Deletes a domain ownership identifier for a web app. + # Create a deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param id [String] ID of an existing deployment. + # @param deployment [Deployment] Deployment details. # @param [Hash{String => String}] 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_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) + def create_deployment_async(resource_group_name, name, id, deployment, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4886,29 +4817,48 @@ def delete_domain_ownership_identifier_async(resource_group_name, name, domain_o # Set Headers request_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.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' - request_url = @base_url || @client.base_url + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Deployment.mapper() + request_content = @client.serialize(request_mapper, deployment) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' + + request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -4917,76 +4867,59 @@ def delete_domain_ownership_identifier_async(resource_group_name, name, domain_o end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Delete a deployment by its ID for an app, or a deployment slot. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Delete a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param id [String] Deployment ID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. # - def update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) - response = update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! - response.body unless response.nil? + def delete_deployment(resource_group_name, name, id, custom_headers = nil) + response = delete_deployment_async(resource_group_name, name, id, custom_headers).value! + nil end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Delete a deployment by its ID for an app, or a deployment slot. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Delete a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param id [String] Deployment ID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) - update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! + def delete_deployment_with_http_info(resource_group_name, name, id, custom_headers = nil) + delete_deployment_async(resource_group_name, name, id, custom_headers).value! end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Delete a deployment by its ID for an app, or a deployment slot. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Delete a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param id [String] Deployment ID. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) + def delete_deployment_async(resource_group_name, name, id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? - fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -4996,48 +4929,29 @@ def update_domain_ownership_identifier_async(resource_group_name, name, domain_o # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Identifier.mapper() - request_content = @client.serialize(request_mapper, domain_ownership_identifier) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -5046,56 +4960,66 @@ def update_domain_ownership_identifier_async(resource_group_name, name, domain_o end # - # Get hostname bindings for an app or a deployment slot. + # List deployment log for specific deployment for an app, or a deployment slot. # - # Get hostname bindings for an app or a deployment slot. + # List deployment log for specific deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] The ID of a specific deployment. This is the value of the + # name property in the JSON response from "GET + # /api/sites/{siteName}/deployments". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Deployment] operation results. # - def list_host_name_bindings(resource_group_name, name, custom_headers = nil) - first_page = list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def list_deployment_log(resource_group_name, name, id, custom_headers = nil) + response = list_deployment_log_async(resource_group_name, name, id, custom_headers).value! + response.body unless response.nil? end # - # Get hostname bindings for an app or a deployment slot. + # List deployment log for specific deployment for an app, or a deployment slot. # - # Get hostname bindings for an app or a deployment slot. + # List deployment log for specific deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] The ID of a specific deployment. This is the value of the + # name property in the JSON response from "GET + # /api/sites/{siteName}/deployments". # @param custom_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_host_name_bindings_with_http_info(resource_group_name, name, custom_headers = nil) - list_host_name_bindings_async(resource_group_name, name, custom_headers).value! + def list_deployment_log_with_http_info(resource_group_name, name, id, custom_headers = nil) + list_deployment_log_async(resource_group_name, name, id, custom_headers).value! end # - # Get hostname bindings for an app or a deployment slot. + # List deployment log for specific deployment for an app, or a deployment slot. # - # Get hostname bindings for an app or a deployment slot. + # List deployment log for specific deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] The ID of a specific deployment. This is the value of the + # name property in the JSON response from "GET + # /api/sites/{siteName}/deployments". # @param [Hash{String => String}] 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_host_name_bindings_async(resource_group_name, name, custom_headers = nil) + def list_deployment_log_async(resource_group_name, name, id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5105,13 +5029,13 @@ def list_host_name_bindings_async(resource_group_name, name, custom_headers = ni # Set Headers request_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.Web/sites/{name}/hostNameBindings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -5132,7 +5056,7 @@ def list_host_name_bindings_async(resource_group_name, name, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5146,60 +5070,56 @@ def list_host_name_bindings_async(resource_group_name, name, custom_headers = ni end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [Array] operation results. # - def get_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) - response = get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! - response.body unless response.nil? + def list_domain_ownership_identifiers(resource_group_name, name, custom_headers = nil) + first_page = list_domain_ownership_identifiers_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. # @param custom_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_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) - get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! + def list_domain_ownership_identifiers_with_http_info(resource_group_name, name, custom_headers = nil) + list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers).value! end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] 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_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) + def list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5209,13 +5129,13 @@ def get_host_name_binding_async(resource_group_name, name, host_name, custom_hea # Set Headers request_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.Web/sites/{name}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -5236,7 +5156,7 @@ def get_host_name_binding_async(resource_group_name, name, host_name, custom_hea if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5250,67 +5170,63 @@ def get_host_name_binding_async(resource_group_name, name, host_name, custom_hea end # - # Creates a hostname binding for an app. + # Get domain ownership identifier for web app. # - # Creates a hostname binding for an app. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [Identifier] operation results. # - def create_or_update_host_name_binding(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) - response = create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! + def get_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) + response = get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! response.body unless response.nil? end # - # Creates a hostname binding for an app. + # Get domain ownership identifier for web app. # - # Creates a hostname binding for an app. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # 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_host_name_binding_with_http_info(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) - create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! + def get_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) + get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! end # - # Creates a hostname binding for an app. + # Get domain ownership identifier for web app. # - # Creates a hostname binding for an app. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # 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_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) + def get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? - fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5320,27 +5236,18 @@ def create_or_update_host_name_binding_async(resource_group_name, name, host_nam # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() - request_content = @client.serialize(request_mapper, host_name_binding) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -5356,7 +5263,7 @@ def create_or_update_host_name_binding_async(resource_group_name, name, host_nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5370,59 +5277,76 @@ def create_or_update_host_name_binding_async(resource_group_name, name, host_nam end # - # Deletes a hostname binding for an app. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Deletes a hostname binding for an app. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Identifier] operation results. # - def delete_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) - response = delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! - nil + def create_or_update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) + response = create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! + response.body unless response.nil? end # - # Deletes a hostname binding for an app. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Deletes a hostname binding for an app. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param custom_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_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) - delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! + def create_or_update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) + create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! end # - # Deletes a hostname binding for an app. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Deletes a hostname binding for an app. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. + # @param [Hash{String => String}] 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_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) + def create_or_update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5432,29 +5356,48 @@ def delete_host_name_binding_async(resource_group_name, name, host_name, custom_ # Set Headers request_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.Web/sites/{name}/hostNameBindings/{hostName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Identifier.mapper() + request_content = @client.serialize(request_mapper, domain_ownership_identifier) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -5463,64 +5406,62 @@ def delete_host_name_binding_async(resource_group_name, name, host_name, custom_ end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Deletes a domain ownership identifier for a web app. # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. # - def get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - response = get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! - response.body unless response.nil? + def delete_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) + response = delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! + nil end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Deletes a domain ownership identifier for a web app. # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # 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_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def delete_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) + delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers).value! end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Deletes a domain ownership identifier for a web app. # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # 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_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + def delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5530,39 +5471,29 @@ def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay # Set Headers request_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.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -5571,71 +5502,76 @@ def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [Identifier] operation results. # - def create_or_update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - response = create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def update_domain_ownership_identifier(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) + response = update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! response.body unless response.nil? end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param custom_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_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def update_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) + update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param [Hash{String => String}] 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_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + def update_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5649,23 +5585,23 @@ def create_or_update_hybrid_connection_async(resource_group_name, name, namespac request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) + request_mapper = Azure::ARM::Web::Models::Identifier.mapper() + request_content = @client.serialize(request_mapper, domain_ownership_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -5681,7 +5617,7 @@ def create_or_update_hybrid_connection_async(resource_group_name, name, namespac if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5695,63 +5631,56 @@ def create_or_update_hybrid_connection_async(resource_group_name, name, namespac end # - # Removes a Hybrid Connection from this site. + # Get the status of the last MSDeploy operation. # - # Removes a Hybrid Connection from this site. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [MSDeployStatus] operation results. # - def delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - response = delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! - nil + def get_msdeploy_status(resource_group_name, name, custom_headers = nil) + response = get_msdeploy_status_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? end # - # Removes a Hybrid Connection from this site. + # Get the status of the last MSDeploy operation. # - # Removes a Hybrid Connection from this site. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of web app. # @param custom_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_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def get_msdeploy_status_with_http_info(resource_group_name, name, custom_headers = nil) + get_msdeploy_status_async(resource_group_name, name, custom_headers).value! end # - # Removes a Hybrid Connection from this site. + # Get the status of the last MSDeploy operation. # - # Removes a Hybrid Connection from this site. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of web app. # @param [Hash{String => String}] 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_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + def get_msdeploy_status_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5761,29 +5690,39 @@ def delete_hybrid_connection_async(resource_group_name, name, namespace_name, re # Set Headers request_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.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -5792,71 +5731,104 @@ def delete_hybrid_connection_async(resource_group_name, name, namespace_name, re end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Invoke the MSDeploy web app extension. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Invoke the MSDeploy web app extension. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of web app. + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [MSDeployStatus] operation results. # - def update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - response = update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers = nil) + response = create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers).value! response.body unless response.nil? end # - # Creates a new Hybrid Connection using a Service Bus relay. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Creates a new Hybrid Connection using a Service Bus relay. + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers = nil) + # Send request + promise = begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.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 + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of web app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployLog] operation results. + # + def get_msdeploy_log(resource_group_name, name, custom_headers = nil) + response = get_msdeploy_log_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. # @param custom_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_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def get_msdeploy_log_with_http_info(resource_group_name, name, custom_headers = nil) + get_msdeploy_log_async(resource_group_name, name, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Get the MSDeploy Log for the last MSDeploy operation. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of web app. # @param [Hash{String => String}] 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_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + def get_msdeploy_log_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5866,33 +5838,24 @@ def update_hybrid_connection_async(resource_group_name, name, namespace_name, re # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -5902,7 +5865,7 @@ def update_hybrid_connection_async(resource_group_name, name, namespace_name, re if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5916,64 +5879,56 @@ def update_hybrid_connection_async(resource_group_name, name, namespace_name, re end # - # Gets the send key name and value for a Hybrid Connection. + # List the functions for a web site, or a deployment slot. # - # Gets the send key name and value for a Hybrid Connection. + # List the functions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnectionKey] operation results. + # @return [Array] operation results. # - def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! - response.body unless response.nil? + def list_functions(resource_group_name, name, custom_headers = nil) + first_page = list_functions_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Gets the send key name and value for a Hybrid Connection. + # List the functions for a web site, or a deployment slot. # - # Gets the send key name and value for a Hybrid Connection. + # List the functions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def list_functions_with_http_info(resource_group_name, name, custom_headers = nil) + list_functions_async(resource_group_name, name, custom_headers).value! end # - # Gets the send key name and value for a Hybrid Connection. + # List the functions for a web site, or a deployment slot. # - # Gets the send key name and value for a Hybrid Connection. + # List the functions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Site name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + def list_functions_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5983,24 +5938,24 @@ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, # Set Headers request_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.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -6010,7 +5965,7 @@ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() + result_mapper = Azure::ARM::Web::Models::FunctionEnvelopeCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6024,54 +5979,54 @@ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Fetch a short lived token that can be exchanged for a master key. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app + # @param name [String] Name of web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [String] operation results. # - def list_hybrid_connections(resource_group_name, name, custom_headers = nil) - response = list_hybrid_connections_async(resource_group_name, name, custom_headers).value! + def get_functions_admin_token(resource_group_name, name, custom_headers = nil) + response = get_functions_admin_token_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Fetch a short lived token that can be exchanged for a master key. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app + # @param name [String] Name of web app. # @param custom_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_hybrid_connections_with_http_info(resource_group_name, name, custom_headers = nil) - list_hybrid_connections_async(resource_group_name, name, custom_headers).value! + def get_functions_admin_token_with_http_info(resource_group_name, name, custom_headers = nil) + get_functions_admin_token_async(resource_group_name, name, custom_headers).value! end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Fetch a short lived token that can be exchanged for a master key. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app + # @param name [String] Name of web app. # @param [Hash{String => String}] 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_hybrid_connections_async(resource_group_name, name, custom_headers = nil) + def get_functions_admin_token_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -6083,7 +6038,7 @@ def list_hybrid_connections_async(resource_group_name, name, custom_headers = ni # Set Headers request_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.Web/sites/{name}/hybridConnectionRelays' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token' request_url = @base_url || @client.base_url @@ -6110,7 +6065,13 @@ def list_hybrid_connections_async(resource_group_name, name, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6124,62 +6085,60 @@ def list_hybrid_connections_async(resource_group_name, name, custom_headers = ni end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Get function information by its ID for web site, or a deployment slot. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Get function information by its ID for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [FunctionEnvelope] operation results. # - def list_relay_service_connections(resource_group_name, name, custom_headers = nil) - response = list_relay_service_connections_async(resource_group_name, name, custom_headers).value! + def get_function(resource_group_name, name, function_name, custom_headers = nil) + response = get_function_async(resource_group_name, name, function_name, custom_headers).value! response.body unless response.nil? end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Get function information by its ID for web site, or a deployment slot. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Get function information by its ID for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_relay_service_connections_with_http_info(resource_group_name, name, custom_headers = nil) - list_relay_service_connections_async(resource_group_name, name, custom_headers).value! + def get_function_with_http_info(resource_group_name, name, function_name, custom_headers = nil) + get_function_async(resource_group_name, name, function_name, custom_headers).value! end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Get function information by its ID for web site, or a deployment slot. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Get function information by its ID for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_relay_service_connections_async(resource_group_name, name, custom_headers = nil) + def get_function_async(resource_group_name, name, function_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6189,13 +6148,13 @@ def list_relay_service_connections_async(resource_group_name, name, custom_heade # Set Headers request_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.Web/sites/{name}/hybridconnection' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -6206,7 +6165,7 @@ def list_relay_service_connections_async(resource_group_name, name, custom_heade http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -6216,7 +6175,7 @@ def list_relay_service_connections_async(resource_group_name, name, custom_heade if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::FunctionEnvelope.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6230,60 +6189,109 @@ def list_relay_service_connections_async(resource_group_name, name, custom_heade end # - # Gets a hybrid connection configuration by its name. + # Create function for web site, or a deployment slot. # - # Gets a hybrid connection configuration by its name. + # Create function for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param function_envelope [FunctionEnvelope] Function details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [FunctionEnvelope] operation results. # - def get_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) - response = get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + def create_function(resource_group_name, name, function_name, function_envelope, custom_headers = nil) + response = create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers).value! response.body unless response.nil? end # - # Gets a hybrid connection configuration by its name. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param function_envelope [FunctionEnvelope] Function details. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Gets a hybrid connection configuration by its name. + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers = nil) + # Send request + promise = begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::FunctionEnvelope.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 + + # + # Delete a function for web site, or a deployment slot. + # + # Delete a function for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_function(resource_group_name, name, function_name, custom_headers = nil) + response = delete_function_async(resource_group_name, name, function_name, custom_headers).value! + nil + end + + # + # Delete a function for web site, or a deployment slot. + # + # Delete a function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) - get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + def delete_function_with_http_info(resource_group_name, name, function_name, custom_headers = nil) + delete_function_async(resource_group_name, name, function_name, custom_headers).value! end # - # Gets a hybrid connection configuration by its name. + # Delete a function for web site, or a deployment slot. # - # Gets a hybrid connection configuration by its name. + # Delete a function for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) + def delete_function_async(resource_group_name, name, function_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6293,39 +6301,29 @@ def get_relay_service_connection_async(resource_group_name, name, entity_name, c # Set Headers request_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.Web/sites/{name}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -6334,73 +6332,60 @@ def get_relay_service_connection_async(resource_group_name, name, entity_name, c end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get function secrets for a function in a web site, or a deployment slot. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get function secrets for a function in a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [FunctionSecrets] operation results. # - def create_or_update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - response = create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def list_function_secrets(resource_group_name, name, function_name, custom_headers = nil) + response = list_function_secrets_async(resource_group_name, name, function_name, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get function secrets for a function in a web site, or a deployment slot. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get function secrets for a function in a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def list_function_secrets_with_http_info(resource_group_name, name, function_name, custom_headers = nil) + list_function_secrets_async(resource_group_name, name, function_name, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get function secrets for a function in a web site, or a deployment slot. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get function secrets for a function in a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + def list_function_secrets_async(resource_group_name, name, function_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6410,27 +6395,18 @@ def create_or_update_relay_service_connection_async(resource_group_name, name, e # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6446,7 +6422,7 @@ def create_or_update_relay_service_connection_async(resource_group_name, name, e if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::FunctionSecrets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6460,59 +6436,56 @@ def create_or_update_relay_service_connection_async(resource_group_name, name, e end # - # Deletes a relay service connection by its name. + # Get hostname bindings for an app or a deployment slot. # - # Deletes a relay service connection by its name. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def delete_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) - response = delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! - nil + def list_host_name_bindings(resource_group_name, name, custom_headers = nil) + first_page = list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Deletes a relay service connection by its name. + # Get hostname bindings for an app or a deployment slot. # - # Deletes a relay service connection by its name. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_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_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) - delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + def list_host_name_bindings_with_http_info(resource_group_name, name, custom_headers = nil) + list_host_name_bindings_async(resource_group_name, name, custom_headers).value! end # - # Deletes a relay service connection by its name. + # Get hostname bindings for an app or a deployment slot. # - # Deletes a relay service connection by its name. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. # @param [Hash{String => String}] 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_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) + def list_host_name_bindings_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6522,29 +6495,39 @@ def delete_relay_service_connection_async(resource_group_name, name, entity_name # Set Headers request_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.Web/sites/{name}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -6553,73 +6536,60 @@ def delete_relay_service_connection_async(resource_group_name, name, entity_name end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [HostNameBinding] operation results. # - def update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - response = update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def get_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) + response = get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param host_name [String] Hostname in the hostname binding. # @param custom_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_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def get_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) + get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] 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_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + def get_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6629,27 +6599,18 @@ def update_relay_service_connection_async(resource_group_name, name, entity_name # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6665,7 +6626,7 @@ def update_relay_service_connection_async(resource_group_name, name, entity_name if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6679,56 +6640,67 @@ def update_relay_service_connection_async(resource_group_name, name, entity_name end # - # Gets all scale-out instances of an app. + # Creates a hostname binding for an app. # - # Gets all scale-out instances of an app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [HostNameBinding] operation results. # - def list_instance_identifiers(resource_group_name, name, custom_headers = nil) - first_page = list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def create_or_update_host_name_binding(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) + response = create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! + response.body unless response.nil? end # - # Gets all scale-out instances of an app. + # Creates a hostname binding for an app. # - # Gets all scale-out instances of an app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param custom_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_instance_identifiers_with_http_info(resource_group_name, name, custom_headers = nil) - list_instance_identifiers_async(resource_group_name, name, custom_headers).value! + def create_or_update_host_name_binding_with_http_info(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) + create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! end # - # Gets all scale-out instances of an app. + # Creates a hostname binding for an app. # - # Gets all scale-out instances of an app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param [Hash{String => String}] 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_instance_identifiers_async(resource_group_name, name, custom_headers = nil) + def create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? + fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6738,18 +6710,27 @@ def list_instance_identifiers_async(resource_group_name, name, custom_headers = # Set Headers request_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.Web/sites/{name}/instances' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + request_content = @client.serialize(request_mapper, host_name_binding) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6765,7 +6746,7 @@ def list_instance_identifiers_async(resource_group_name, name, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6779,72 +6760,59 @@ def list_instance_identifiers_async(resource_group_name, name, custom_headers = end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a hostname binding for an app. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param host_name [String] Hostname in the hostname binding. # @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_instance_deployments(resource_group_name, name, instance_id, custom_headers = nil) - first_page = list_instance_deployments_as_lazy(resource_group_name, name, instance_id, custom_headers) - first_page.get_all_items + def delete_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) + response = delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! + nil end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a hostname binding for an app. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param host_name [String] Hostname in the hostname binding. # @param custom_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_instance_deployments_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) - list_instance_deployments_async(resource_group_name, name, instance_id, custom_headers).value! + def delete_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) + delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a hostname binding for an app. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] 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_instance_deployments_async(resource_group_name, name, instance_id, custom_headers = nil) + def delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6854,39 +6822,29 @@ def list_instance_deployments_async(resource_group_name, name, instance_id, cust # Set Headers request_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.Web/sites/{name}/instances/{instanceId}/deployments' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -6895,76 +6853,64 @@ def list_instance_deployments_async(resource_group_name, name, instance_id, cust end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [HybridConnection] operation results. # - def get_instance_deployment(resource_group_name, name, id, instance_id, custom_headers = nil) - response = get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + def get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + response = get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! response.body unless response.nil? end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param custom_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_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, custom_headers = nil) - get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + def get_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param [Hash{String => String}] 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_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers = nil) + def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6974,13 +6920,13 @@ def get_instance_deployment_async(resource_group_name, name, id, instance_id, cu # Set Headers request_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.Web/sites/{name}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -7001,7 +6947,7 @@ def get_instance_deployment_async(resource_group_name, name, id, instance_id, cu if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7015,80 +6961,71 @@ def get_instance_deployment_async(resource_group_name, name, id, instance_id, cu end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [HybridConnection] operation results. # - def create_instance_deployment(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) - response = create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers).value! + def create_or_update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + response = create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! response.body unless response.nil? end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. # @param custom_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_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) - create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers).value! + def create_or_update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. # @param [Hash{String => String}] 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_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) + def create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? - fail ArgumentError, 'deployment is nil' if deployment.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7102,17 +7039,17 @@ def create_instance_deployment_async(resource_group_name, name, id, instance_id, request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::Deployment.mapper() - request_content = @client.serialize(request_mapper, deployment) + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -7134,7 +7071,7 @@ def create_instance_deployment_async(resource_group_name, name, id, instance_id, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7148,75 +7085,63 @@ def create_instance_deployment_async(resource_group_name, name, id, instance_id, end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Removes a Hybrid Connection from this site. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def delete_instance_deployment(resource_group_name, name, id, instance_id, custom_headers = nil) - response = delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + def delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + response = delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! nil end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Removes a Hybrid Connection from this site. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param custom_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_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, custom_headers = nil) - delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + def delete_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Removes a Hybrid Connection from this site. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param [Hash{String => String}] 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_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers = nil) + def delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7226,13 +7151,13 @@ def delete_instance_deployment_async(resource_group_name, name, id, instance_id, # Set Headers request_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.Web/sites/{name}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -7243,7 +7168,7 @@ def delete_instance_deployment_async(resource_group_name, name, id, instance_id, http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -7257,56 +7182,71 @@ def delete_instance_deployment_async(resource_group_name, name, id, instance_id, end # - # Shows whether an app can be cloned to another resource group or subscription. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Shows whether an app can be cloned to another resource group or subscription. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteCloneability] operation results. + # @return [HybridConnection] operation results. # - def is_cloneable(resource_group_name, name, custom_headers = nil) - response = is_cloneable_async(resource_group_name, name, custom_headers).value! + def update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + response = update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! response.body unless response.nil? end # - # Shows whether an app can be cloned to another resource group or subscription. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Shows whether an app can be cloned to another resource group or subscription. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def is_cloneable_with_http_info(resource_group_name, name, custom_headers = nil) - is_cloneable_async(resource_group_name, name, custom_headers).value! + def update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! end # - # Shows whether an app can be cloned to another resource group or subscription. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Shows whether an app can be cloned to another resource group or subscription. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def is_cloneable_async(resource_group_name, name, custom_headers = nil) + def update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7316,18 +7256,27 @@ def is_cloneable_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/iscloneable' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -7343,7 +7292,7 @@ def is_cloneable_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7357,56 +7306,64 @@ def is_cloneable_async(resource_group_name, name, custom_headers = nil) end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets the send key name and value for a Hybrid Connection. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [HybridConnectionKey] operation results. # - def list_metric_definitions(resource_group_name, name, custom_headers = nil) - first_page = list_metric_definitions_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + response.body unless response.nil? end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets the send key name and value for a Hybrid Connection. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param custom_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_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil) - list_metric_definitions_async(resource_group_name, name, custom_headers).value! + def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets the send key name and value for a Hybrid Connection. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. # @param [Hash{String => String}] 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_metric_definitions_async(resource_group_name, name, custom_headers = nil) + def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7416,18 +7373,18 @@ def list_metric_definitions_async(resource_group_name, name, custom_headers = ni # Set Headers request_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.Web/sites/{name}/metricdefinitions' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -7443,7 +7400,7 @@ def list_metric_definitions_async(resource_group_name, name, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7457,72 +7414,54 @@ def list_metric_definitions_async(resource_group_name, name, custom_headers = ni end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] The name of the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [HybridConnection] operation results. # - def list_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) - first_page = list_metrics_as_lazy(resource_group_name, name, details, filter, custom_headers) - first_page.get_all_items + def list_hybrid_connections(resource_group_name, name, custom_headers = nil) + response = list_hybrid_connections_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] The name of the web app. # @param custom_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_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) - list_metrics_async(resource_group_name, name, details, filter, custom_headers).value! + def list_hybrid_connections_with_http_info(resource_group_name, name, custom_headers = nil) + list_hybrid_connections_async(resource_group_name, name, custom_headers).value! end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] The name of the web app. # @param [Hash{String => String}] 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_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + def list_hybrid_connections_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -7534,15 +7473,14 @@ def list_metrics_async(resource_group_name, name, details = nil, filter = nil, c # Set Headers request_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.Web/sites/{name}/metrics' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'details' => details,'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -7562,7 +7500,7 @@ def list_metrics_async(resource_group_name, name, details = nil, filter = nil, c if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7576,162 +7514,166 @@ def list_metrics_async(resource_group_name, name, details = nil, filter = nil, c end # - # Restores a web app. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Restores a web app. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # @param subscription_name [String] Azure subscription # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param name [String] Name of the app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StorageMigrationResponse] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) - response = migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! + def list_relay_service_connections(resource_group_name, name, custom_headers = nil) + response = list_relay_service_connections_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # @param subscription_name [String] Azure subscription + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). + # + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). + # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param name [String] Name of the app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Concurrent::Promise] promise which provides async access to http - # response. + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) - # Send request - promise = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers) + def list_relay_service_connections_with_http_info(resource_group_name, name, custom_headers = nil) + list_relay_service_connections_async(resource_group_name, name, custom_headers).value! + end - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::StorageMigrationResponse.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) + # + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). + # + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] 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_relay_service_connections_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/hybridconnection' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result end - promise + promise.execute end # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Gets a hybrid connection configuration by its name. # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_request_envelope [MigrateMySqlRequest] MySql migration - # options + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Operation] operation results. - # - def migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers = nil) - response = migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param migration_request_envelope [MigrateMySqlRequest] MySql migration - # options - # @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 migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers = nil) - # Send request - promise = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::Operation.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 - - # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled - # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MigrateMySqlStatus] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def get_migrate_my_sql_status(resource_group_name, name, custom_headers = nil) - response = get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! + def get_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) + response = get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! response.body unless response.nil? end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Gets a hybrid connection configuration by its name. # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. # @param custom_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_migrate_my_sql_status_with_http_info(resource_group_name, name, custom_headers = nil) - get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! + def get_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) + get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Gets a hybrid connection configuration by its name. # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. # @param [Hash{String => String}] 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_migrate_my_sql_status_async(resource_group_name, name, custom_headers = nil) + def get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7741,13 +7683,13 @@ def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = # Set Headers request_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.Web/sites/{name}/migratemysql/status' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -7768,7 +7710,7 @@ def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7782,63 +7724,73 @@ def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = end # - # Gets all network features used by the app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets all network features used by the app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NetworkFeatures] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def list_network_features(resource_group_name, name, view, custom_headers = nil) - response = list_network_features_async(resource_group_name, name, view, custom_headers).value! + def create_or_update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + response = create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! response.body unless response.nil? end # - # Gets all network features used by the app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets all network features used by the app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_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_network_features_with_http_info(resource_group_name, name, view, custom_headers = nil) - list_network_features_async(resource_group_name, name, view, custom_headers).value! + def create_or_update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! end # - # Gets all network features used by the app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets all network features used by the app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param [Hash{String => String}] 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_network_features_async(resource_group_name, name, view, custom_headers = nil) + def create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'view is nil' if view.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7848,24 +7800,33 @@ def list_network_features_async(resource_group_name, name, view, custom_headers # Set Headers request_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.Web/sites/{name}/networkFeatures/{view}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -7875,7 +7836,7 @@ def list_network_features_async(resource_group_name, name, view, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7889,71 +7850,59 @@ def list_network_features_async(resource_group_name, name, view, custom_headers end # - # Start capturing network packets for the site. + # Deletes a relay service connection by its name. # - # Start capturing network packets for the site. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. # - def start_web_site_network_trace(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - response = start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! - response.body unless response.nil? + def delete_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) + response = delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + nil end # - # Start capturing network packets for the site. + # Deletes a relay service connection by its name. # - # Start capturing network packets for the site. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def start_web_site_network_trace_with_http_info(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + def delete_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) + delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! end # - # Start capturing network packets for the site. + # Deletes a relay service connection by its name. # - # Start capturing network packets for the site. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + def delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7963,45 +7912,29 @@ def start_web_site_network_trace_async(resource_group_name, name, duration_in_se # Set Headers request_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.Web/sites/{name}/networkTrace/start' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 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 = { - required: false, - serialized_name: 'parsed_response', - type: { - name: 'String' - } - } - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -8010,56 +7943,73 @@ def start_web_site_network_trace_async(resource_group_name, name, duration_in_se end # - # Stop ongoing capturing network packets for the site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Stop ongoing capturing network packets for the site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def stop_web_site_network_trace(resource_group_name, name, custom_headers = nil) - response = stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! + def update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + response = update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! response.body unless response.nil? end # - # Stop ongoing capturing network packets for the site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Stop ongoing capturing network packets for the site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def stop_web_site_network_trace_with_http_info(resource_group_name, name, custom_headers = nil) - stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! + def update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! end # - # Stop ongoing capturing network packets for the site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Stop ongoing capturing network packets for the site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def stop_web_site_network_trace_async(resource_group_name, name, custom_headers = nil) + def update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8069,18 +8019,27 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers # Set Headers request_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.Web/sites/{name}/networkTrace/stop' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -8096,13 +8055,7 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers 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: 'String' - } - } + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8116,11 +8069,9 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets all scale-out instances of an app. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -8128,18 +8079,17 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def generate_new_site_publishing_password(resource_group_name, name, custom_headers = nil) - response = generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! - nil + def list_instance_identifiers(resource_group_name, name, custom_headers = nil) + first_page = list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets all scale-out instances of an app. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -8149,16 +8099,14 @@ def generate_new_site_publishing_password(resource_group_name, name, custom_head # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_new_site_publishing_password_with_http_info(resource_group_name, name, custom_headers = nil) - generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! + def list_instance_identifiers_with_http_info(resource_group_name, name, custom_headers = nil) + list_instance_identifiers_async(resource_group_name, name, custom_headers).value! end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets all scale-out instances of an app. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -8168,7 +8116,7 @@ def generate_new_site_publishing_password_with_http_info(resource_group_name, na # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_new_site_publishing_password_async(resource_group_name, name, custom_headers = nil) + def list_instance_identifiers_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -8180,7 +8128,7 @@ def generate_new_site_publishing_password_async(resource_group_name, name, custo # Set Headers request_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.Web/sites/{name}/newpassword' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances' request_url = @base_url || @client.base_url @@ -8191,18 +8139,28 @@ def generate_new_site_publishing_password_async(resource_group_name, name, custo headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -8211,68 +8169,60 @@ def generate_new_site_publishing_password_async(resource_group_name, name, custo end # - # Gets perfmon counters for web app. + # Get the status of the last MSDeploy operation. # - # Gets perfmon counters for web app. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app instance. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [MSDeployStatus] operation results. # - def list_perf_mon_counters(resource_group_name, name, filter = nil, custom_headers = nil) - first_page = list_perf_mon_counters_as_lazy(resource_group_name, name, filter, custom_headers) - first_page.get_all_items + def get_instance_ms_deploy_status(resource_group_name, name, instance_id, custom_headers = nil) + response = get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers).value! + response.body unless response.nil? end # - # Gets perfmon counters for web app. + # Get the status of the last MSDeploy operation. # - # Gets perfmon counters for web app. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app 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_perf_mon_counters_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) - list_perf_mon_counters_async(resource_group_name, name, filter, custom_headers).value! + def get_instance_ms_deploy_status_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) + get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers).value! end # - # Gets perfmon counters for web app. + # Get the status of the last MSDeploy operation. # - # Gets perfmon counters for web app. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app 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_perf_mon_counters_async(resource_group_name, name, filter = nil, custom_headers = nil) + def get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8282,15 +8232,14 @@ def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom # Set Headers request_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.Web/sites/{name}/perfcounters' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -8310,7 +8259,7 @@ def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8324,56 +8273,110 @@ def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom end # - # Gets web app's event logs. + # Invoke the MSDeploy web app extension. # - # Gets web app's event logs. + # Invoke the MSDeploy web app extension. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SitePhpErrorLogFlag] operation results. + # @return [MSDeployStatus] operation results. # - def get_site_php_error_log_flag(resource_group_name, name, custom_headers = nil) - response = get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! + def create_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + response = create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers).value! response.body unless response.nil? end # - # Gets web app's event logs. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Gets web app's event logs. + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + # Send request + promise = begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.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 + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployLog] operation results. + # + def get_instance_msdeploy_log(resource_group_name, name, instance_id, custom_headers = nil) + response = get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app 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_site_php_error_log_flag_with_http_info(resource_group_name, name, custom_headers = nil) - get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! + def get_instance_msdeploy_log_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) + get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers).value! end # - # Gets web app's event logs. + # Get the MSDeploy Log for the last MSDeploy operation. # - # Gets web app's event logs. + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app 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_site_php_error_log_flag_async(resource_group_name, name, custom_headers = nil) + def get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8383,13 +8386,13 @@ def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers # Set Headers request_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.Web/sites/{name}/phplogging' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -8400,7 +8403,7 @@ def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -8410,7 +8413,7 @@ def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8424,56 +8427,72 @@ def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers end # - # Gets the premier add-ons of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the premier add-ons of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [Array] operation results. # - def list_premier_add_ons(resource_group_name, name, custom_headers = nil) - response = list_premier_add_ons_async(resource_group_name, name, custom_headers).value! - response.body unless response.nil? + def list_instance_processes(resource_group_name, name, instance_id, custom_headers = nil) + first_page = list_instance_processes_as_lazy(resource_group_name, name, instance_id, custom_headers) + first_page.get_all_items end # - # Gets the premier add-ons of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the premier add-ons of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_premier_add_ons_with_http_info(resource_group_name, name, custom_headers = nil) - list_premier_add_ons_async(resource_group_name, name, custom_headers).value! + def list_instance_processes_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) + list_instance_processes_async(resource_group_name, name, instance_id, custom_headers).value! end # - # Gets the premier add-ons of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the premier add-ons of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_premier_add_ons_async(resource_group_name, name, custom_headers = nil) + def list_instance_processes_async(resource_group_name, name, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8483,13 +8502,13 @@ def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/premieraddons' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -8500,7 +8519,7 @@ def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -8510,7 +8529,7 @@ def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8524,60 +8543,76 @@ def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) end # - # Gets a named add-on of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets a named add-on of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [ProcessInfo] operation results. # - def get_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) - response = get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + def get_instance_process(resource_group_name, name, process_id, instance_id, custom_headers = nil) + response = get_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers).value! response.body unless response.nil? end # - # Gets a named add-on of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets a named add-on of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) - get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + def get_instance_process_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers = nil) + get_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers).value! end # - # Gets a named add-on of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets a named add-on of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) + def get_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8587,13 +8622,13 @@ def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, cus # Set Headers request_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.Web/sites/{name}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -8604,7 +8639,7 @@ def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, cus http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -8614,7 +8649,7 @@ def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, cus if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8628,67 +8663,75 @@ def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, cus end # - # Updates a named add-on of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Updates a named add-on of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. # - def add_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) - response = add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! - response.body unless response.nil? + def delete_instance_process(resource_group_name, name, process_id, instance_id, custom_headers = nil) + response = delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers).value! + nil end # - # Updates a named add-on of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Updates a named add-on of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def add_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) - add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! + def delete_instance_process_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers = nil) + delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers).value! end # - # Updates a named add-on of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Updates a named add-on of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) + def delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? - fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8698,48 +8741,29 @@ def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, pre # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() - request_content = @client.serialize(request_mapper, premier_add_on) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -8748,59 +8772,76 @@ def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, pre end # - # Delete a premier add-on from an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Delete a premier add-on from an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Object] operation results. # - def delete_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) - response = delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! - nil + def get_instance_process_dump(resource_group_name, name, process_id, instance_id, custom_headers = nil) + response = get_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers).value! + response.body unless response.nil? end # - # Delete a premier add-on from an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Delete a premier add-on from an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) - delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + def get_instance_process_dump_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers = nil) + get_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers).value! end # - # Delete a premier add-on from an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Delete a premier add-on from an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) + def get_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8810,24 +8851,24 @@ def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, # Set Headers request_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.Web/sites/{name}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -8841,66 +8882,76 @@ def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NOT_IMPLEMENTED] operation results. + # @return [Array] operation results. # - def list_publishing_profile_xml_with_secrets(resource_group_name, name, publishing_profile_options, custom_headers = nil) - response = list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! - response.body unless response.nil? + def list_instance_process_modules(resource_group_name, name, process_id, instance_id, custom_headers = nil) + first_page = list_instance_process_modules_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers) + first_page.get_all_items end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_publishing_profile_xml_with_secrets_with_http_info(resource_group_name, name, publishing_profile_options, custom_headers = nil) - list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! + def list_instance_process_modules_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers = nil) + list_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers).value! end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers = nil) + def list_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8910,33 +8961,24 @@ def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, pu # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmPublishingProfileOptions.mapper() - request_content = @client.serialize(request_mapper, publishing_profile_options) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -8946,13 +8988,7 @@ def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, pu 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: 'Stream' - } - } + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8966,113 +9002,84 @@ def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, pu end # - # Recovers a deleted web app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Recovers a deleted web app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param base_address1 [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RecoverResponse] operation results. + # @return [ProcessModuleInfo] operation results. # - def recover(resource_group_name, name, recovery_entity, custom_headers = nil) - response = recover_async(resource_group_name, name, recovery_entity, custom_headers).value! + def get_instance_process_module(resource_group_name, name, process_id, base_address, instance_id, base_address1, custom_headers = nil) + response = get_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, base_address1, custom_headers).value! response.body unless response.nil? end # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. - # @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 recover_async(resource_group_name, name, recovery_entity, custom_headers = nil) - # Send request - promise = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::RecoverResponse.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 - - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def reset_production_slot_config(resource_group_name, name, custom_headers = nil) - response = reset_production_slot_config_async(resource_group_name, name, custom_headers).value! - nil - end - - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param base_address1 [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def reset_production_slot_config_with_http_info(resource_group_name, name, custom_headers = nil) - reset_production_slot_config_async(resource_group_name, name, custom_headers).value! + def get_instance_process_module_with_http_info(resource_group_name, name, process_id, base_address, instance_id, base_address1, custom_headers = nil) + get_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, base_address1, custom_headers).value! end # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param base_address1 [String] # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def reset_production_slot_config_async(resource_group_name, name, custom_headers = nil) + def get_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, base_address1, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'base_address is nil' if base_address.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'base_address1 is nil' if base_address1.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9082,29 +9089,39 @@ def reset_production_slot_config_async(resource_group_name, name, custom_headers # Set Headers request_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.Web/sites/{name}/resetSlotConfig' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{base_address}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'base_address' => base_address1,'subscriptionId' => @client.subscription_id}, + query_params: {'baseAddress' => base_address,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -9113,56 +9130,76 @@ def reset_production_slot_config_async(resource_group_name, name, custom_headers end # - # Gets the category of ResourceHealthMetadata to use for the given site + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets the category of ResourceHealthMetadata to use for the given site + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceHealthMetadata] operation results. + # @return [Array] operation results. # - def get_resource_health_metadata(resource_group_name, name, custom_headers = nil) - response = get_resource_health_metadata_async(resource_group_name, name, custom_headers).value! - response.body unless response.nil? + def list_instance_process_threads(resource_group_name, name, process_id, instance_id, custom_headers = nil) + first_page = list_instance_process_threads_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers) + first_page.get_all_items end # - # Gets the category of ResourceHealthMetadata to use for the given site + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets the category of ResourceHealthMetadata to use for the given site + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_resource_health_metadata_with_http_info(resource_group_name, name, custom_headers = nil) - get_resource_health_metadata_async(resource_group_name, name, custom_headers).value! + def list_instance_process_threads_with_http_info(resource_group_name, name, process_id, instance_id, custom_headers = nil) + list_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers).value! end # - # Gets the category of ResourceHealthMetadata to use for the given site + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets the category of ResourceHealthMetadata to use for the given site + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_resource_health_metadata_async(resource_group_name, name, custom_headers = nil) + def list_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9172,13 +9209,13 @@ def get_resource_health_metadata_async(resource_group_name, name, custom_headers # Set Headers request_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.Web/sites/{name}/resourceHealthMetadata' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -9189,7 +9226,7 @@ def get_resource_health_metadata_async(resource_group_name, name, custom_headers http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -9199,7 +9236,7 @@ def get_resource_health_metadata_async(resource_group_name, name, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceHealthMetadata.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -9213,73 +9250,80 @@ def get_resource_health_metadata_async(resource_group_name, name, custom_headers end # - # Restarts an app (or deployment slot, if specified). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Restarts an app (or deployment slot, if specified). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [ProcessThreadInfo] operation results. # - def restart(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) - response = restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! - nil + def get_instance_process_thread(resource_group_name, name, process_id, thread_id, instance_id, custom_headers = nil) + response = get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers).value! + response.body unless response.nil? end # - # Restarts an app (or deployment slot, if specified). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Restarts an app (or deployment slot, if specified). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def restart_with_http_info(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) - restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! + def get_instance_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, instance_id, custom_headers = nil) + get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers).value! end # - # Restarts an app (or deployment slot, if specified). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Restarts an app (or deployment slot, if specified). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def restart_async(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) + def get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'thread_id is nil' if thread_id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9289,29 +9333,39 @@ def restart_async(resource_group_name, name, soft_restart = nil, synchronous = n # Set Headers request_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.Web/sites/{name}/restart' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -9320,9 +9374,9 @@ def restart_async(resource_group_name, name, soft_restart = nil, synchronous = n end # - # Gets an app's deployment slots. + # Shows whether an app can be cloned to another resource group or subscription. # - # Gets an app's deployment slots. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -9330,17 +9384,17 @@ def restart_async(resource_group_name, name, soft_restart = nil, synchronous = n # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [SiteCloneability] operation results. # - def list_slots(resource_group_name, name, custom_headers = nil) - first_page = list_slots_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def is_cloneable(resource_group_name, name, custom_headers = nil) + response = is_cloneable_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? end # - # Gets an app's deployment slots. + # Shows whether an app can be cloned to another resource group or subscription. # - # Gets an app's deployment slots. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -9350,14 +9404,14 @@ def list_slots(resource_group_name, name, custom_headers = nil) # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_slots_with_http_info(resource_group_name, name, custom_headers = nil) - list_slots_async(resource_group_name, name, custom_headers).value! + def is_cloneable_with_http_info(resource_group_name, name, custom_headers = nil) + is_cloneable_async(resource_group_name, name, custom_headers).value! end # - # Gets an app's deployment slots. + # Shows whether an app can be cloned to another resource group or subscription. # - # Gets an app's deployment slots. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -9367,7 +9421,7 @@ def list_slots_with_http_info(resource_group_name, name, custom_headers = nil) # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_slots_async(resource_group_name, name, custom_headers = nil) + def is_cloneable_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -9379,7 +9433,7 @@ def list_slots_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/slots' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable' request_url = @base_url || @client.base_url @@ -9390,7 +9444,7 @@ def list_slots_async(resource_group_name, name, custom_headers = nil) headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9406,7 +9460,7 @@ def list_slots_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -9420,63 +9474,56 @@ def list_slots_async(resource_group_name, name, custom_headers = nil) end # - # Gets the details of a web, mobile, or API app. + # This is to allow calling via powershell and ARM template. # - # Gets the details of a web, mobile, or API app. + # This is to allow calling via powershell and ARM template. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Site] operation results. + # @return [FunctionSecrets] operation results. # - def get_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_sync_function_triggers(resource_group_name, name, custom_headers = nil) + response = list_sync_function_triggers_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # Gets the details of a web, mobile, or API app. + # This is to allow calling via powershell and ARM template. # - # Gets the details of a web, mobile, or API app. + # This is to allow calling via powershell and ARM template. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns the production slot. # @param custom_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_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_sync_function_triggers_with_http_info(resource_group_name, name, custom_headers = nil) + list_sync_function_triggers_async(resource_group_name, name, custom_headers).value! end # - # Gets the details of a web, mobile, or API app. + # This is to allow calling via powershell and ARM template. # - # Gets the details of a web, mobile, or API app. + # This is to allow calling via powershell and ARM template. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns the production slot. # @param [Hash{String => String}] 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_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_sync_function_triggers_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9486,18 +9533,18 @@ def get_slot_async(resource_group_name, name, slot, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/slots/{slot}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9513,7 +9560,7 @@ def get_slot_async(resource_group_name, name, slot, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Site.mapper() + result_mapper = Azure::ARM::Web::Models::FunctionSecrets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -9527,153 +9574,56 @@ def get_slot_async(resource_group_name, name, slot, custom_headers = nil) end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. - # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param slot [String] Name of the deployment slot to create or update. By - # default, this API attempts to create or modify the production slot. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Site] operation results. - # - def create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) - response = create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param slot [String] Name of the deployment slot to create or update. By - # default, this API attempts to create or modify the production slot. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) - # Send request - promise = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::Site.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app to delete. - # @param slot [String] Name of the deployment slot to delete. By default, the - # API deletes the production slot. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted - # @param delete_empty_server_farm [Boolean] Specify true if the App Service - # plan will be empty after app deletion and you want to delete the empty App - # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param name [String] Name of the app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def delete_slot(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) - response = delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! - nil + def list_metric_definitions(resource_group_name, name, custom_headers = nil) + first_page = list_metric_definitions_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app to delete. - # @param slot [String] Name of the deployment slot to delete. By default, the - # API deletes the production slot. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted - # @param delete_empty_server_farm [Boolean] Specify true if the App Service - # plan will be empty after app deletion and you want to delete the empty App - # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param name [String] Name of the app. # @param custom_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_slot_with_http_info(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) - delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! + def list_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil) + list_metric_definitions_async(resource_group_name, name, custom_headers).value! end # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app to delete. - # @param slot [String] Name of the deployment slot to delete. By default, the - # API deletes the production slot. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted - # @param delete_empty_server_farm [Boolean] Specify true if the App Service - # plan will be empty after app deletion and you want to delete the empty App - # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param name [String] Name of the app. # @param [Hash{String => String}] 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_slot_async(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) + def list_metric_definitions_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9683,29 +9633,39 @@ def delete_slot_async(resource_group_name, name, slot, delete_metrics = nil, del # Set Headers request_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.Web/sites/{name}/slots/{slot}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'deleteMetrics' => delete_metrics,'deleteEmptyServerFarm' => delete_empty_server_farm,'skipDnsRegistration' => skip_dns_registration,'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -9714,66 +9674,74 @@ def delete_slot_async(resource_group_name, name, slot, delete_metrics = nil, del end # - # Analyze a custom hostname. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Analyze a custom hostname. + # Gets performance metrics of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param host_name [String] Custom hostname + # @param name [String] Name of the app. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CustomHostnameAnalysisResult] operation results. + # @return [Array] operation results. # - def analyze_custom_hostname_slot(resource_group_name, name, slot, host_name = nil, custom_headers = nil) - response = analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! - response.body unless response.nil? + def list_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + first_page = list_metrics_as_lazy(resource_group_name, name, details, filter, custom_headers) + first_page.get_all_items end # - # Analyze a custom hostname. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Analyze a custom hostname. + # Gets performance metrics of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param host_name [String] Custom hostname + # @param name [String] Name of the app. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def analyze_custom_hostname_slot_with_http_info(resource_group_name, name, slot, host_name = nil, custom_headers = nil) - analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def list_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + list_metrics_async(resource_group_name, name, details, filter, custom_headers).value! end # - # Analyze a custom hostname. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Analyze a custom hostname. + # Gets performance metrics of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param host_name [String] Custom hostname + # @param name [String] Name of the app. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name = nil, custom_headers = nil) + def list_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9783,14 +9751,15 @@ def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_nam # Set Headers request_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.Web/sites/{name}/slots/{slot}/analyzeCustomHostname' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'hostName' => host_name,'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'details' => details,'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -9810,7 +9779,7 @@ def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::CustomHostnameAnalysisResult.mapper() + result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -9824,75 +9793,164 @@ def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_nam end # - # Applies the configuration settings from the target slot onto the current - # slot. + # Restores a web app. # - # Applies the configuration settings from the target slot onto the current - # slot. + # Restores a web app. # + # @param subscription_name [String] Azure subscription. # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param name [String] Name of web app. + # @param migration_options [StorageMigrationOptions] Migration + # migrationOptions. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [StorageMigrationResponse] operation results. # - def apply_slot_configuration_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - response = apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! - nil + def migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) + response = migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! + response.body unless response.nil? end # - # Applies the configuration settings from the target slot onto the current - # slot. + # @param subscription_name [String] Azure subscription. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_options [StorageMigrationOptions] Migration + # migrationOptions. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Applies the configuration settings from the target slot onto the current - # slot. + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) + # Send request + promise = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::StorageMigrationResponse.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 + + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # Migrates a local (in-app) MySql database to a remote MySql database. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param name [String] Name of web app. + # @param migration_request_envelope [MigrateMySqlRequest] MySql migration + # options. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Operation] operation results. + # + def migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers = nil) + response = migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_request_envelope [MigrateMySqlRequest] MySql migration + # options. + # @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 migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers = nil) + # Send request + promise = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::Operation.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 + + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MigrateMySqlStatus] operation results. + # + def get_migrate_my_sql_status(resource_group_name, name, custom_headers = nil) + response = get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def apply_slot_configuration_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + def get_migrate_my_sql_status_with_http_info(resource_group_name, name, custom_headers = nil) + get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! end # - # Applies the configuration settings from the target slot onto the current - # slot. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # - # Applies the configuration settings from the target slot onto the current - # slot. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param name [String] Name of web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9902,27 +9960,18 @@ def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_ent # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() - request_content = @client.serialize(request_mapper, slot_swap_entity) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9934,6 +9983,16 @@ def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_ent end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -9942,70 +10001,63 @@ def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_ent end # - # Creates a backup of an app. + # Gets all network features used by the app (or deployment slot, if specified). # - # Creates a backup of an app. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [BackupRequest] Backup configuration. You can use the JSON - # response from the POST action as input here. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a backup for the production slot. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItem] operation results. + # @return [NetworkFeatures] operation results. # - def backup_slot(resource_group_name, name, request, slot, custom_headers = nil) - response = backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def list_network_features(resource_group_name, name, view, custom_headers = nil) + response = list_network_features_async(resource_group_name, name, view, custom_headers).value! response.body unless response.nil? end # - # Creates a backup of an app. + # Gets all network features used by the app (or deployment slot, if specified). # - # Creates a backup of an app. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [BackupRequest] Backup configuration. You can use the JSON - # response from the POST action as input here. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a backup for the production slot. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) - backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def list_network_features_with_http_info(resource_group_name, name, view, custom_headers = nil) + list_network_features_async(resource_group_name, name, view, custom_headers).value! end # - # Creates a backup of an app. + # Gets all network features used by the app (or deployment slot, if specified). # - # Creates a backup of an app. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [BackupRequest] Backup configuration. You can use the JSON - # response from the POST action as input here. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a backup for the production slot. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def backup_slot_async(resource_group_name, name, request, slot, custom_headers = nil) + def list_network_features_async(resource_group_name, name, view, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'request is nil' if request.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'view is nil' if view.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10015,33 +10067,24 @@ def backup_slot_async(resource_group_name, name, request, slot, custom_headers = # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() - request_content = @client.serialize(request_mapper, request) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -10051,7 +10094,7 @@ def backup_slot_async(resource_group_name, name, request, slot, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() + result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10065,63 +10108,71 @@ def backup_slot_async(resource_group_name, name, request, slot, custom_headers = end # - # Gets existing backups of an app. + # Start capturing network packets for the site. # - # Gets existing backups of an app. + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get backups of the production slot. + # @param name [String] The name of the web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [String] operation results. # - def list_backups_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def start_web_site_network_trace(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + response = start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + response.body unless response.nil? end # - # Gets existing backups of an app. + # Start capturing network packets for the site. # - # Gets existing backups of an app. + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get backups of the production slot. + # @param name [String] The name of the web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param custom_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_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_backups_slot_async(resource_group_name, name, slot, custom_headers).value! + def start_web_site_network_trace_with_http_info(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! end # - # Gets existing backups of an app. + # Start capturing network packets for the site. # - # Gets existing backups of an app. + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get backups of the production slot. + # @param name [String] The name of the web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param [Hash{String => String}] 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_backups_slot_async(resource_group_name, name, slot, custom_headers = nil) + def start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10131,18 +10182,18 @@ def list_backups_slot_async(resource_group_name, name, slot, custom_headers = ni # Set Headers request_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.Web/sites/{name}/slots/{slot}/backups' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10158,7 +10209,13 @@ def list_backups_slot_async(resource_group_name, name, slot, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10172,76 +10229,56 @@ def list_backups_slot_async(resource_group_name, name, slot, custom_headers = ni end # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Stop ongoing capturing network packets for the site. # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [RestoreRequest] A RestoreRequest object that includes Azure - # storage URL and blog name for discovery of backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will perform discovery for the production slot. + # @param name [String] The name of the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RestoreRequest] operation results. + # @return [String] operation results. # - def discover_restore_slot(resource_group_name, name, request, slot, custom_headers = nil) - response = discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def stop_web_site_network_trace(resource_group_name, name, custom_headers = nil) + response = stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Stop ongoing capturing network packets for the site. # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [RestoreRequest] A RestoreRequest object that includes Azure - # storage URL and blog name for discovery of backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will perform discovery for the production slot. + # @param name [String] The name of the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def discover_restore_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) - discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def stop_web_site_network_trace_with_http_info(resource_group_name, name, custom_headers = nil) + stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! end # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Stop ongoing capturing network packets for the site. # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [RestoreRequest] A RestoreRequest object that includes Azure - # storage URL and blog name for discovery of backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will perform discovery for the production slot. + # @param name [String] The name of the web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers = nil) + def stop_web_site_network_trace_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'request is nil' if request.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10251,27 +10288,18 @@ def discover_restore_slot_async(resource_group_name, name, request, slot, custom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() - request_content = @client.serialize(request_mapper, request) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10287,7 +10315,13 @@ def discover_restore_slot_async(resource_group_name, name, request, slot, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10301,67 +10335,61 @@ def discover_restore_slot_async(resource_group_name, name, request, slot, custom end # - # Gets a backup of an app by its ID. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Gets a backup of an app by its ID. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItem] operation results. # - def get_backup_status_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) - response = get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! - response.body unless response.nil? + def generate_new_site_publishing_password(resource_group_name, name, custom_headers = nil) + response = generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! + nil end # - # Gets a backup of an app by its ID. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Gets a backup of an app by its ID. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a backup of the production slot. # @param custom_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_backup_status_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) - get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! + def generate_new_site_publishing_password_with_http_info(resource_group_name, name, custom_headers = nil) + generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! end # - # Gets a backup of an app by its ID. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Gets a backup of an app by its ID. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a backup of the production slot. # @param [Hash{String => String}] 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_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) + def generate_new_site_publishing_password_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10371,39 +10399,29 @@ def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, cus # Set Headers request_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.Web/sites/{name}/slots/{slot}/backups/{backupId}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -10412,66 +10430,68 @@ def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, cus end # - # Deletes a backup of an app by its ID. + # Gets perfmon counters for web app. # - # Deletes a backup of an app by its ID. + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a backup of the production slot. + # @param name [String] Name of web app. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def delete_backup_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) - response = delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! - nil + def list_perf_mon_counters(resource_group_name, name, filter = nil, custom_headers = nil) + first_page = list_perf_mon_counters_as_lazy(resource_group_name, name, filter, custom_headers) + first_page.get_all_items end # - # Deletes a backup of an app by its ID. + # Gets perfmon counters for web app. # - # Deletes a backup of an app by its ID. + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a backup of the production slot. + # @param name [String] Name of web app. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param custom_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_backup_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) - delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! + def list_perf_mon_counters_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) + list_perf_mon_counters_async(resource_group_name, name, filter, custom_headers).value! end # - # Deletes a backup of an app by its ID. + # Gets perfmon counters for web app. # - # Deletes a backup of an app by its ID. + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a backup of the production slot. + # @param name [String] Name of web app. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param [Hash{String => String}] 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_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) + def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10481,29 +10501,40 @@ def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_ # Set Headers request_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.Web/sites/{name}/slots/{slot}/backups/{backupId}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -10512,89 +10543,56 @@ def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_ end # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Gets web app's event logs. # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItem] operation results. + # @return [SitePhpErrorLogFlag] operation results. # - def list_backup_status_secrets_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - response = list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def get_site_php_error_log_flag(resource_group_name, name, custom_headers = nil) + response = get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Gets web app's event logs. # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of web app. # @param custom_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_backup_status_secrets_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def get_site_php_error_log_flag_with_http_info(resource_group_name, name, custom_headers = nil) + get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! end # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Gets web app's event logs. # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of web app. # @param [Hash{String => String}] 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_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? - fail ArgumentError, 'request is nil' if request.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10604,27 +10602,18 @@ def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() - request_content = @client.serialize(request_mapper, request) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10640,7 +10629,7 @@ def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() + result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10654,117 +10643,56 @@ def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, end # - # Restores a specific backup to another app (or deployment slot, if specified). + # Gets the premier add-ons of an app. # - # Restores a specific backup to another app (or deployment slot, if specified). + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RestoreResponse] operation results. + # @return [PremierAddOn] operation results. # - def restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - response = restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def list_premier_add_ons(resource_group_name, name, custom_headers = nil) + response = list_premier_add_ons_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. - # @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_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - # Send request - promise = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::RestoreResponse.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 - - # - # List the configurations of an app - # - # List the configurations of an app - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. - # @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_configurations_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items - end - - # - # List the configurations of an app + # Gets the premier add-ons of an app. # - # List the configurations of an app + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. # @param custom_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_configurations_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_configurations_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_premier_add_ons_with_http_info(resource_group_name, name, custom_headers = nil) + list_premier_add_ons_async(resource_group_name, name, custom_headers).value! end # - # List the configurations of an app + # Gets the premier add-ons of an app. # - # List the configurations of an app + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. # @param [Hash{String => String}] 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_configurations_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10774,13 +10702,13 @@ def list_configurations_slot_async(resource_group_name, name, slot, custom_heade # Set Headers request_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.Web/sites/{name}/slots/{slot}/config' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -10801,7 +10729,7 @@ def list_configurations_slot_async(resource_group_name, name, slot, custom_heade if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10815,67 +10743,60 @@ def list_configurations_slot_async(resource_group_name, name, slot, custom_heade end # - # Replaces the application settings of an app. + # Gets a named add-on of an app. # - # Replaces the application settings of an app. + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param app_settings [StringDictionary] Application settings of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the application settings for the production slot. + # @param premier_add_on_name [String] Add-on name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. + # @return [PremierAddOn] operation results. # - def update_application_settings_slot(resource_group_name, name, app_settings, slot, custom_headers = nil) - response = update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! + def get_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) + response = get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! response.body unless response.nil? end # - # Replaces the application settings of an app. + # Gets a named add-on of an app. # - # Replaces the application settings of an app. + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param app_settings [StringDictionary] Application settings of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the application settings for the production slot. + # @param premier_add_on_name [String] Add-on name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_application_settings_slot_with_http_info(resource_group_name, name, app_settings, slot, custom_headers = nil) - update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! + def get_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) + get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! end # - # Replaces the application settings of an app. + # Gets a named add-on of an app. # - # Replaces the application settings of an app. + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param app_settings [StringDictionary] Application settings of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the application settings for the production slot. + # @param premier_add_on_name [String] Add-on name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers = nil) + def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'app_settings is nil' if app_settings.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10885,27 +10806,18 @@ def update_application_settings_slot_async(resource_group_name, name, app_settin # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() - request_content = @client.serialize(request_mapper, app_settings) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10921,7 +10833,7 @@ def update_application_settings_slot_async(resource_group_name, name, app_settin if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10935,63 +10847,67 @@ def update_application_settings_slot_async(resource_group_name, name, app_settin end # - # Gets the application settings of an app. + # Updates a named add-on of an app. # - # Gets the application settings of an app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the application settings for the production slot. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. + # @return [PremierAddOn] operation results. # - def list_application_settings_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def add_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) + response = add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! response.body unless response.nil? end # - # Gets the application settings of an app. + # Updates a named add-on of an app. # - # Gets the application settings of an app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the application settings for the production slot. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. # @param custom_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_application_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def add_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) + add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! end # - # Gets the application settings of an app. + # Updates a named add-on of an app. # - # Gets the application settings of an app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the application settings for the production slot. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. # @param [Hash{String => String}] 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_application_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11001,18 +10917,27 @@ def list_application_settings_slot_async(resource_group_name, name, slot, custom # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/appsettings/list' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + request_content = @client.serialize(request_mapper, premier_add_on) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -11028,7 +10953,7 @@ def list_application_settings_slot_async(resource_group_name, name, slot, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11042,70 +10967,59 @@ def list_application_settings_slot_async(resource_group_name, name, slot, custom end # - # Updates the Authentication / Authorization settings associated with web app. + # Delete a premier add-on from an app. # - # Updates the Authentication / Authorization settings associated with web app. + # Delete a premier add-on from an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteAuthSettings] operation results. # - def update_auth_settings_slot(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) - response = update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! - response.body unless response.nil? + def delete_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) + response = delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + nil end # - # Updates the Authentication / Authorization settings associated with web app. + # Delete a premier add-on from an app. # - # Updates the Authentication / Authorization settings associated with web app. + # Delete a premier add-on from an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_auth_settings_slot_with_http_info(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) - update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! + def delete_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) + delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! end # - # Updates the Authentication / Authorization settings associated with web app. + # Delete a premier add-on from an app. # - # Updates the Authentication / Authorization settings associated with web app. + # Delete a premier add-on from an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) + def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_auth_settings is nil' if site_auth_settings.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11115,27 +11029,18 @@ def update_auth_settings_slot_async(resource_group_name, name, site_auth_setting # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() - request_content = @client.serialize(request_mapper, site_auth_settings) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response @@ -11147,16 +11052,6 @@ def update_auth_settings_slot_async(resource_group_name, name, site_auth_setting end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -11165,63 +11060,62 @@ def update_auth_settings_slot_async(resource_group_name, name, site_auth_setting end # - # Gets the Authentication/Authorization settings of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the Authentication/Authorization settings of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the settings for the production slot. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteAuthSettings] operation results. + # @return [Array] operation results. # - def get_auth_settings_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_processes(resource_group_name, name, custom_headers = nil) + first_page = list_processes_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Gets the Authentication/Authorization settings of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the Authentication/Authorization settings of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the settings for the production slot. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_auth_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_processes_with_http_info(resource_group_name, name, custom_headers = nil) + list_processes_async(resource_group_name, name, custom_headers).value! end # - # Gets the Authentication/Authorization settings of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the Authentication/Authorization settings of an app. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the settings for the production slot. + # @param name [String] Site name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_processes_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11231,24 +11125,24 @@ def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/authsettings/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -11258,7 +11152,7 @@ def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11272,67 +11166,66 @@ def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers end # - # Updates the backup configuration of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Updates the backup configuration of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [BackupRequest] Edited backup configuration. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupRequest] operation results. + # @return [ProcessInfo] operation results. # - def update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers = nil) - response = update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def get_process(resource_group_name, name, process_id, custom_headers = nil) + response = get_process_async(resource_group_name, name, process_id, custom_headers).value! response.body unless response.nil? end # - # Updates the backup configuration of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Updates the backup configuration of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [BackupRequest] Edited backup configuration. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_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_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) - update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def get_process_with_http_info(resource_group_name, name, process_id, custom_headers = nil) + get_process_async(resource_group_name, name, process_id, custom_headers).value! end # - # Updates the backup configuration of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Updates the backup configuration of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [BackupRequest] Edited backup configuration. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param [Hash{String => String}] 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_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers = nil) + def get_process_async(resource_group_name, name, process_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'request is nil' if request.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11342,33 +11235,24 @@ def update_backup_configuration_slot_async(resource_group_name, name, request, s # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() - request_content = @client.serialize(request_mapper, request) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -11378,7 +11262,7 @@ def update_backup_configuration_slot_async(resource_group_name, name, request, s if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11392,62 +11276,65 @@ def update_backup_configuration_slot_async(resource_group_name, name, request, s end # - # Deletes the backup configuration of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Deletes the backup configuration of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_process(resource_group_name, name, process_id, custom_headers = nil) + response = delete_process_async(resource_group_name, name, process_id, custom_headers).value! nil end # - # Deletes the backup configuration of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Deletes the backup configuration of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_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_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_process_with_http_info(resource_group_name, name, process_id, custom_headers = nil) + delete_process_async(resource_group_name, name, process_id, custom_headers).value! end # - # Deletes the backup configuration of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Deletes the backup configuration of an app. + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param [Hash{String => String}] 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_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_process_async(resource_group_name, name, process_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11457,13 +11344,13 @@ def delete_backup_configuration_slot_async(resource_group_name, name, slot, cust # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/backup' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -11474,7 +11361,7 @@ def delete_backup_configuration_slot_async(resource_group_name, name, slot, cust http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -11488,63 +11375,66 @@ def delete_backup_configuration_slot_async(resource_group_name, name, slot, cust end # - # Gets the backup configuration of an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Gets the backup configuration of an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupRequest] operation results. + # @return [Object] operation results. # - def get_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_process_dump(resource_group_name, name, process_id, custom_headers = nil) + response = get_process_dump_async(resource_group_name, name, process_id, custom_headers).value! response.body unless response.nil? end # - # Gets the backup configuration of an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Gets the backup configuration of an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_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_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_process_dump_with_http_info(resource_group_name, name, process_id, custom_headers = nil) + get_process_dump_async(resource_group_name, name, process_id, custom_headers).value! end # - # Gets the backup configuration of an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Gets the backup configuration of an app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the backup configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param [Hash{String => String}] 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_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_process_dump_async(resource_group_name, name, process_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11554,39 +11444,29 @@ def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_ # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/backup/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -11595,70 +11475,66 @@ def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_ end # - # Replaces the connection strings of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Replaces the connection strings of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param connection_strings [ConnectionStringDictionary] Connection strings of - # the app or deployment slot. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the connection settings for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ConnectionStringDictionary] operation results. + # @return [Array] operation results. # - def update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers = nil) - response = update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! - response.body unless response.nil? + def list_process_modules(resource_group_name, name, process_id, custom_headers = nil) + first_page = list_process_modules_as_lazy(resource_group_name, name, process_id, custom_headers) + first_page.get_all_items end # - # Replaces the connection strings of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Replaces the connection strings of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param connection_strings [ConnectionStringDictionary] Connection strings of - # the app or deployment slot. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the connection settings for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_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_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers = nil) - update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! + def list_process_modules_with_http_info(resource_group_name, name, process_id, custom_headers = nil) + list_process_modules_async(resource_group_name, name, process_id, custom_headers).value! end # - # Replaces the connection strings of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Replaces the connection strings of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param connection_strings [ConnectionStringDictionary] Connection strings of - # the app or deployment slot. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the connection settings for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param [Hash{String => String}] 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_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers = nil) + def list_process_modules_async(resource_group_name, name, process_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'connection_strings is nil' if connection_strings.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11668,33 +11544,24 @@ def update_connection_strings_slot_async(resource_group_name, name, connection_s # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() - request_content = @client.serialize(request_mapper, connection_strings) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -11704,7 +11571,7 @@ def update_connection_strings_slot_async(resource_group_name, name, connection_s if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11718,63 +11585,74 @@ def update_connection_strings_slot_async(resource_group_name, name, connection_s end # - # Gets the connection strings of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets the connection strings of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the connection settings for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param base_address1 [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ConnectionStringDictionary] operation results. + # @return [ProcessModuleInfo] operation results. # - def list_connection_strings_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_process_module(resource_group_name, name, process_id, base_address, base_address1, custom_headers = nil) + response = get_process_module_async(resource_group_name, name, process_id, base_address, base_address1, custom_headers).value! response.body unless response.nil? end # - # Gets the connection strings of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets the connection strings of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the connection settings for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param base_address1 [String] # @param custom_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_connection_strings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_process_module_with_http_info(resource_group_name, name, process_id, base_address, base_address1, custom_headers = nil) + get_process_module_async(resource_group_name, name, process_id, base_address, base_address1, custom_headers).value! end # - # Gets the connection strings of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets the connection strings of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the connection settings for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param base_address1 [String] # @param [Hash{String => String}] 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_connection_strings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_process_module_async(resource_group_name, name, process_id, base_address, base_address1, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'base_address is nil' if base_address.nil? + fail ArgumentError, 'base_address1 is nil' if base_address1.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11784,24 +11662,24 @@ def list_connection_strings_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/connectionstrings/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{base_address}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'base_address' => base_address1,'subscriptionId' => @client.subscription_id}, + query_params: {'baseAddress' => base_address,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -11811,7 +11689,7 @@ def list_connection_strings_slot_async(resource_group_name, name, slot, custom_h if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11825,63 +11703,66 @@ def list_connection_strings_slot_async(resource_group_name, name, slot, custom_h end # - # Gets the logging configuration of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets the logging configuration of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the logging configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteLogsConfig] operation results. + # @return [Array] operation results. # - def get_diagnostic_logs_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_process_threads(resource_group_name, name, process_id, custom_headers = nil) + first_page = list_process_threads_as_lazy(resource_group_name, name, process_id, custom_headers) + first_page.get_all_items end # - # Gets the logging configuration of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets the logging configuration of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the logging configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param custom_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_diagnostic_logs_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_process_threads_with_http_info(resource_group_name, name, process_id, custom_headers = nil) + list_process_threads_async(resource_group_name, name, process_id, custom_headers).value! end # - # Gets the logging configuration of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets the logging configuration of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the logging configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. # @param [Hash{String => String}] 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_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_process_threads_async(resource_group_name, name, process_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11891,13 +11772,13 @@ def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/logs' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -11908,7 +11789,7 @@ def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -11918,7 +11799,7 @@ def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11932,70 +11813,70 @@ def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot end # - # Updates the logging configuration of an app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Updates the logging configuration of an app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that - # contains the logging configuration to change in the "properties" property. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the logging configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteLogsConfig] operation results. + # @return [ProcessThreadInfo] operation results. # - def update_diagnostic_logs_config_slot(resource_group_name, name, site_logs_config, slot, custom_headers = nil) - response = update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! + def get_process_thread(resource_group_name, name, process_id, thread_id, custom_headers = nil) + response = get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers).value! response.body unless response.nil? end # - # Updates the logging configuration of an app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Updates the logging configuration of an app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that - # contains the logging configuration to change in the "properties" property. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the logging configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. # @param custom_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_diagnostic_logs_config_slot_with_http_info(resource_group_name, name, site_logs_config, slot, custom_headers = nil) - update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! + def get_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, custom_headers = nil) + get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers).value! end # - # Updates the logging configuration of an app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Updates the logging configuration of an app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that - # contains the logging configuration to change in the "properties" property. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the logging configuration for the production slot. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. # @param [Hash{String => String}] 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_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers = nil) + def get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_logs_config is nil' if site_logs_config.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'thread_id is nil' if thread_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12005,33 +11886,24 @@ def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_log # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() - request_content = @client.serialize(request_mapper, site_logs_config) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -12041,7 +11913,7 @@ def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_log if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12055,70 +11927,56 @@ def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_log end # - # Replaces the metadata of an app. + # Get public certificates for an app or a deployment slot. # - # Replaces the metadata of an app. + # Get public certificates for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param metadata [StringDictionary] Edited metadata of the app or deployment - # slot. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the metadata for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. + # @return [Array] operation results. # - def update_metadata_slot(resource_group_name, name, metadata, slot, custom_headers = nil) - response = update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! - response.body unless response.nil? + def list_public_certificates(resource_group_name, name, custom_headers = nil) + first_page = list_public_certificates_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Replaces the metadata of an app. + # Get public certificates for an app or a deployment slot. # - # Replaces the metadata of an app. + # Get public certificates for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param metadata [StringDictionary] Edited metadata of the app or deployment - # slot. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the metadata for the production slot. # @param custom_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_metadata_slot_with_http_info(resource_group_name, name, metadata, slot, custom_headers = nil) - update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! + def list_public_certificates_with_http_info(resource_group_name, name, custom_headers = nil) + list_public_certificates_async(resource_group_name, name, custom_headers).value! end # - # Replaces the metadata of an app. + # Get public certificates for an app or a deployment slot. # - # Replaces the metadata of an app. + # Get public certificates for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param metadata [StringDictionary] Edited metadata of the app or deployment - # slot. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the metadata for the production slot. # @param [Hash{String => String}] 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_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers = nil) + def list_public_certificates_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'metadata is nil' if metadata.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12128,27 +11986,18 @@ def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() - request_content = @client.serialize(request_mapper, metadata) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12164,7 +12013,7 @@ def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12178,63 +12027,66 @@ def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom end # - # Gets the metadata of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets the metadata of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the metadata for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. + # @return [PublicCertificate] operation results. # - def list_metadata_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_public_certificate(resource_group_name, name, public_certificate_name, custom_headers = nil) + response = get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! response.body unless response.nil? end # - # Gets the metadata of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets the metadata of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the metadata for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers = nil) + get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! end # - # Gets the metadata of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets the metadata of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the metadata for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12244,18 +12096,18 @@ def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = n # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/metadata/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12271,7 +12123,7 @@ def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = n if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12285,117 +12137,67 @@ def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = n end # - # Gets the Git/FTP publishing credentials of an app. + # Creates a hostname binding for an app. # - # Gets the Git/FTP publishing credentials of an app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [User] operation results. + # @return [PublicCertificate] operation results. # - def list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_or_update_public_certificate(resource_group_name, name, public_certificate_name, public_certificate, custom_headers = nil) + response = create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers).value! response.body unless response.nil? end + # + # Creates a hostname binding for an app. + # + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Concurrent::Promise] promise which provides async access to http - # response. + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) - # Send request - promise = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::User.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise + def create_or_update_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, custom_headers = nil) + create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers).value! end # - # Updates the Push settings associated with web app. + # Creates a hostname binding for an app. # - # Updates the Push settings associated with web app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. # - # @return [PushSettings] operation results. + # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_site_push_settings_slot(resource_group_name, name, push_settings, slot, custom_headers = nil) - response = update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! - response.body unless response.nil? - end - - # - # Updates the Push settings associated with web app. - # - # Updates the Push settings associated with web app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param custom_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_site_push_settings_slot_with_http_info(resource_group_name, name, push_settings, slot, custom_headers = nil) - update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! - end - - # - # Updates the Push settings associated with web app. - # - # Updates the Push settings associated with web app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param [Hash{String => String}] 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_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers = nil) + def create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'push_settings is nil' if push_settings.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, 'public_certificate is nil' if public_certificate.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12409,17 +12211,17 @@ def update_site_push_settings_slot_async(resource_group_name, name, push_setting request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::PushSettings.mapper() - request_content = @client.serialize(request_mapper, push_settings) + request_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() + request_content = @client.serialize(request_mapper, public_certificate) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -12441,7 +12243,7 @@ def update_site_push_settings_slot_async(resource_group_name, name, push_setting if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12455,63 +12257,59 @@ def update_site_push_settings_slot_async(resource_group_name, name, push_setting end # - # Gets the Push settings associated with web app. + # Deletes a hostname binding for an app. # - # Gets the Push settings associated with web app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PushSettings] operation results. # - def list_site_push_settings_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def delete_public_certificate(resource_group_name, name, public_certificate_name, custom_headers = nil) + response = delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! + nil end # - # Gets the Push settings associated with web app. + # Deletes a hostname binding for an app. # - # Gets the Push settings associated with web app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_site_push_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers = nil) + delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! end # - # Gets the Push settings associated with web app. + # Deletes a hostname binding for an app. # - # Gets the Push settings associated with web app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12521,39 +12319,29 @@ def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/pushsettings/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -12562,69 +12350,66 @@ def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_h end # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Gets the publishing profile for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. + # @return [NOT_IMPLEMENTED] operation results. # - def get_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_publishing_profile_xml_with_secrets(resource_group_name, name, publishing_profile_options, custom_headers = nil) + response = list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! response.body unless response.nil? end # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Gets the publishing profile for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. # @param custom_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_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_publishing_profile_xml_with_secrets_with_http_info(resource_group_name, name, publishing_profile_options, custom_headers = nil) + list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! end # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Gets the publishing profile for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. # @param [Hash{String => String}] 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_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12634,18 +12419,27 @@ def get_configuration_slot_async(resource_group_name, name, slot, custom_headers # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/web' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmPublishingProfileOptions.mapper() + request_content = @client.serialize(request_mapper, publishing_profile_options) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12661,7 +12455,13 @@ def get_configuration_slot_async(resource_group_name, name, slot, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12675,70 +12475,109 @@ def get_configuration_slot_async(resource_group_name, name, slot, custom_headers end # - # Updates the configuration of an app. + # Recovers a web app to a previous snapshot. # - # Updates the configuration of an app. + # Recovers a web app to a previous snapshot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def recover(resource_group_name, name, recovery_entity, custom_headers = nil) + response = recover_async(resource_group_name, name, recovery_entity, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @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 recover_async(resource_group_name, name, recovery_entity, custom_headers = nil) + # Send request + promise = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. + # + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. # - def create_or_update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) - response = create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! - response.body unless response.nil? + def reset_production_slot_config(resource_group_name, name, custom_headers = nil) + response = reset_production_slot_config_async(resource_group_name, name, custom_headers).value! + nil end # - # Updates the configuration of an app. + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Updates the configuration of an app. + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. # @param custom_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_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) - create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! + def reset_production_slot_config_with_http_info(resource_group_name, name, custom_headers = nil) + reset_production_slot_config_async(resource_group_name, name, custom_headers).value! end # - # Updates the configuration of an app. + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Updates the configuration of an app. + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. # @param [Hash{String => String}] 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_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) + def reset_production_slot_config_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_config is nil' if site_config.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12748,27 +12587,18 @@ def create_or_update_configuration_slot_async(resource_group_name, name, site_co # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - request_content = @client.serialize(request_mapper, site_config) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12780,16 +12610,6 @@ def create_or_update_configuration_slot_async(resource_group_name, name, site_co end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -12798,70 +12618,73 @@ def create_or_update_configuration_slot_async(resource_group_name, name, site_co end # - # Updates the configuration of an app. + # Restarts an app (or deployment slot, if specified). # - # Updates the configuration of an app. + # Restarts an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. # - def update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) - response = update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! - response.body unless response.nil? + def restart(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) + response = restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! + nil end # - # Updates the configuration of an app. + # Restarts an app (or deployment slot, if specified). # - # Updates the configuration of an app. + # Restarts an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param custom_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_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) - update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! + def restart_with_http_info(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) + restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! end # - # Updates the configuration of an app. + # Restarts an app (or deployment slot, if specified). # - # Updates the configuration of an app. + # Restarts an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param [Hash{String => String}] 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_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) + def restart_async(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_config is nil' if site_config.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12871,27 +12694,18 @@ def update_configuration_slot_async(resource_group_name, name, site_config, slot # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - request_content = @client.serialize(request_mapper, site_config) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - body: request_content, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:patch, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12903,16 +12717,6 @@ def update_configuration_slot_async(resource_group_name, name, site_config, slot end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -12921,69 +12725,56 @@ def update_configuration_slot_async(resource_group_name, name, site_config, slot end # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Get list of siteextensions for a web site, or a deployment slot. # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Get list of siteextensions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # - def list_configuration_snapshot_info_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_site_extensions(resource_group_name, name, custom_headers = nil) + first_page = list_site_extensions_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Get list of siteextensions for a web site, or a deployment slot. # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Get list of siteextensions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_configuration_snapshot_info_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_site_extensions_with_http_info(resource_group_name, name, custom_headers = nil) + list_site_extensions_async(resource_group_name, name, custom_headers).value! end # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Get list of siteextensions for a web site, or a deployment slot. # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Get list of siteextensions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_site_extensions_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12993,13 +12784,13 @@ def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/web/snapshots' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -13010,7 +12801,7 @@ def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -13020,21 +12811,7 @@ def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, 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: 'SiteConfigurationSnapshotInfoElementType', - type: { - name: 'Composite', - class_name: 'SiteConfigurationSnapshotInfo' - } - } - } - } + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13048,67 +12825,70 @@ def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, end # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Get site extension information by its ID for a web site, or a deployment + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. + # @return [SiteExtensionInfo] operation results. # - def get_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - response = get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + def get_site_extension(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + response = get_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers).value! response.body unless response.nil? end # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Get site extension information by its ID for a web site, or a deployment + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] # @param custom_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_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + def get_site_extension_with_http_info(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + get_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers).value! end # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Get site extension information by its ID for a web site, or a deployment + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] # @param [Hash{String => String}] 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_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + def get_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? + fail ArgumentError, 'extension_name is nil' if extension_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13118,14 +12898,14 @@ def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{extensionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id}, + query_params: {'siteExtensionId' => site_extension_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -13135,7 +12915,7 @@ def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -13145,7 +12925,7 @@ def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13159,66 +12939,113 @@ def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id end # - # Reverts the configuration of an app to a previous snapshot. + # Install site extension on a web site, or a deployment slot. # - # Reverts the configuration of an app to a previous snapshot. + # Install site extension on a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [SiteExtensionInfo] operation results. # - def recover_site_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - response = recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + def install_site_extension(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + response = install_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] + # @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 install_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + # Send request + promise = begin_install_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.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 + + # + # Remove a site extension from a web site, or a deployment slot. + # + # Remove a site extension from a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_site_extension(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + response = delete_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers).value! nil end # - # Reverts the configuration of an app to a previous snapshot. + # Remove a site extension from a web site, or a deployment slot. # - # Reverts the configuration of an app to a previous snapshot. + # Remove a site extension from a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def recover_site_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + def delete_site_extension_with_http_info(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + delete_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers).value! end # - # Reverts the configuration of an app to a previous snapshot. + # Remove a site extension from a web site, or a deployment slot. # - # Reverts the configuration of an app to a previous snapshot. + # Remove a site extension from a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + def delete_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? - fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? + fail ArgumentError, 'extension_name is nil' if extension_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13228,24 +13055,24 @@ def recover_site_configuration_snapshot_slot_async(resource_group_name, name, sn # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{extensionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id}, + query_params: {'siteExtensionId' => site_extension_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 == 204 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -13259,69 +13086,56 @@ def recover_site_configuration_snapshot_slot_async(resource_group_name, name, sn end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets an app's deployment slots. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets an app's deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # - def list_deployments_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers) + def list_slots(resource_group_name, name, custom_headers = nil) + first_page = list_slots_as_lazy(resource_group_name, name, custom_headers) first_page.get_all_items end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets an app's deployment slots. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets an app's deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. # @param custom_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_deployments_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_deployments_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_slots_with_http_info(resource_group_name, name, custom_headers = nil) + list_slots_async(resource_group_name, name, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets an app's deployment slots. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets an app's deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_deployments_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_slots_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13331,13 +13145,13 @@ def list_deployments_slot_async(resource_group_name, name, slot, custom_headers # Set Headers request_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.Web/sites/{name}/slots/{slot}/deployments' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -13358,7 +13172,7 @@ def list_deployments_slot_async(resource_group_name, name, slot, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13372,72 +13186,62 @@ def list_deployments_slot_async(resource_group_name, name, slot, custom_headers end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the details of a web, mobile, or API app. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the details of a web, mobile, or API app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. + # @param slot [String] Name of the deployment slot. By default, this API + # returns the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [Site] operation results. # - def get_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) - response = get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + def get_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the details of a web, mobile, or API app. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the details of a web, mobile, or API app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. + # @param slot [String] Name of the deployment slot. By default, this API + # returns the production slot. # @param custom_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_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) - get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + def get_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the details of a web, mobile, or API app. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the details of a web, mobile, or API app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. + # @param slot [String] Name of the deployment slot. By default, this API + # returns the production slot. # @param [Hash{String => String}] 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_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) + def get_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13448,13 +13252,13 @@ def get_deployment_slot_async(resource_group_name, name, id, slot, custom_header # Set Headers request_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.Web/sites/{name}/slots/{slot}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -13475,7 +13279,7 @@ def get_deployment_slot_async(resource_group_name, name, id, slot, custom_header if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13489,77 +13293,153 @@ def get_deployment_slot_async(resource_group_name, name, id, slot, custom_header end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param deployment [Deployment] Deployment details. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param slot [String] Name of the deployment slot to create or update. By + # default, this API attempts to create or modify the production slot. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [Site] operation results. # - def create_deployment_slot(resource_group_name, name, id, slot, deployment, custom_headers = nil) - response = create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! + def create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + response = create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! response.body unless response.nil? end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param slot [String] Name of the deployment slot to create or update. By + # default, this API attempts to create or modify the production slot. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + # Send request + promise = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::Site.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a web, mobile, or API app, or one of the deployment slots. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Deletes a web, mobile, or API app, or one of the deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param deployment [Deployment] Deployment details. + # @param name [String] Name of the app to delete. + # @param slot [String] Name of the deployment slot to delete. By default, the + # API deletes the production slot. + # @param delete_metrics [Boolean] If true, web app metrics are also deleted. + # @param delete_empty_server_farm [Boolean] Specify true if the App Service + # plan will be empty after app deletion and you want to delete the empty App + # Service plan. By default, the empty App Service plan is not deleted. + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_slot(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) + response = delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! + nil + end + + # + # Deletes a web, mobile, or API app, or one of the deployment slots. + # + # Deletes a web, mobile, or API app, or one of the deployment slots. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app to delete. + # @param slot [String] Name of the deployment slot to delete. By default, the + # API deletes the production slot. + # @param delete_metrics [Boolean] If true, web app metrics are also deleted. + # @param delete_empty_server_farm [Boolean] Specify true if the App Service + # plan will be empty after app deletion and you want to delete the empty App + # Service plan. By default, the empty App Service plan is not deleted. + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped. # @param custom_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_deployment_slot_with_http_info(resource_group_name, name, id, slot, deployment, custom_headers = nil) - create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! + def delete_slot_with_http_info(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) + delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Deletes a web, mobile, or API app, or one of the deployment slots. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Deletes a web, mobile, or API app, or one of the deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param deployment [Deployment] Deployment details. + # @param name [String] Name of the app to delete. + # @param slot [String] Name of the deployment slot to delete. By default, the + # API deletes the production slot. + # @param delete_metrics [Boolean] If true, web app metrics are also deleted. + # @param delete_empty_server_farm [Boolean] Specify true if the App Service + # plan will be empty after app deletion and you want to delete the empty App + # Service plan. By default, the empty App Service plan is not deleted. + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped. # @param [Hash{String => String}] 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_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers = nil) + def delete_slot_async(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13569,48 +13449,29 @@ def create_deployment_slot_async(resource_group_name, name, id, slot, deployment # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Deployment.mapper() - request_content = @client.serialize(request_mapper, deployment) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - body: request_content, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'deleteMetrics' => delete_metrics,'deleteEmptyServerFarm' => delete_empty_server_farm,'skipDnsRegistration' => skip_dns_registration,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -13619,71 +13480,65 @@ def create_deployment_slot_async(resource_group_name, name, id, slot, deployment end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Analyze a custom hostname. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Analyze a custom hostname. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param host_name [String] Custom hostname. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [CustomHostnameAnalysisResult] operation results. # - def delete_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) - response = delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! - nil + def analyze_custom_hostname_slot(resource_group_name, name, slot, host_name = nil, custom_headers = nil) + response = analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + response.body unless response.nil? end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Analyze a custom hostname. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Analyze a custom hostname. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param host_name [String] Custom hostname. # @param custom_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_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) - delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + def analyze_custom_hostname_slot_with_http_info(resource_group_name, name, slot, host_name = nil, custom_headers = nil) + analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Analyze a custom hostname. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Analyze a custom hostname. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param host_name [String] Custom hostname. # @param [Hash{String => String}] 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_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) + def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13694,29 +13549,39 @@ def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_hea # Set Headers request_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.Web/sites/{name}/slots/{slot}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'hostName' => host_name,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CustomHostnameAnalysisResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -13725,62 +13590,74 @@ def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_hea end # - # Lists ownership identifiers for domain associated with web app. + # Applies the configuration settings from the target slot onto the current + # slot. # - # Lists ownership identifiers for domain associated with web app. + # Applies the configuration settings from the target slot onto the current + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @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_domain_ownership_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def apply_slot_configuration_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + response = apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + nil end # - # Lists ownership identifiers for domain associated with web app. + # Applies the configuration settings from the target slot onto the current + # slot. # - # Lists ownership identifiers for domain associated with web app. + # Applies the configuration settings from the target slot onto the current + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param custom_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_domain_ownership_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + def apply_slot_configuration_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! end # - # Lists ownership identifiers for domain associated with web app. + # Applies the configuration settings from the target slot onto the current + # slot. # - # Lists ownership identifiers for domain associated with web app. + # Applies the configuration settings from the target slot onto the current + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param [Hash{String => String}] 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_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) + def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13791,7 +13668,15 @@ def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot # Set Headers request_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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() + request_content = @client.serialize(request_mapper, slot_swap_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig' request_url = @base_url || @client.base_url @@ -13799,10 +13684,11 @@ def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -13814,16 +13700,6 @@ def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -13832,69 +13708,69 @@ def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot end # - # Get domain ownership identifier for web app. + # Creates a backup of an app. # - # Get domain ownership identifier for web app. + # Creates a backup of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param request [BackupRequest] Backup configuration. You can use the JSON + # response from the POST action as input here. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will create a backup for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. + # @return [BackupItem] operation results. # - def get_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - response = get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + def backup_slot(resource_group_name, name, request, slot, custom_headers = nil) + response = backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! response.body unless response.nil? end # - # Get domain ownership identifier for web app. + # Creates a backup of an app. # - # Get domain ownership identifier for web app. + # Creates a backup of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param request [BackupRequest] Backup configuration. You can use the JSON + # response from the POST action as input here. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will create a backup for the production slot. # @param custom_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_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + def backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) + backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! end # - # Get domain ownership identifier for web app. + # Creates a backup of an app. # - # Get domain ownership identifier for web app. + # Creates a backup of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param request [BackupRequest] Backup configuration. You can use the JSON + # response from the POST action as input here. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will create a backup for the production slot. # @param [Hash{String => String}] 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_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + def backup_slot_async(resource_group_name, name, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13905,18 +13781,27 @@ def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain # Set Headers request_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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -13932,7 +13817,7 @@ def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13946,82 +13831,62 @@ def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets existing backups of an app. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets existing backups of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will get backups of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. + # @return [Array] operation results. # - def create_or_update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - response = create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! - response.body unless response.nil? + def list_backups_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets existing backups of an app. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets existing backups of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will get backups of the production slot. # @param custom_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_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + def list_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_backups_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets existing backups of an app. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets existing backups of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will get backups of the production slot. # @param [Hash{String => String}] 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_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + def list_backups_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? - fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14032,27 +13897,18 @@ def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Identifier.mapper() - request_content = @client.serialize(request_mapper, domain_ownership_identifier) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14068,7 +13924,7 @@ def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14082,68 +13938,75 @@ def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, end # - # Deletes a domain ownership identifier for a web app. + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # - # Deletes a domain ownership identifier for a web app. + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param request [RestoreRequest] A RestoreRequest object that includes Azure + # storage URL and blog name for discovery of backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will perform discovery for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [RestoreRequest] operation results. # - def delete_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - response = delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! - nil + def discover_restore_slot(resource_group_name, name, request, slot, custom_headers = nil) + response = discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes a domain ownership identifier for a web app. + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # - # Deletes a domain ownership identifier for a web app. + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param request [RestoreRequest] A RestoreRequest object that includes Azure + # storage URL and blog name for discovery of backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will perform discovery for the production slot. # @param custom_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_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + def discover_restore_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) + discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! end # - # Deletes a domain ownership identifier for a web app. - # - # Deletes a domain ownership identifier for a web app. + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. + # + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param request [RestoreRequest] A RestoreRequest object that includes Azure + # storage URL and blog name for discovery of backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will perform discovery for the production slot. # @param [Hash{String => String}] 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_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + def discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14154,29 +14017,48 @@ def delete_domain_ownership_identifier_slot_async(resource_group_name, name, dom # Set Headers request_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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -14185,82 +14067,66 @@ def delete_domain_ownership_identifier_slot_async(resource_group_name, name, dom end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets a backup of an app by its ID. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will get a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. + # @return [BackupItem] operation results. # - def update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - response = update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + def get_backup_status_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) + response = get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets a backup of an app by its ID. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will get a backup of the production slot. # @param custom_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_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + def get_backup_status_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) + get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets a backup of an app by its ID. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Gets a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. + # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will get a backup of the production slot. # @param [Hash{String => String}] 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_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? - fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14271,27 +14137,18 @@ def update_domain_ownership_identifier_slot_async(resource_group_name, name, dom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Identifier.mapper() - request_content = @client.serialize(request_mapper, domain_ownership_identifier) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14307,7 +14164,7 @@ def update_domain_ownership_identifier_slot_async(resource_group_name, name, dom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14321,62 +14178,65 @@ def update_domain_ownership_identifier_slot_async(resource_group_name, name, dom end # - # Get hostname bindings for an app or a deployment slot. + # Deletes a backup of an app by its ID. # - # Get hostname bindings for an app or a deployment slot. + # Deletes a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets hostname bindings for the production slot. + # the API will delete a backup of the production slot. # @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_host_name_bindings_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def delete_backup_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) + response = delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! + nil end # - # Get hostname bindings for an app or a deployment slot. + # Deletes a backup of an app by its ID. # - # Get hostname bindings for an app or a deployment slot. + # Deletes a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets hostname bindings for the production slot. + # the API will delete a backup of the production slot. # @param custom_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_host_name_bindings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_backup_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) + delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! end # - # Get hostname bindings for an app or a deployment slot. + # Deletes a backup of an app by its ID. # - # Get hostname bindings for an app or a deployment slot. + # Deletes a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets hostname bindings for the production slot. + # the API will delete a backup of the production slot. # @param [Hash{String => String}] 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_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14387,39 +14247,29 @@ def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_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.Web/sites/{name}/slots/{slot}/hostNameBindings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -14428,67 +14278,89 @@ def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_h end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API the named binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] Name of web app. + # @param backup_id [String] ID of backup. + # @param request [BackupRequest] Information on backup request. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [BackupItem] operation results. # - def get_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) - response = get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def list_backup_status_secrets_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + response = list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! response.body unless response.nil? end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API the named binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] Name of web app. + # @param backup_id [String] ID of backup. + # @param request [BackupRequest] Information on backup request. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) - get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def list_backup_status_secrets_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API the named binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] Name of web app. + # @param backup_id [String] ID of backup. + # @param request [BackupRequest] Information on backup request. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) + def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? + fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14498,18 +14370,27 @@ def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, # Set Headers request_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.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14525,7 +14406,7 @@ def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14539,73 +14420,116 @@ def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, end # - # Creates a hostname binding for an app. + # Restores a specific backup to another app (or deployment slot, if specified). # - # Creates a hostname binding for an app. + # Restores a specific backup to another app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a binding for the production slot. + # the API will restore a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [RestoreResponse] operation results. # - def create_or_update_host_name_binding_slot(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) - response = create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! + def restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + response = restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a hostname binding for an app. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Creates a hostname binding for an app. + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + # Send request + promise = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::RestoreResponse.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 + + # + # List the configurations of an app + # + # List the configurations of an app # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a binding for the production slot. + # the API will return configuration for the production slot. + # @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_configurations_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items + end + + # + # List the configurations of an app + # + # List the configurations of an app + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. # @param custom_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_host_name_binding_slot_with_http_info(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) - create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! + def list_configurations_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_configurations_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Creates a hostname binding for an app. + # List the configurations of an app # - # Creates a hostname binding for an app. + # List the configurations of an app # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a binding for the production slot. + # the API will return configuration for the production slot. # @param [Hash{String => String}] 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_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) + def list_configurations_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? - fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14616,27 +14540,18 @@ def create_or_update_host_name_binding_slot_async(resource_group_name, name, hos # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() - request_content = @client.serialize(request_mapper, host_name_binding) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14652,7 +14567,7 @@ def create_or_update_host_name_binding_slot_async(resource_group_name, name, hos if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14666,66 +14581,67 @@ def create_or_update_host_name_binding_slot_async(resource_group_name, name, hos end # - # Deletes a hostname binding for an app. + # Replaces the application settings of an app. # - # Deletes a hostname binding for an app. + # Replaces the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param app_settings [StringDictionary] Application settings of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # the API will update the application settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [StringDictionary] operation results. # - def delete_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) - response = delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! - nil + def update_application_settings_slot(resource_group_name, name, app_settings, slot, custom_headers = nil) + response = update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes a hostname binding for an app. + # Replaces the application settings of an app. # - # Deletes a hostname binding for an app. + # Replaces the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param app_settings [StringDictionary] Application settings of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # the API will update the application settings for the production slot. # @param custom_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_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) - delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def update_application_settings_slot_with_http_info(resource_group_name, name, app_settings, slot, custom_headers = nil) + update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! end # - # Deletes a hostname binding for an app. + # Replaces the application settings of an app. # - # Deletes a hostname binding for an app. + # Replaces the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param app_settings [StringDictionary] Application settings of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # the API will update the application settings for the production slot. # @param [Hash{String => String}] 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_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) + def update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'app_settings is nil' if app_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14735,29 +14651,48 @@ def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_na # Set Headers request_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.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + request_content = @client.serialize(request_mapper, app_settings) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -14766,67 +14701,62 @@ def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_na end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets the application settings of an app. # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the application settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [StringDictionary] operation results. # - def get_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - response = get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def list_application_settings_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets the application settings of an app. # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the application settings for the production slot. # @param custom_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_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def list_application_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets the application settings of an app. # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the application settings for the production slot. # @param [Hash{String => String}] 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_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + def list_application_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14837,18 +14767,18 @@ def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, # Set Headers request_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.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14864,7 +14794,7 @@ def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14878,74 +14808,69 @@ def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the Authentication / Authorization settings associated with web app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the Authentication / Authorization settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of web app. + # @param site_auth_settings [SiteAuthSettings] Auth settings associated with + # web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [SiteAuthSettings] operation results. # - def create_or_update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - response = create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! + def update_auth_settings_slot(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) + response = update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the Authentication / Authorization settings associated with web app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the Authentication / Authorization settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of web app. + # @param site_auth_settings [SiteAuthSettings] Auth settings associated with + # web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! + def update_auth_settings_slot_with_http_info(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) + update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the Authentication / Authorization settings associated with web app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the Authentication / Authorization settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of web app. + # @param site_auth_settings [SiteAuthSettings] Auth settings associated with + # web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + def update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'site_auth_settings is nil' if site_auth_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14960,17 +14885,17 @@ def create_or_update_hybrid_connection_slot_async(resource_group_name, name, nam request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) + request_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() + request_content = @client.serialize(request_mapper, site_auth_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -14992,7 +14917,7 @@ def create_or_update_hybrid_connection_slot_async(resource_group_name, name, nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15006,66 +14931,62 @@ def create_or_update_hybrid_connection_slot_async(resource_group_name, name, nam end # - # Removes a Hybrid Connection from this site. + # Gets the Authentication/Authorization settings of an app. # - # Removes a Hybrid Connection from this site. + # Gets the Authentication/Authorization settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [SiteAuthSettings] operation results. # - def delete_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - response = delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! - nil + def get_auth_settings_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Removes a Hybrid Connection from this site. + # Gets the Authentication/Authorization settings of an app. # - # Removes a Hybrid Connection from this site. + # Gets the Authentication/Authorization settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the settings for the production slot. # @param custom_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_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def get_auth_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Removes a Hybrid Connection from this site. + # Gets the Authentication/Authorization settings of an app. # - # Removes a Hybrid Connection from this site. + # Gets the Authentication/Authorization settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the settings for the production slot. # @param [Hash{String => String}] 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_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15076,29 +14997,39 @@ def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_nam # Set Headers request_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.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -15107,74 +15038,66 @@ def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_nam end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the backup configuration of an app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param request [BackupRequest] Edited backup configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [BackupRequest] operation results. # - def update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - response = update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! + def update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers = nil) + response = update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the backup configuration of an app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param request [BackupRequest] Edited backup configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the backup configuration for the production slot. # @param custom_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_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! + def update_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) + update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the backup configuration of an app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Updates the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param request [BackupRequest] Edited backup configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the backup configuration for the production slot. # @param [Hash{String => String}] 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_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + def update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15189,23 +15112,23 @@ def update_hybrid_connection_slot_async(resource_group_name, name, namespace_nam request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) + request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/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,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -15221,7 +15144,7 @@ def update_hybrid_connection_slot_async(resource_group_name, name, namespace_nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15235,67 +15158,61 @@ def update_hybrid_connection_slot_async(resource_group_name, name, namespace_nam end # - # Gets the send key name and value for a Hybrid Connection. + # Deletes the backup configuration of an app. # - # Gets the send key name and value for a Hybrid Connection. + # Deletes the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnectionKey] operation results. # - def list_hybrid_connection_keys_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - response = list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! - response.body unless response.nil? + def delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Gets the send key name and value for a Hybrid Connection. + # Deletes the backup configuration of an app. # - # Gets the send key name and value for a Hybrid Connection. + # Deletes the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the backup configuration for the production slot. # @param custom_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_hybrid_connection_keys_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def delete_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the send key name and value for a Hybrid Connection. + # Deletes the backup configuration of an app. # - # Gets the send key name and value for a Hybrid Connection. + # Deletes the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the backup configuration for the production slot. # @param [Hash{String => String}] 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_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + def delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15306,18 +15223,18 @@ def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_ # Set Headers request_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.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/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,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response @@ -15329,16 +15246,6 @@ def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_ end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -15347,57 +15254,60 @@ def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_ end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets the backup configuration of an app. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [BackupRequest] operation results. # - def list_hybrid_connections_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets the backup configuration of an app. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the backup configuration for the production slot. # @param custom_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_hybrid_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets the backup configuration of an app. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the backup configuration for the production slot. # @param [Hash{String => String}] 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_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -15410,7 +15320,7 @@ def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_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.Web/sites/{name}/slots/{slot}/hybridConnectionRelays' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list' request_url = @base_url || @client.base_url @@ -15421,7 +15331,7 @@ def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_h headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -15437,7 +15347,7 @@ def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_h if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15451,68 +15361,69 @@ def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_h end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Replaces the connection strings of an app. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Replaces the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param connection_strings [ConnectionStringDictionary] Connection strings of + # the app or deployment slot. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get hybrid connections for the production slot. + # the API will update the connection settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [ConnectionStringDictionary] operation results. # - def list_relay_service_connections_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers = nil) + response = update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! response.body unless response.nil? end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Replaces the connection strings of an app. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Replaces the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param connection_strings [ConnectionStringDictionary] Connection strings of + # the app or deployment slot. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get hybrid connections for the production slot. + # the API will update the connection settings for the production slot. # @param custom_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_relay_service_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers = nil) + update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Replaces the connection strings of an app. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Replaces the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param connection_strings [ConnectionStringDictionary] Connection strings of + # the app or deployment slot. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get hybrid connections for the production slot. + # the API will update the connection settings for the production slot. # @param [Hash{String => String}] 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_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) + def update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'connection_strings is nil' if connection_strings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15523,7 +15434,15 @@ def list_relay_service_connections_slot_async(resource_group_name, name, slot, c # Set Headers request_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.Web/sites/{name}/slots/{slot}/hybridconnection' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() + request_content = @client.serialize(request_mapper, connection_strings) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings' request_url = @base_url || @client.base_url @@ -15531,10 +15450,11 @@ def list_relay_service_connections_slot_async(resource_group_name, name, slot, c middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -15550,7 +15470,7 @@ def list_relay_service_connections_slot_async(resource_group_name, name, slot, c if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15564,66 +15484,62 @@ def list_relay_service_connections_slot_async(resource_group_name, name, slot, c end # - # Gets a hybrid connection configuration by its name. + # Gets the connection strings of an app. # - # Gets a hybrid connection configuration by its name. + # Gets the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a hybrid connection for the production slot. + # the API will get the connection settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [ConnectionStringDictionary] operation results. # - def get_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) - response = get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + def list_connection_strings_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Gets a hybrid connection configuration by its name. + # Gets the connection strings of an app. # - # Gets a hybrid connection configuration by its name. + # Gets the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a hybrid connection for the production slot. + # the API will get the connection settings for the production slot. # @param custom_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_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) - get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + def list_connection_strings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets a hybrid connection configuration by its name. + # Gets the connection strings of an app. # - # Gets a hybrid connection configuration by its name. + # Gets the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a hybrid connection for the production slot. + # the API will get the connection settings for the production slot. # @param [Hash{String => String}] 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_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) + def list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15634,18 +15550,18 @@ def get_relay_service_connection_slot_async(resource_group_name, name, entity_na # Set Headers request_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.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -15661,7 +15577,7 @@ def get_relay_service_connection_slot_async(resource_group_name, name, entity_na if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15675,79 +15591,62 @@ def get_relay_service_connection_slot_async(resource_group_name, name, entity_na end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets the logging configuration of an app. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API will get the logging configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [SiteLogsConfig] operation results. # - def create_or_update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - response = create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def get_diagnostic_logs_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets the logging configuration of an app. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API will get the logging configuration for the production slot. # @param custom_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_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def get_diagnostic_logs_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets the logging configuration of an app. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API will get the logging configuration for the production slot. # @param [Hash{String => String}] 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_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15758,27 +15657,18 @@ def create_or_update_relay_service_connection_slot_async(resource_group_name, na # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -15794,7 +15684,7 @@ def create_or_update_relay_service_connection_slot_async(resource_group_name, na if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15808,65 +15698,69 @@ def create_or_update_relay_service_connection_slot_async(resource_group_name, na end # - # Deletes a relay service connection by its name. + # Updates the logging configuration of an app. # - # Deletes a relay service connection by its name. + # Updates the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. + # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that + # contains the logging configuration to change in the "properties" property. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a hybrid connection for the production slot. + # the API will update the logging configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [SiteLogsConfig] operation results. # - def delete_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) - response = delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! - nil + def update_diagnostic_logs_config_slot(resource_group_name, name, site_logs_config, slot, custom_headers = nil) + response = update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes a relay service connection by its name. + # Updates the logging configuration of an app. # - # Deletes a relay service connection by its name. + # Updates the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. + # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that + # contains the logging configuration to change in the "properties" property. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a hybrid connection for the production slot. + # the API will update the logging configuration for the production slot. # @param custom_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_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) - delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + def update_diagnostic_logs_config_slot_with_http_info(resource_group_name, name, site_logs_config, slot, custom_headers = nil) + update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! end # - # Deletes a relay service connection by its name. + # Updates the logging configuration of an app. # - # Deletes a relay service connection by its name. + # Updates the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. + # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that + # contains the logging configuration to change in the "properties" property. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a hybrid connection for the production slot. + # the API will update the logging configuration for the production slot. # @param [Hash{String => String}] 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_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) + def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'site_logs_config is nil' if site_logs_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15877,29 +15771,48 @@ def delete_relay_service_connection_slot_async(resource_group_name, name, entity # Set Headers request_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.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() + request_content = @client.serialize(request_mapper, site_logs_config) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -15908,79 +15821,69 @@ def delete_relay_service_connection_slot_async(resource_group_name, name, entity end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Replaces the metadata of an app. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Replaces the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param metadata [StringDictionary] Edited metadata of the app or deployment + # slot. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API will update the metadata for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [StringDictionary] operation results. # - def update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - response = update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def update_metadata_slot(resource_group_name, name, metadata, slot, custom_headers = nil) + response = update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Replaces the metadata of an app. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Replaces the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param metadata [StringDictionary] Edited metadata of the app or deployment + # slot. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API will update the metadata for the production slot. # @param custom_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_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def update_metadata_slot_with_http_info(resource_group_name, name, metadata, slot, custom_headers = nil) + update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Replaces the metadata of an app. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Replaces the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param metadata [StringDictionary] Edited metadata of the app or deployment + # slot. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API will update the metadata for the production slot. # @param [Hash{String => String}] 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_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'metadata is nil' if metadata.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15995,23 +15898,23 @@ def update_relay_service_connection_slot_async(resource_group_name, name, entity request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + request_content = @client.serialize(request_mapper, metadata) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16027,7 +15930,7 @@ def update_relay_service_connection_slot_async(resource_group_name, name, entity if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16041,60 +15944,60 @@ def update_relay_service_connection_slot_async(resource_group_name, name, entity end # - # Gets all scale-out instances of an app. + # Gets the metadata of an app. # - # Gets all scale-out instances of an app. + # Gets the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets the production slot instances. + # the API will get the metadata for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [StringDictionary] operation results. # - def list_instance_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def list_metadata_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Gets all scale-out instances of an app. + # Gets the metadata of an app. # - # Gets all scale-out instances of an app. + # Gets the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets the production slot instances. + # the API will get the metadata for the production slot. # @param custom_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_instance_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets all scale-out instances of an app. + # Gets the metadata of an app. # - # Gets all scale-out instances of an app. + # Gets the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets the production slot instances. + # the API will get the metadata for the production slot. # @param [Hash{String => String}] 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_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -16107,7 +16010,7 @@ def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom # Set Headers request_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.Web/sites/{name}/slots/{slot}/instances' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list' request_url = @base_url || @client.base_url @@ -16118,7 +16021,7 @@ def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16134,7 +16037,7 @@ def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16148,79 +16051,117 @@ def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets the Git/FTP publishing credentials of an app. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Gets the Git/FTP publishing credentials of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will get the publishing credentials for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [User] operation results. # - def list_instance_deployments_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) - first_page = list_instance_deployments_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers) - first_page.get_all_items + def list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end - # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. - # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will get the publishing credentials for the production slot. + # @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 list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) + # Send request + promise = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::User.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates the Push settings associated with web app. + # + # Updates the Push settings associated with web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param push_settings [PushSettings] Push settings associated with web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PushSettings] operation results. + # + def update_site_push_settings_slot(resource_group_name, name, push_settings, slot, custom_headers = nil) + response = update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the Push settings associated with web app. + # + # Updates the Push settings associated with web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param push_settings [PushSettings] Push settings associated with web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_instance_deployments_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) - list_instance_deployments_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! + def update_site_push_settings_slot_with_http_info(resource_group_name, name, push_settings, slot, custom_headers = nil) + update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Updates the Push settings associated with web app. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Updates the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Name of web app. + # @param push_settings [PushSettings] Push settings associated with web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_instance_deployments_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) + def update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'push_settings is nil' if push_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16230,18 +16171,27 @@ def list_instance_deployments_slot_async(resource_group_name, name, slot, instan # Set Headers request_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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::PushSettings.mapper() + request_content = @client.serialize(request_mapper, push_settings) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16257,7 +16207,7 @@ def list_instance_deployments_slot_async(resource_group_name, name, slot, instan if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16271,83 +16221,63 @@ def list_instance_deployments_slot_async(resource_group_name, name, slot, instan end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the Push settings associated with web app. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [PushSettings] operation results. # - def get_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - response = get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! + def list_site_push_settings_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the Push settings associated with web app. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! + def list_site_push_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the Push settings associated with web app. # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16357,18 +16287,18 @@ def get_instance_deployment_slot_async(resource_group_name, name, id, slot, inst # Set Headers request_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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16384,7 +16314,7 @@ def get_instance_deployment_slot_async(resource_group_name, name, id, slot, inst if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16398,87 +16328,69 @@ def get_instance_deployment_slot_async(resource_group_name, name, id, slot, inst end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [SiteConfigResource] operation results. # - def create_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) - response = create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers).value! + def get_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # the API will return configuration for the production slot. # @param custom_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_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) - create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers).value! + def get_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # the API will return configuration for the production slot. # @param [Hash{String => String}] 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_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) + def get_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? - fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16488,27 +16400,18 @@ def create_instance_deployment_slot_async(resource_group_name, name, id, slot, i # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Deployment.mapper() - request_content = @client.serialize(request_mapper, deployment) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16524,7 +16427,7 @@ def create_instance_deployment_slot_async(resource_group_name, name, id, slot, i if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16538,82 +16441,70 @@ def create_instance_deployment_slot_async(resource_group_name, name, id, slot, i end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Updates the configuration of an app. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [SiteConfigResource] operation results. # - def delete_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - response = delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! - nil - end - + def create_or_update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) + response = create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! + response.body unless response.nil? + end + # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Updates the configuration of an app. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will update configuration for the production slot. # @param custom_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_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! + def create_or_update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) + create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Updates the configuration of an app. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will update configuration for the production slot. # @param [Hash{String => String}] 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_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + def create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16623,29 +16514,48 @@ def delete_instance_deployment_slot_async(resource_group_name, name, id, slot, i # Set Headers request_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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + request_content = @client.serialize(request_mapper, site_config) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -16654,62 +16564,69 @@ def delete_instance_deployment_slot_async(resource_group_name, name, id, slot, i end # - # Shows whether an app can be cloned to another resource group or subscription. + # Updates the configuration of an app. # - # Shows whether an app can be cloned to another resource group or subscription. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns information on the production slot. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteCloneability] operation results. + # @return [SiteConfigResource] operation results. # - def is_cloneable_slot(resource_group_name, name, slot, custom_headers = nil) - response = is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) + response = update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! response.body unless response.nil? end # - # Shows whether an app can be cloned to another resource group or subscription. + # Updates the configuration of an app. # - # Shows whether an app can be cloned to another resource group or subscription. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns information on the production slot. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def is_cloneable_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) + update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! end # - # Shows whether an app can be cloned to another resource group or subscription. + # Updates the configuration of an app. # - # Shows whether an app can be cloned to another resource group or subscription. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns information on the production slot. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = nil) + def update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16720,7 +16637,15 @@ def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = ni # Set Headers request_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.Web/sites/{name}/slots/{slot}/iscloneable' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + request_content = @client.serialize(request_mapper, site_config) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url @@ -16728,10 +16653,11 @@ def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = ni middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16747,7 +16673,7 @@ def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16761,60 +16687,66 @@ def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = ni end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metric definitions of the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # - def list_metric_definitions_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def list_configuration_snapshot_info_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metric definitions of the production slot. + # the API will return configuration for the production slot. # @param custom_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_metric_definitions_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_configuration_snapshot_info_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metric definitions of the production slot. + # the API will return configuration for the production slot. # @param [Hash{String => String}] 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_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -16827,7 +16759,7 @@ def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_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.Web/sites/{name}/slots/{slot}/metricdefinitions' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots' request_url = @base_url || @client.base_url @@ -16854,7 +16786,21 @@ def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_h if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SiteConfigurationSnapshotInfoElementType', + type: { + name: 'Composite', + class_name: 'SiteConfigurationSnapshotInfo' + } + } + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16868,80 +16814,66 @@ def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_h end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets a snapshot of the configuration of an app at a previous point in time. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets a snapshot of the configuration of an app at a previous point in time. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metrics of the production slot. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [SiteConfigResource] operation results. # - def list_metrics_slot(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) - first_page = list_metrics_slot_as_lazy(resource_group_name, name, slot, details, filter, custom_headers) - first_page.get_all_items + def get_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + response = get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + response.body unless response.nil? end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets a snapshot of the configuration of an app at a previous point in time. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets a snapshot of the configuration of an app at a previous point in time. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metrics of the production slot. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # the API will return configuration for the production slot. # @param custom_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_metrics_slot_with_http_info(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) - list_metrics_slot_async(resource_group_name, name, slot, details, filter, custom_headers).value! + def get_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets a snapshot of the configuration of an app at a previous point in time. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets a snapshot of the configuration of an app at a previous point in time. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metrics of the production slot. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # the API will return configuration for the production slot. # @param [Hash{String => String}] 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_metrics_slot_async(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) + def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16952,15 +16884,14 @@ def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filt # Set Headers request_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.Web/sites/{name}/slots/{slot}/metrics' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'details' => details,'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -16980,7 +16911,7 @@ def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filt if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16994,65 +16925,65 @@ def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filt end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Reverts the configuration of an app to a previous snapshot. # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Reverts the configuration of an app to a previous snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of the deployment slot + # @param name [String] Name of the app. + # @param snapshot_id [String] The ID of the snapshot to read. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MigrateMySqlStatus] operation results. # - def get_migrate_my_sql_status_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def recover_site_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + response = recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + nil end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Reverts the configuration of an app to a previous snapshot. # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Reverts the configuration of an app to a previous snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of the deployment slot - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. + # @param name [String] Name of the app. + # @param snapshot_id [String] The ID of the snapshot to read. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. + # @param custom_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_migrate_my_sql_status_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! + def recover_site_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Reverts the configuration of an app to a previous snapshot. # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Reverts the configuration of an app to a previous snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of the deployment slot + # @param name [String] Name of the app. + # @param snapshot_id [String] The ID of the snapshot to read. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. # @param [Hash{String => String}] 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_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers = nil) + def recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17063,39 +16994,29 @@ def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom # Set Headers request_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.Web/sites/{name}/slots/{slot}/migratemysql/status' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -17104,69 +17025,62 @@ def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom end # - # Gets all network features used by the app (or deployment slot, if specified). + # List continuous web jobs for an app, or a deployment slot. # - # Gets all network features used by the app (or deployment slot, if specified). + # List continuous web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get network features for the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NetworkFeatures] operation results. + # @return [Array] operation results. # - def list_network_features_slot(resource_group_name, name, view, slot, custom_headers = nil) - response = list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! - response.body unless response.nil? + def list_continuous_web_jobs_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_continuous_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets all network features used by the app (or deployment slot, if specified). + # List continuous web jobs for an app, or a deployment slot. # - # Gets all network features used by the app (or deployment slot, if specified). + # List continuous web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get network features for the production slot. + # the API deletes a deployment for the production slot. # @param custom_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_network_features_slot_with_http_info(resource_group_name, name, view, slot, custom_headers = nil) - list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! + def list_continuous_web_jobs_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_continuous_web_jobs_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets all network features used by the app (or deployment slot, if specified). + # List continuous web jobs for an app, or a deployment slot. # - # Gets all network features used by the app (or deployment slot, if specified). + # List continuous web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get network features for the production slot. + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] 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_network_features_slot_async(resource_group_name, name, view, slot, custom_headers = nil) + def list_continuous_web_jobs_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'view is nil' if view.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17177,13 +17091,13 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust # Set Headers request_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.Web/sites/{name}/slots/{slot}/networkFeatures/{view}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -17194,7 +17108,7 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -17204,7 +17118,7 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() + result_mapper = Azure::ARM::Web::Models::ContinuousWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17218,75 +17132,71 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust end # - # Start capturing network packets for the site. + # Gets a continuous web job by its ID for an app, or a deployment slot. # - # Start capturing network packets for the site. + # Gets a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. + # @return [ContinuousWebJob] operation results. # - def start_web_site_network_trace_slot(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - response = start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + def get_continuous_web_job_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = get_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! response.body unless response.nil? end # - # Start capturing network packets for the site. + # Gets a continuous web job by its ID for an app, or a deployment slot. # - # Start capturing network packets for the site. + # Gets a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def start_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + def get_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + get_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! end # - # Start capturing network packets for the site. + # Gets a continuous web job by its ID for an app, or a deployment slot. # - # Start capturing network packets for the site. + # Gets a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + def get_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17296,24 +17206,24 @@ def start_web_site_network_trace_slot_async(resource_group_name, name, slot, dur # Set Headers request_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.Web/sites/{name}/slots/{slot}/networkTrace/start' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -17323,13 +17233,7 @@ def start_web_site_network_trace_slot_async(resource_group_name, name, slot, dur 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: 'String' - } - } + result_mapper = Azure::ARM::Web::Models::ContinuousWebJob.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17343,60 +17247,70 @@ def start_web_site_network_trace_slot_async(resource_group_name, name, slot, dur end # - # Stop ongoing capturing network packets for the site. + # Delete a continuous web job by its ID for an app, or a deployment slot. # - # Stop ongoing capturing network packets for the site. + # Delete a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. # - def stop_web_site_network_trace_slot(resource_group_name, name, slot, custom_headers = nil) - response = stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def delete_continuous_web_job_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = delete_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! + nil end # - # Stop ongoing capturing network packets for the site. + # Delete a continuous web job by its ID for an app, or a deployment slot. # - # Stop ongoing capturing network packets for the site. + # Delete a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def stop_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + delete_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! end # - # Stop ongoing capturing network packets for the site. + # Delete a continuous web job by its ID for an app, or a deployment slot. # - # Stop ongoing capturing network packets for the site. + # Delete a continuous web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17406,45 +17320,29 @@ def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, cust # Set Headers request_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.Web/sites/{name}/slots/{slot}/networkTrace/stop' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + 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? - # 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: 'String' - } - } - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -17453,68 +17351,70 @@ def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, cust end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Start a continuous web job for an app, or a deployment slot. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Start a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API generate a new publishing password for the production slot. + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def generate_new_site_publishing_password_slot(resource_group_name, name, slot, custom_headers = nil) - response = generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! + def start_continuous_web_job_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = start_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! nil end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Start a continuous web job for an app, or a deployment slot. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Start a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API generate a new publishing password for the production slot. + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_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_new_site_publishing_password_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! + def start_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + start_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Start a continuous web job for an app, or a deployment slot. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Start a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API generate a new publishing password for the production slot. + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param [Hash{String => String}] 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_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers = nil) + def start_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17524,14 +17424,14 @@ def generate_new_site_publishing_password_slot_async(resource_group_name, name, # Set Headers request_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.Web/sites/{name}/slots/{slot}/newpassword' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -17541,7 +17441,7 @@ def generate_new_site_publishing_password_slot_async(resource_group_name, name, http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 204 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -17555,75 +17455,70 @@ def generate_new_site_publishing_password_slot_async(resource_group_name, name, end # - # Gets perfmon counters for web app. + # Stop a continuous web job for an app, or a deployment slot. # - # Gets perfmon counters for web app. + # Stop a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @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_perf_mon_counters_slot(resource_group_name, name, slot, filter = nil, custom_headers = nil) - first_page = list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter, custom_headers) - first_page.get_all_items + def stop_continuous_web_job_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = stop_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! + nil end # - # Gets perfmon counters for web app. + # Stop a continuous web job for an app, or a deployment slot. # - # Gets perfmon counters for web app. + # Stop a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_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_perf_mon_counters_slot_with_http_info(resource_group_name, name, slot, filter = nil, custom_headers = nil) - list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter, custom_headers).value! + def stop_continuous_web_job_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + stop_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! end # - # Gets perfmon counters for web app. + # Stop a continuous web job for an app, or a deployment slot. # - # Gets perfmon counters for web app. + # Stop a continuous web job for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param [Hash{String => String}] 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_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = nil, custom_headers = nil) + def stop_continuous_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17633,40 +17528,29 @@ def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = # Set Headers request_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.Web/sites/{name}/slots/{slot}/perfcounters' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -17675,60 +17559,60 @@ def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = end # - # Gets web app's event logs. + # List deployments for an app, or a deployment slot. # - # Gets web app's event logs. + # List deployments for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SitePhpErrorLogFlag] operation results. + # @return [Array] operation results. # - def get_site_php_error_log_flag_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_deployments_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets web app's event logs. + # List deployments for an app, or a deployment slot. # - # Gets web app's event logs. + # List deployments for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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_site_php_error_log_flag_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_deployments_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_deployments_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets web app's event logs. + # List deployments for an app, or a deployment slot. # - # Gets web app's event logs. + # List deployments for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_deployments_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -17741,7 +17625,7 @@ def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, cust # Set Headers request_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.Web/sites/{name}/slots/{slot}/phplogging' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments' request_url = @base_url || @client.base_url @@ -17768,7 +17652,7 @@ def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, cust if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() + result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17782,62 +17666,66 @@ def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, cust end # - # Gets the premier add-ons of an app. + # Get a deployment by its ID for an app, or a deployment slot. # - # Gets the premier add-ons of an app. + # Get a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the premier add-ons for the production slot. + # the API gets a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [Deployment] operation results. # - def list_premier_add_ons_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) + response = get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the premier add-ons of an app. + # Get a deployment by its ID for an app, or a deployment slot. # - # Gets the premier add-ons of an app. + # Get a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the premier add-ons for the production slot. + # the API gets a deployment for the production slot. # @param custom_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_premier_add_ons_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) + get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! end # - # Gets the premier add-ons of an app. + # Get a deployment by its ID for an app, or a deployment slot. # - # Gets the premier add-ons of an app. + # Get a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the premier add-ons for the production slot. + # the API gets a deployment for the production slot. # @param [Hash{String => String}] 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_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17848,13 +17736,13 @@ def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_head # Set Headers request_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.Web/sites/{name}/slots/{slot}/premieraddons' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -17875,7 +17763,7 @@ def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_head if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17889,67 +17777,71 @@ def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_head end # - # Gets a named add-on of an app. + # Create a deployment for an app, or a deployment slot. # - # Gets a named add-on of an app. + # Create a deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named add-on for the production slot. + # the API creates a deployment for the production slot. + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [Deployment] operation results. # - def get_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - response = get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + def create_deployment_slot(resource_group_name, name, id, slot, deployment, custom_headers = nil) + response = create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! response.body unless response.nil? end # - # Gets a named add-on of an app. + # Create a deployment for an app, or a deployment slot. # - # Gets a named add-on of an app. + # Create a deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named add-on for the production slot. + # the API creates a deployment for the production slot. + # @param deployment [Deployment] Deployment details. # @param custom_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_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + def create_deployment_slot_with_http_info(resource_group_name, name, id, slot, deployment, custom_headers = nil) + create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! end # - # Gets a named add-on of an app. + # Create a deployment for an app, or a deployment slot. # - # Gets a named add-on of an app. + # Create a deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named add-on for the production slot. + # the API creates a deployment for the production slot. + # @param deployment [Deployment] Deployment details. # @param [Hash{String => String}] 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_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + def create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17959,18 +17851,27 @@ def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name # Set Headers request_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.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Deployment.mapper() + request_content = @client.serialize(request_mapper, deployment) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -17986,7 +17887,7 @@ def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -18000,73 +17901,65 @@ def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name end # - # Updates a named add-on of an app. + # Delete a deployment by its ID for an app, or a deployment slot. # - # Updates a named add-on of an app. + # Delete a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the named add-on for the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. # - def add_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) - response = add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! - response.body unless response.nil? + def delete_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) + response = delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + nil end # - # Updates a named add-on of an app. + # Delete a deployment by its ID for an app, or a deployment slot. # - # Updates a named add-on of an app. + # Delete a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the named add-on for the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def add_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) - add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! + def delete_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) + delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! end # - # Updates a named add-on of an app. + # Delete a deployment by its ID for an app, or a deployment slot. # - # Updates a named add-on of an app. + # Delete a deployment by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the named add-on for the production slot. + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) + def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? - fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18077,48 +17970,29 @@ def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() - request_content = @client.serialize(request_mapper, premier_add_on) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -18127,65 +18001,72 @@ def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name end # - # Delete a premier add-on from an app. + # List deployment log for specific deployment for an app, or a deployment slot. # - # Delete a premier add-on from an app. + # List deployment log for specific deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param id [String] The ID of a specific deployment. This is the value of the + # name property in the JSON response from "GET + # /api/sites/{siteName}/deployments". # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the named add-on for the production slot. + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Deployment] operation results. # - def delete_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - response = delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! - nil + def list_deployment_log_slot(resource_group_name, name, id, slot, custom_headers = nil) + response = list_deployment_log_slot_async(resource_group_name, name, id, slot, custom_headers).value! + response.body unless response.nil? end # - # Delete a premier add-on from an app. + # List deployment log for specific deployment for an app, or a deployment slot. # - # Delete a premier add-on from an app. + # List deployment log for specific deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param id [String] The ID of a specific deployment. This is the value of the + # name property in the JSON response from "GET + # /api/sites/{siteName}/deployments". # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the named add-on for the production slot. + # the API returns deployments for the production slot. # @param custom_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_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + def list_deployment_log_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) + list_deployment_log_slot_async(resource_group_name, name, id, slot, custom_headers).value! end # - # Delete a premier add-on from an app. + # List deployment log for specific deployment for an app, or a deployment slot. # - # Delete a premier add-on from an app. + # List deployment log for specific deployment for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param id [String] The ID of a specific deployment. This is the value of the + # name property in the JSON response from "GET + # /api/sites/{siteName}/deployments". # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the named add-on for the production slot. + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + def list_deployment_log_slot_async(resource_group_name, name, id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18196,18 +18077,18 @@ def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_n # Set Headers request_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.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -18219,6 +18100,16 @@ def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_n end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -18227,72 +18118,62 @@ def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_n end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing profile for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NOT_IMPLEMENTED] operation results. + # @return [Array] operation results. # - def list_publishing_profile_xml_with_secrets_slot(resource_group_name, name, publishing_profile_options, slot, custom_headers = nil) - response = list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers).value! - response.body unless response.nil? - end - + def list_domain_ownership_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items + end + # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing profile for the production slot. + # the API will delete the binding for the production slot. # @param custom_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_publishing_profile_xml_with_secrets_slot_with_http_info(resource_group_name, name, publishing_profile_options, slot, custom_headers = nil) - list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers).value! + def list_domain_ownership_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing profile for the production slot. + # the API will delete the binding for the production slot. # @param [Hash{String => String}] 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_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers = nil) + def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18303,15 +18184,7 @@ def list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, nam # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmPublishingProfileOptions.mapper() - request_content = @client.serialize(request_mapper, publishing_profile_options) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers' request_url = @base_url || @client.base_url @@ -18319,11 +18192,10 @@ def list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, nam middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -18339,13 +18211,7 @@ def list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, nam 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: 'Stream' - } - } + result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -18359,123 +18225,69 @@ def list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, nam end # - # Recovers a deleted web app. - # - # Recovers a deleted web app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [RecoverResponse] operation results. - # - def recover_slot(resource_group_name, name, recovery_entity, slot, custom_headers = nil) - response = recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @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 recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers = nil) - # Send request - promise = begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::RecoverResponse.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 - - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get domain ownership identifier for web app. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API resets configuration settings for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Identifier] operation results. # - def reset_slot_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! - nil + def get_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + response = get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + response.body unless response.nil? end # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get domain ownership identifier for web app. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API resets configuration settings for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def reset_slot_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! end # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get domain ownership identifier for web app. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API resets configuration settings for the production slot. + # the API will delete the binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18486,18 +18298,18 @@ def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_ # Set Headers request_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.Web/sites/{name}/slots/{slot}/resetSlotConfig' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -18509,6 +18321,16 @@ def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_ end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -18517,62 +18339,82 @@ def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_ end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceHealthMetadata] operation results. + # @return [Identifier] operation results. # - def get_resource_health_metadata_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_resource_health_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_or_update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + response = create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. # @param custom_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_resource_health_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_resource_health_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_or_update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. # @param [Hash{String => String}] 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_resource_health_metadata_slot_async(resource_group_name, name, slot, custom_headers = nil) + def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18583,18 +18425,27 @@ def get_resource_health_metadata_slot_async(resource_group_name, name, slot, cus # Set Headers request_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.Web/sites/{name}/slots/{slot}/resourceHealthMetadata' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Identifier.mapper() + request_content = @client.serialize(request_mapper, domain_ownership_identifier) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -18610,7 +18461,7 @@ def get_resource_health_metadata_slot_async(resource_group_name, name, slot, cus if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceHealthMetadata.mapper() + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -18624,79 +18475,68 @@ def get_resource_health_metadata_slot_async(resource_group_name, name, slot, cus end # - # Restarts an app (or deployment slot, if specified). + # Deletes a domain ownership identifier for a web app. # - # Restarts an app (or deployment slot, if specified). + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restart the production slot. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def restart_slot(resource_group_name, name, slot, soft_restart = nil, synchronous = nil, custom_headers = nil) - response = restart_slot_async(resource_group_name, name, slot, soft_restart, synchronous, custom_headers).value! + def delete_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + response = delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! nil end # - # Restarts an app (or deployment slot, if specified). + # Deletes a domain ownership identifier for a web app. # - # Restarts an app (or deployment slot, if specified). + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restart the production slot. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def restart_slot_with_http_info(resource_group_name, name, slot, soft_restart = nil, synchronous = nil, custom_headers = nil) - restart_slot_async(resource_group_name, name, slot, soft_restart, synchronous, custom_headers).value! + def delete_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! end # - # Restarts an app (or deployment slot, if specified). + # Deletes a domain ownership identifier for a web app. # - # Restarts an app (or deployment slot, if specified). + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restart the production slot. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # the API will delete the binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def restart_slot_async(resource_group_name, name, slot, soft_restart = nil, synchronous = nil, custom_headers = nil) + def delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18707,24 +18547,24 @@ def restart_slot_async(resource_group_name, name, slot, soft_restart = nil, sync # Set Headers request_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.Web/sites/{name}/slots/{slot}/restart' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -18738,69 +18578,82 @@ def restart_slot_async(resource_group_name, name, slot, soft_restart = nil, sync end # - # Get the difference in configuration settings between two web app slots. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Get the difference in configuration settings between two web app slots. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Identifier] operation results. # - def list_slot_differences_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - first_page = list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_entity, slot, custom_headers) - first_page.get_all_items + def update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + response = update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + response.body unless response.nil? end # - # Get the difference in configuration settings between two web app slots. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Get the difference in configuration settings between two web app slots. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. # @param custom_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_slot_differences_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + def update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! end # - # Get the difference in configuration settings between two web app slots. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Get the difference in configuration settings between two web app slots. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. # @param [Hash{String => String}] 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_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + def update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18815,23 +18668,23 @@ def list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() - request_content = @client.serialize(request_mapper, slot_swap_entity) + request_mapper = Azure::ARM::Web::Models::Identifier.mapper() + request_content = @client.serialize(request_mapper, domain_ownership_identifier) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -18847,7 +18700,7 @@ def list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SlotDifferenceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -18861,107 +18714,60 @@ def list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity end # - # Swaps two deployment slots of an app. - # - # Swaps two deployment slots of an app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - def swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - response = swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! - nil - end - - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. - # @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 swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - # Send request - promise = begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Returns all Snapshots to the user. + # Get the status of the last MSDeploy operation. # - # Returns all Snapshots to the user. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Website Name - # @param slot [String] Website Slot + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [MSDeployStatus] operation results. # - def list_snapshots_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_snapshots_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def get_msdeploy_status_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Returns all Snapshots to the user. + # Get the status of the last MSDeploy operation. # - # Returns all Snapshots to the user. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Website Name - # @param slot [String] Website Slot + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_snapshots_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_snapshots_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_msdeploy_status_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Returns all Snapshots to the user. + # Get the status of the last MSDeploy operation. # - # Returns all Snapshots to the user. + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Website Name - # @param slot [String] Website Slot + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_snapshots_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -18974,7 +18780,7 @@ def list_snapshots_slot_async(resource_group_name, name, slot, custom_headers = # Set Headers request_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.Web/sites/{name}/slots/{slot}/snapshots' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' request_url = @base_url || @client.base_url @@ -19001,7 +18807,7 @@ def list_snapshots_slot_async(resource_group_name, name, slot, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -19015,60 +18821,112 @@ def list_snapshots_slot_async(resource_group_name, name, slot, custom_headers = end # - # Gets the source control configuration of an app. + # Invoke the MSDeploy web app extension. # - # Gets the source control configuration of an app. + # Invoke the MSDeploy web app extension. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the source control configuration for the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteSourceControl] operation results. + # @return [MSDeployStatus] operation results. # - def get_source_control_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers = nil) + response = create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers).value! response.body unless response.nil? end # - # Gets the source control configuration of an app. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Gets the source control configuration of an app. + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers = nil) + # Send request + promise = begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.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 + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the source control configuration for the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployLog] operation results. + # + def get_msdeploy_log_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the source control configuration of an app. + # Get the MSDeploy Log for the last MSDeploy operation. # - # Gets the source control configuration of an app. + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the source control configuration for the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_source_control_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -19081,7 +18939,7 @@ def get_source_control_slot_async(resource_group_name, name, slot, custom_header # Set Headers request_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.Web/sites/{name}/slots/{slot}/sourcecontrols/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url @@ -19098,7 +18956,7 @@ def get_source_control_slot_async(resource_group_name, name, slot, custom_header http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -19108,7 +18966,7 @@ def get_source_control_slot_async(resource_group_name, name, slot, custom_header if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -19122,113 +18980,60 @@ def get_source_control_slot_async(resource_group_name, name, slot, custom_header end # - # Updates the source control configuration of an app. + # List the functions for a web site, or a deployment slot. # - # Updates the source control configuration of an app. + # List the functions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the source control configuration for the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteSourceControl] operation results. + # @return [Array] operation results. # - def create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers = nil) - response = create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers).value! - response.body unless response.nil? + def list_instance_functions_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_instance_functions_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the source control configuration for the production slot. - # @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_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers = nil) - # Send request - promise = begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Deletes the source control configuration of an app. - # - # Deletes the source control configuration of an app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the source control configuration for the production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def delete_source_control_slot(resource_group_name, name, slot, custom_headers = nil) - response = delete_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! - nil - end - - # - # Deletes the source control configuration of an app. + # List the functions for a web site, or a deployment slot. # - # Deletes the source control configuration of an app. + # List the functions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the source control configuration for the production slot. + # the API deletes a deployment for the production slot. # @param custom_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_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - delete_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_instance_functions_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_instance_functions_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Deletes the source control configuration of an app. + # List the functions for a web site, or a deployment slot. # - # Deletes the source control configuration of an app. + # List the functions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the source control configuration for the production slot. + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] 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_source_control_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_instance_functions_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -19241,7 +19046,7 @@ def delete_source_control_slot_async(resource_group_name, name, slot, custom_hea # Set Headers request_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.Web/sites/{name}/slots/{slot}/sourcecontrols/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions' request_url = @base_url || @client.base_url @@ -19252,18 +19057,28 @@ def delete_source_control_slot_async(resource_group_name, name, slot, custom_hea headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 || status_code == 202 || status_code == 404 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::FunctionEnvelopeCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -19272,59 +19087,60 @@ def delete_source_control_slot_async(resource_group_name, name, slot, custom_hea end # - # Starts an app (or deployment slot, if specified). + # Fetch a short lived token that can be exchanged for a master key. # - # Starts an app (or deployment slot, if specified). + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will start the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [String] operation results. # - def start_slot(resource_group_name, name, slot, custom_headers = nil) - response = start_slot_async(resource_group_name, name, slot, custom_headers).value! - nil + def get_functions_admin_token_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Starts an app (or deployment slot, if specified). + # Fetch a short lived token that can be exchanged for a master key. # - # Starts an app (or deployment slot, if specified). + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will start the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def start_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - start_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_functions_admin_token_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Starts an app (or deployment slot, if specified). + # Fetch a short lived token that can be exchanged for a master key. # - # Starts an app (or deployment slot, if specified). + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will start the production slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def start_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -19337,7 +19153,7 @@ def start_slot_async(resource_group_name, name, slot, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/slots/{slot}/start' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token' request_url = @base_url || @client.base_url @@ -19348,7 +19164,7 @@ def start_slot_async(resource_group_name, name, slot, custom_headers = nil) headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -19360,6 +19176,22 @@ def start_slot_async(resource_group_name, name, slot, custom_headers = nil) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-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: 'String' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -19368,61 +19200,66 @@ def start_slot_async(resource_group_name, name, slot, custom_headers = nil) end # - # Stops an app (or deployment slot, if specified). + # Get function information by its ID for web site, or a deployment slot. # - # Stops an app (or deployment slot, if specified). + # Get function information by its ID for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will stop the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [FunctionEnvelope] operation results. # - def stop_slot(resource_group_name, name, slot, custom_headers = nil) - response = stop_slot_async(resource_group_name, name, slot, custom_headers).value! - nil + def get_instance_function_slot(resource_group_name, name, function_name, slot, custom_headers = nil) + response = get_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers).value! + response.body unless response.nil? end # - # Stops an app (or deployment slot, if specified). + # Get function information by its ID for web site, or a deployment slot. # - # Stops an app (or deployment slot, if specified). + # Get function information by its ID for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will stop the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def stop_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - stop_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers = nil) + get_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers).value! end # - # Stops an app (or deployment slot, if specified). + # Get function information by its ID for web site, or a deployment slot. # - # Stops an app (or deployment slot, if specified). + # Get function information by its ID for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will stop the production slot. + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def stop_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -19433,29 +19270,39 @@ def stop_slot_async(resource_group_name, name, slot, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/slots/{slot}/stop' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::FunctionEnvelope.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -19464,61 +19311,119 @@ def stop_slot_async(resource_group_name, name, slot, custom_headers = nil) end # - # Sync web app repository. + # Create function for web site, or a deployment slot. # - # Sync web app repository. + # Create function for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param function_envelope [FunctionEnvelope] Function details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [FunctionEnvelope] operation results. # - def sync_repository_slot(resource_group_name, name, slot, custom_headers = nil) - response = sync_repository_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_instance_function_slot(resource_group_name, name, function_name, slot, function_envelope, custom_headers = nil) + response = create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param function_envelope [FunctionEnvelope] Function details. + # @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_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers = nil) + # Send request + promise = begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::FunctionEnvelope.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 + + # + # Delete a function for web site, or a deployment slot. + # + # Delete a function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_instance_function_slot(resource_group_name, name, function_name, slot, custom_headers = nil) + response = delete_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers).value! nil end # - # Sync web app repository. + # Delete a function for web site, or a deployment slot. # - # Sync web app repository. + # Delete a function for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def sync_repository_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - sync_repository_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers = nil) + delete_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers).value! end # - # Sync web app repository. + # Delete a function for web site, or a deployment slot. # - # Sync web app repository. + # Delete a function for web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def sync_repository_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_instance_function_slot_async(resource_group_name, name, function_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -19529,24 +19434,24 @@ def sync_repository_slot_async(resource_group_name, name, slot, custom_headers = # Set Headers request_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.Web/sites/{name}/slots/{slot}/sync' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 == 204 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -19560,61 +19465,66 @@ def sync_repository_slot_async(resource_group_name, name, slot, custom_headers = end # - # Syncs function trigger metadata to the scale controller + # Get function secrets for a function in a web site, or a deployment slot. # - # Syncs function trigger metadata to the scale controller + # Get function secrets for a function in a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [FunctionSecrets] operation results. # - def sync_function_triggers_slot(resource_group_name, name, slot, custom_headers = nil) - response = sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers).value! - nil + def list_function_secrets_slot(resource_group_name, name, function_name, slot, custom_headers = nil) + response = list_function_secrets_slot_async(resource_group_name, name, function_name, slot, custom_headers).value! + response.body unless response.nil? end # - # Syncs function trigger metadata to the scale controller + # Get function secrets for a function in a web site, or a deployment slot. # - # Syncs function trigger metadata to the scale controller + # Get function secrets for a function in a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def sync_function_triggers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_function_secrets_slot_with_http_info(resource_group_name, name, function_name, slot, custom_headers = nil) + list_function_secrets_slot_async(resource_group_name, name, function_name, slot, custom_headers).value! end # - # Syncs function trigger metadata to the scale controller + # Get function secrets for a function in a web site, or a deployment slot. # - # Syncs function trigger metadata to the scale controller + # Get function secrets for a function in a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param function_name [String] Function name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_function_secrets_slot_async(resource_group_name, name, function_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -19625,13 +19535,13 @@ def sync_function_triggers_slot_async(resource_group_name, name, slot, custom_he # Set Headers request_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.Web/sites/{name}/slots/{slot}/syncfunctiontriggers' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -19642,12 +19552,22 @@ def sync_function_triggers_slot_async(resource_group_name, name, slot, custom_he http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::FunctionSecrets.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -19656,78 +19576,60 @@ def sync_function_triggers_slot_async(resource_group_name, name, slot, custom_he end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get hostname bindings for an app or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get quota information of the production slot. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # the API gets hostname bindings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # - def list_usages_slot(resource_group_name, name, slot, filter = nil, custom_headers = nil) - first_page = list_usages_slot_as_lazy(resource_group_name, name, slot, filter, custom_headers) + def list_host_name_bindings_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers) first_page.get_all_items end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get hostname bindings for an app or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get quota information of the production slot. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # the API gets hostname bindings for the production slot. # @param custom_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_usages_slot_with_http_info(resource_group_name, name, slot, filter = nil, custom_headers = nil) - list_usages_slot_async(resource_group_name, name, slot, filter, custom_headers).value! + def list_host_name_bindings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get hostname bindings for an app or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get quota information of the production slot. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # the API gets hostname bindings for the production slot. # @param [Hash{String => String}] 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_usages_slot_async(resource_group_name, name, slot, filter = nil, custom_headers = nil) + def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -19740,7 +19642,7 @@ def list_usages_slot_async(resource_group_name, name, slot, filter = nil, custom # Set Headers request_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.Web/sites/{name}/slots/{slot}/usages' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings' request_url = @base_url || @client.base_url @@ -19748,7 +19650,6 @@ def list_usages_slot_async(resource_group_name, name, slot, filter = nil, custom middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -19768,7 +19669,7 @@ def list_usages_slot_async(resource_group_name, name, slot, filter = nil, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -19782,63 +19683,67 @@ def list_usages_slot_async(resource_group_name, name, slot, filter = nil, custom end # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get virtual network connections for the production slot. + # the API the named binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [HostNameBinding] operation results. # - def list_vnet_connections_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) + response = get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! response.body unless response.nil? end # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get virtual network connections for the production slot. + # the API the named binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_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_vnet_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) + get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! end # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get virtual network connections for the production slot. + # the API the named binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] 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_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -19848,13 +19753,13 @@ def list_vnet_connections_slot_async(resource_group_name, name, slot, custom_hea # Set Headers request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -19875,21 +19780,7 @@ def list_vnet_connections_slot_async(resource_group_name, name, slot, custom_hea 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: 'VnetInfoElementType', - type: { - name: 'Composite', - class_name: 'VnetInfo' - } - } - } - } + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -19903,66 +19794,73 @@ def list_vnet_connections_slot_async(resource_group_name, name, slot, custom_hea end # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Creates a hostname binding for an app. # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named virtual network for the production slot. + # the API will create a binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetInfo] operation results. + # @return [HostNameBinding] operation results. # - def get_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers = nil) - response = get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! + def create_or_update_host_name_binding_slot(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) + response = create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! response.body unless response.nil? end # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Creates a hostname binding for an app. # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named virtual network for the production slot. + # the API will create a binding for the production slot. # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers = nil) - get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! + def create_or_update_host_name_binding_slot_with_http_info(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) + create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! end # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Creates a hostname binding for an app. # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named virtual network for the production slot. + # the API will create a binding for the production slot. # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers = nil) + def create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? + fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -19973,18 +19871,27 @@ def get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, c # Set Headers request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + request_content = @client.serialize(request_mapper, host_name_binding) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -20000,7 +19907,7 @@ def get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, c if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -20014,80 +19921,66 @@ def get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, c end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Deletes a hostname binding for an app. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update connections for the production slot. + # the API will delete the binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetInfo] operation results. # - def create_or_update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) - response = create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! - response.body unless response.nil? + def delete_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) + response = delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + nil end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Deletes a hostname binding for an app. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update connections for the production slot. + # the API will delete the binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) - create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! + def delete_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) + delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Deletes a hostname binding for an app. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update connections for the production slot. + # the API will delete the binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -20097,48 +19990,29 @@ def create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -20147,71 +20021,67 @@ def create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_ end # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the connection for the production slot. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [HybridConnection] operation results. # - def delete_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers = nil) - response = delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! - nil + def get_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + response = get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the connection for the production slot. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers = nil) - delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! + def get_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! end # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the connection for the production slot. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers = nil) + def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -20222,29 +20092,39 @@ def delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot # Set Headers request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + 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 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -20253,78 +20133,73 @@ def delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update connections for the production slot. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetInfo] operation results. + # @return [HybridConnection] operation results. # - def update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) - response = update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! + def create_or_update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + response = create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! response.body unless response.nil? end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update connections for the production slot. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. + # @param slot [String] The name of the slot for the web app. # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) - update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! + def create_or_update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update connections for the production slot. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + def create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -20340,23 +20215,23 @@ def update_vnet_connection_slot_async(resource_group_name, name, vnet_name, conn request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -20372,7 +20247,7 @@ def update_vnet_connection_slot_async(resource_group_name, name, vnet_name, conn if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -20386,73 +20261,66 @@ def update_vnet_connection_slot_async(resource_group_name, name, vnet_name, conn end # - # Gets an app's Virtual Network gateway. + # Removes a Hybrid Connection from this site. # - # Gets an app's Virtual Network gateway. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a gateway for the production slot's Virtual Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetGateway] operation results. # - def get_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers = nil) - response = get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers).value! - response.body unless response.nil? + def delete_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + response = delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + nil end # - # Gets an app's Virtual Network gateway. + # Removes a Hybrid Connection from this site. # - # Gets an app's Virtual Network gateway. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a gateway for the production slot's Virtual Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param custom_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_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers = nil) - get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers).value! + def delete_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! end # - # Gets an app's Virtual Network gateway. + # Removes a Hybrid Connection from this site. # - # Gets an app's Virtual Network gateway. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a gateway for the production slot's Virtual Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] 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_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers = nil) + def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -20463,18 +20331,18 @@ def get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, # Set Headers request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response @@ -20486,16 +20354,6 @@ def get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -20504,82 +20362,73 @@ def get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update a gateway for the production slot's Virtual - # Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetGateway] operation results. + # @return [HybridConnection] operation results. # - def create_or_update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) - response = create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + def update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + response = update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! response.body unless response.nil? end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update a gateway for the production slot's Virtual - # Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. + # @param slot [String] The name of the slot for the web app. # @param custom_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_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) - create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + def update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update a gateway for the production slot's Virtual - # Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection. + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] 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_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + def update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -20595,23 +20444,23 @@ def create_or_update_vnet_connection_gateway_slot_async(resource_group_name, nam request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -20627,7 +20476,7 @@ def create_or_update_vnet_connection_gateway_slot_async(resource_group_name, nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -20641,83 +20490,67 @@ def create_or_update_vnet_connection_gateway_slot_async(resource_group_name, nam end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Gets the send key name and value for a Hybrid Connection. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update a gateway for the production slot's Virtual - # Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetGateway] operation results. + # @return [HybridConnectionKey] operation results. # - def update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) - response = update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + def list_hybrid_connection_keys_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + response = list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! response.body unless response.nil? end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Gets the send key name and value for a Hybrid Connection. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update a gateway for the production slot's Virtual - # Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param custom_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_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) - update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + def list_hybrid_connection_keys_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Gets the send key name and value for a Hybrid Connection. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will add or update a gateway for the production slot's Virtual - # Network. + # @param name [String] The name of the web app. + # @param namespace_name [String] The namespace for this hybrid connection. + # @param relay_name [String] The relay name for this hybrid connection. + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] 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_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -20728,27 +20561,18 @@ def update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_na # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -20764,7 +20588,7 @@ def update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_na if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -20778,63 +20602,60 @@ def update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_na end # - # Get the difference in configuration settings between two web app slots. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Get the difference in configuration settings between two web app slots. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [HybridConnection] operation results. # - def list_slot_differences_from_production(resource_group_name, name, slot_swap_entity, custom_headers = nil) - first_page = list_slot_differences_from_production_as_lazy(resource_group_name, name, slot_swap_entity, custom_headers) - first_page.get_all_items + def list_hybrid_connections_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Get the difference in configuration settings between two web app slots. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Get the difference in configuration settings between two web app slots. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for the web app. # @param custom_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_slot_differences_from_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers = nil) - list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! + def list_hybrid_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Get the difference in configuration settings between two web app slots. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Get the difference in configuration settings between two web app slots. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] 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_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers = nil) + def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -20844,27 +20665,18 @@ def list_slot_differences_from_production_async(resource_group_name, name, slot_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() - request_content = @client.serialize(request_mapper, slot_swap_entity) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -20880,7 +20692,7 @@ def list_slot_differences_from_production_async(resource_group_name, name, slot_ if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SlotDifferenceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -20894,102 +20706,69 @@ def list_slot_differences_from_production_async(resource_group_name, name, slot_ end # - # Swaps two deployment slots of an app. - # - # Swaps two deployment slots of an app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - def swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers = nil) - response = swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! - nil - end - + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @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 swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers = nil) - # Send request - promise = begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Returns all Snapshots to the user. - # - # Returns all Snapshots to the user. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Website Name + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get hybrid connections for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def list_snapshots(resource_group_name, name, custom_headers = nil) - first_page = list_snapshots_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def list_relay_service_connections_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Returns all Snapshots to the user. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Returns all Snapshots to the user. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Website Name + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get hybrid connections for the production slot. # @param custom_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_snapshots_with_http_info(resource_group_name, name, custom_headers = nil) - list_snapshots_async(resource_group_name, name, custom_headers).value! + def list_relay_service_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Returns all Snapshots to the user. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Returns all Snapshots to the user. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Website Name + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get hybrid connections for the production slot. # @param [Hash{String => String}] 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_snapshots_async(resource_group_name, name, custom_headers = nil) + def list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -20999,13 +20778,13 @@ def list_snapshots_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/snapshots' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -21026,7 +20805,7 @@ def list_snapshots_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -21040,56 +20819,67 @@ def list_snapshots_async(resource_group_name, name, custom_headers = nil) end # - # Gets the source control configuration of an app. + # Gets a hybrid connection configuration by its name. # - # Gets the source control configuration of an app. + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteSourceControl] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def get_source_control(resource_group_name, name, custom_headers = nil) - response = get_source_control_async(resource_group_name, name, custom_headers).value! + def get_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) + response = get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the source control configuration of an app. + # Gets a hybrid connection configuration by its name. # - # Gets the source control configuration of an app. + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a hybrid connection for the production slot. # @param custom_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_source_control_with_http_info(resource_group_name, name, custom_headers = nil) - get_source_control_async(resource_group_name, name, custom_headers).value! + def get_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) + get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! end # - # Gets the source control configuration of an app. + # Gets a hybrid connection configuration by its name. # - # Gets the source control configuration of an app. + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a hybrid connection for the production slot. # @param [Hash{String => String}] 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_source_control_async(resource_group_name, name, custom_headers = nil) + def get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21099,13 +20889,13 @@ def get_source_control_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/sourcecontrols/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -21126,7 +20916,7 @@ def get_source_control_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -21140,105 +20930,80 @@ def get_source_control_async(resource_group_name, name, custom_headers = nil) end # - # Updates the source control configuration of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Updates the source control configuration of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteSourceControl] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers = nil) - response = create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers).value! + def create_or_update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + response = create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! response.body unless response.nil? end # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. - # @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_source_control_async(resource_group_name, name, site_source_control, custom_headers = nil) - # Send request - promise = begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Deletes the source control configuration of an app. - # - # Deletes the source control configuration of an app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def delete_source_control(resource_group_name, name, custom_headers = nil) - response = delete_source_control_async(resource_group_name, name, custom_headers).value! - nil - end - - # - # Deletes the source control configuration of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Deletes the source control configuration of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_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_source_control_with_http_info(resource_group_name, name, custom_headers = nil) - delete_source_control_async(resource_group_name, name, custom_headers).value! + def create_or_update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! end # - # Deletes the source control configuration of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Deletes the source control configuration of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param [Hash{String => String}] 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_source_control_async(resource_group_name, name, custom_headers = nil) + def create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21248,29 +21013,48 @@ def delete_source_control_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/sourcecontrols/web' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 202 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -21279,55 +21063,66 @@ def delete_source_control_async(resource_group_name, name, custom_headers = nil) end # - # Starts an app (or deployment slot, if specified). + # Deletes a relay service connection by its name. # - # Starts an app (or deployment slot, if specified). + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def start(resource_group_name, name, custom_headers = nil) - response = start_async(resource_group_name, name, custom_headers).value! + def delete_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) + response = delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! nil end # - # Starts an app (or deployment slot, if specified). + # Deletes a relay service connection by its name. # - # Starts an app (or deployment slot, if specified). + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def start_with_http_info(resource_group_name, name, custom_headers = nil) - start_async(resource_group_name, name, custom_headers).value! + def delete_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) + delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! end # - # Starts an app (or deployment slot, if specified). + # Deletes a relay service connection by its name. # - # Starts an app (or deployment slot, if specified). + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a hybrid connection for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def start_async(resource_group_name, name, custom_headers = nil) + def delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21337,24 +21132,24 @@ def start_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/start' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -21368,55 +21163,80 @@ def start_async(resource_group_name, name, custom_headers = nil) end # - # Stops an app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Stops an app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [RelayServiceConnectionEntity] operation results. # - def stop(resource_group_name, name, custom_headers = nil) - response = stop_async(resource_group_name, name, custom_headers).value! - nil + def update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + response = update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + response.body unless response.nil? end # - # Stops an app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Stops an app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def stop_with_http_info(resource_group_name, name, custom_headers = nil) - stop_async(resource_group_name, name, custom_headers).value! + def update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! end # - # Stops an app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Stops an app (or deployment slot, if specified). + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def stop_async(resource_group_name, name, custom_headers = nil) + def update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21426,18 +21246,27 @@ def stop_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/stop' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -21449,6 +21278,16 @@ def stop_async(resource_group_name, name, custom_headers = nil) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -21457,55 +21296,63 @@ def stop_async(resource_group_name, name, custom_headers = nil) end # - # Sync web app repository. + # Gets all scale-out instances of an app. # - # Sync web app repository. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets the production slot instances. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def sync_repository(resource_group_name, name, custom_headers = nil) - response = sync_repository_async(resource_group_name, name, custom_headers).value! - nil + def list_instance_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Sync web app repository. + # Gets all scale-out instances of an app. # - # Sync web app repository. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets the production slot instances. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def sync_repository_with_http_info(resource_group_name, name, custom_headers = nil) - sync_repository_async(resource_group_name, name, custom_headers).value! + def list_instance_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Sync web app repository. + # Gets all scale-out instances of an app. # - # Sync web app repository. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets the production slot instances. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def sync_repository_async(resource_group_name, name, custom_headers = nil) + def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21515,29 +21362,39 @@ def sync_repository_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/sync' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -21546,55 +21403,67 @@ def sync_repository_async(resource_group_name, name, custom_headers = nil) end # - # Syncs function trigger metadata to the scale controller + # Get the status of the last MSDeploy operation. # - # Syncs function trigger metadata to the scale controller + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app instance. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [MSDeployStatus] operation results. # - def sync_function_triggers(resource_group_name, name, custom_headers = nil) - response = sync_function_triggers_async(resource_group_name, name, custom_headers).value! - nil + def get_instance_ms_deploy_status_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) + response = get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! + response.body unless response.nil? end # - # Syncs function trigger metadata to the scale controller + # Get the status of the last MSDeploy operation. # - # Syncs function trigger metadata to the scale controller + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app 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 sync_function_triggers_with_http_info(resource_group_name, name, custom_headers = nil) - sync_function_triggers_async(resource_group_name, name, custom_headers).value! + def get_instance_ms_deploy_status_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) + get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! end # - # Syncs function trigger metadata to the scale controller + # Get the status of the last MSDeploy operation. # - # Syncs function trigger metadata to the scale controller + # Get the status of the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app 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 sync_function_triggers_async(resource_group_name, name, custom_headers = nil) + def get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21604,29 +21473,39 @@ def sync_function_triggers_async(resource_group_name, name, custom_headers = nil # Set Headers request_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.Web/sites/{name}/syncfunctiontriggers' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -21635,74 +21514,121 @@ def sync_function_triggers_async(resource_group_name, name, custom_headers = nil end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Invoke the MSDeploy web app extension. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Invoke the MSDeploy web app extension. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [MSDeployStatus] operation results. # - def list_usages(resource_group_name, name, filter = nil, custom_headers = nil) - first_page = list_usages_as_lazy(resource_group_name, name, filter, custom_headers) - first_page.get_all_items + def create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + response = create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers).value! + response.body unless response.nil? end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + # Send request + promise = begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.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 + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app instance. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployLog] operation results. + # + def get_instance_msdeploy_log_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) + response = get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # Get the MSDeploy Log for the last MSDeploy operation. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app 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_usages_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) - list_usages_async(resource_group_name, name, filter, custom_headers).value! + def get_instance_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) + get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get the MSDeploy Log for the last MSDeploy operation. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Get the MSDeploy Log for the last MSDeploy operation. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app 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_usages_async(resource_group_name, name, filter = nil, custom_headers = nil) + def get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21712,15 +21638,14 @@ def list_usages_async(resource_group_name, name, filter = nil, custom_headers = # Set Headers request_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.Web/sites/{name}/usages' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -21730,7 +21655,7 @@ def list_usages_async(resource_group_name, name, filter = nil, custom_headers = http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -21740,7 +21665,7 @@ def list_usages_async(resource_group_name, name, filter = nil, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -21754,56 +21679,79 @@ def list_usages_async(resource_group_name, name, filter = nil, custom_headers = end # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # - def list_vnet_connections(resource_group_name, name, custom_headers = nil) - response = list_vnet_connections_async(resource_group_name, name, custom_headers).value! - response.body unless response.nil? + def list_instance_processes_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) + first_page = list_instance_processes_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers) + first_page.get_all_items end # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_vnet_connections_with_http_info(resource_group_name, name, custom_headers = nil) - list_vnet_connections_async(resource_group_name, name, custom_headers).value! + def list_instance_processes_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) + list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! end # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets the virtual networks the app (or deployment slot) is connected to. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_vnet_connections_async(resource_group_name, name, custom_headers = nil) + def list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21813,13 +21761,13 @@ def list_vnet_connections_async(resource_group_name, name, custom_headers = nil) # Set Headers request_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.Web/sites/{name}/virtualNetworkConnections' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -21830,7 +21778,7 @@ def list_vnet_connections_async(resource_group_name, name, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -21840,21 +21788,7 @@ def list_vnet_connections_async(resource_group_name, name, custom_headers = nil) 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: 'VnetInfoElementType', - type: { - name: 'Composite', - class_name: 'VnetInfo' - } - } - } - } + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -21868,60 +21802,83 @@ def list_vnet_connections_async(resource_group_name, name, custom_headers = nil) end # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetInfo] operation results. + # @return [ProcessInfo] operation results. # - def get_vnet_connection(resource_group_name, name, vnet_name, custom_headers = nil) - response = get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! + def get_instance_process_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + response = get_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! response.body unless response.nil? end # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) - get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! + def get_instance_process_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + get_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! end # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets a virtual network the app (or deployment slot) is connected to by name. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers = nil) + def get_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -21931,13 +21888,13 @@ def get_vnet_connection_async(resource_group_name, name, vnet_name, custom_heade # Set Headers request_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.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -21948,7 +21905,7 @@ def get_vnet_connection_async(resource_group_name, name, vnet_name, custom_heade http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -21958,7 +21915,7 @@ def get_vnet_connection_async(resource_group_name, name, vnet_name, custom_heade if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -21972,73 +21929,82 @@ def get_vnet_connection_async(resource_group_name, name, vnet_name, custom_heade end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetInfo] operation results. # - def create_or_update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) - response = create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! - response.body unless response.nil? + def delete_instance_process_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + response = delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! + nil end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) - create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! + def delete_instance_process_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + def delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22048,48 +22014,29 @@ def create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -22098,65 +22045,83 @@ def create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, end # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Object] operation results. # - def delete_vnet_connection(resource_group_name, name, vnet_name, custom_headers = nil) - response = delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! - nil + def get_instance_process_dump_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + response = get_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! + response.body unless response.nil? end # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) - delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! + def get_instance_process_dump_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + get_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! end # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # Deletes a connection from an app (or deployment slot to a named virtual - # network. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the virtual network. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers = nil) + def get_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22166,18 +22131,18 @@ def delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_he # Set Headers request_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.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -22197,73 +22162,83 @@ def delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_he end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetInfo] operation results. + # @return [Array] operation results. # - def update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) - response = update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! - response.body unless response.nil? + def list_instance_process_modules_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + first_page = list_instance_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers) + first_page.get_all_items end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) - update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! + def list_instance_process_modules_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + list_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! end # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Adds a Virtual Network connection to an app or slot (PUT) or updates the - # connection properties (PATCH). + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of an existing Virtual Network. - # @param connection_envelope [VnetInfo] Properties of the Virtual Network - # connection. See example. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + def list_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22273,33 +22248,24 @@ def update_vnet_connection_async(resource_group_name, name, vnet_name, connectio # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -22309,7 +22275,7 @@ def update_vnet_connection_async(resource_group_name, name, vnet_name, connectio if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -22323,67 +22289,91 @@ def update_vnet_connection_async(resource_group_name, name, vnet_name, connectio end # - # Gets an app's Virtual Network gateway. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets an app's Virtual Network gateway. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param base_address1 [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetGateway] operation results. + # @return [ProcessModuleInfo] operation results. # - def get_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) - response = get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value! + def get_instance_process_module_slot(resource_group_name, name, process_id, base_address, slot, instance_id, base_address1, custom_headers = nil) + response = get_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, base_address1, custom_headers).value! response.body unless response.nil? end # - # Gets an app's Virtual Network gateway. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets an app's Virtual Network gateway. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param base_address1 [String] # @param custom_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_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) - get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value! + def get_instance_process_module_slot_with_http_info(resource_group_name, name, process_id, base_address, slot, instance_id, base_address1, custom_headers = nil) + get_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, base_address1, custom_headers).value! end # - # Gets an app's Virtual Network gateway. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets an app's Virtual Network gateway. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param [Hash{String => String}] A hash of custom headers that will be added + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param base_address1 [String] + # @param [Hash{String => String}] 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_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) + def get_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, base_address1, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'base_address is nil' if base_address.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'base_address1 is nil' if base_address1.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22393,14 +22383,14 @@ def get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gate # Set Headers request_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.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{base_address}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'base_address' => base_address1,'subscriptionId' => @client.subscription_id}, + query_params: {'baseAddress' => base_address,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -22420,7 +22410,7 @@ def get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gate if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -22434,74 +22424,83 @@ def get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gate end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetGateway] operation results. + # @return [Array] operation results. # - def create_or_update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) - response = create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! - response.body unless response.nil? + def list_instance_process_threads_slot(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + first_page = list_instance_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers) + first_page.get_all_items end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) - create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! + def list_instance_process_threads_slot_with_http_info(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + list_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + def list_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22511,33 +22510,24 @@ def create_or_update_vnet_connection_gateway_async(resource_group_name, name, vn # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -22547,7 +22537,7 @@ def create_or_update_vnet_connection_gateway_async(resource_group_name, name, vn if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -22561,74 +22551,87 @@ def create_or_update_vnet_connection_gateway_async(resource_group_name, name, vn end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [VnetGateway] operation results. + # @return [ProcessThreadInfo] operation results. # - def update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) - response = update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! + def get_instance_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers = nil) + response = get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers).value! response.body unless response.nil? end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_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_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) - update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! + def get_instance_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers = nil) + get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers).value! end # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param vnet_name [String] Name of the Virtual Network. - # @param gateway_name [String] Name of the gateway. Currently, the only - # supported string is "primary". - # @param connection_envelope [VnetGateway] The properties to update this - # gateway with. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param [Hash{String => String}] 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_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + def get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? - fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'thread_id is nil' if thread_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22638,33 +22641,24 @@ def update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, g # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -22674,7 +22668,7 @@ def update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, g if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -22688,99 +22682,63 @@ def update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, g end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Shows whether an app can be cloned to another resource group or subscription. # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. By default, this API + # returns information on the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Site] operation results. + # @return [SiteCloneability] operation results. # - def begin_create_or_update(resource_group_name, name, site_envelope, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) - response = begin_create_or_update_async(resource_group_name, name, site_envelope, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + def is_cloneable_slot(resource_group_name, name, slot, custom_headers = nil) + response = is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Shows whether an app can be cloned to another resource group or subscription. # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. By default, this API + # returns information on the production slot. # @param custom_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, name, site_envelope, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) - begin_create_or_update_async(resource_group_name, name, site_envelope, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + def is_cloneable_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Shows whether an app can be cloned to another resource group or subscription. # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. By default, this API + # returns information on the production slot. # @param [Hash{String => String}] 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, name, site_envelope, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22790,33 +22748,24 @@ def begin_create_or_update_async(resource_group_name, name, site_envelope, skip_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Site.mapper() - request_content = @client.serialize(request_mapper, site_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'skipDnsRegistration' => skip_dns_registration,'skipCustomDomainVerification' => skip_custom_domain_verification,'forceDnsRegistration' => force_dns_registration,'ttlInSeconds' => ttl_in_seconds,'api-version' => api_version}, - body: request_content, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + 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 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -22826,17 +22775,7 @@ def begin_create_or_update_async(resource_group_name, name, site_envelope, skip_ if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Site.mapper() - result.body = @client.deserialize(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::ARM::Web::Models::Site.mapper() + result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -22850,64 +22789,63 @@ def begin_create_or_update_async(resource_group_name, name, site_envelope, skip_ end # - # Restores a specific backup to another app (or deployment slot, if specified). + # This is to allow calling via powershell and ARM template. # - # Restores a specific backup to another app (or deployment slot, if specified). + # This is to allow calling via powershell and ARM template. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RestoreResponse] operation results. + # @return [FunctionSecrets] operation results. # - def begin_restore(resource_group_name, name, backup_id, request, custom_headers = nil) - response = begin_restore_async(resource_group_name, name, backup_id, request, custom_headers).value! + def list_sync_function_triggers_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Restores a specific backup to another app (or deployment slot, if specified). + # This is to allow calling via powershell and ARM template. # - # Restores a specific backup to another app (or deployment slot, if specified). + # This is to allow calling via powershell and ARM template. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request - # @param custom_headers [Hash{String => String}] A hash of custom headers that + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. + # @param custom_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, name, backup_id, request, custom_headers = nil) - begin_restore_async(resource_group_name, name, backup_id, request, custom_headers).value! + def list_sync_function_triggers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Restores a specific backup to another app (or deployment slot, if specified). + # This is to allow calling via powershell and ARM template. # - # Restores a specific backup to another app (or deployment slot, if specified). + # This is to allow calling via powershell and ARM template. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. # @param [Hash{String => String}] 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, name, backup_id, request, custom_headers = nil) + def list_sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? - fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22917,23 +22855,14 @@ def begin_restore_async(resource_group_name, name, backup_id, request, custom_he # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() - request_content = @client.serialize(request_mapper, request) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -22953,7 +22882,7 @@ def begin_restore_async(resource_group_name, name, backup_id, request, custom_he if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() + result_mapper = Azure::ARM::Web::Models::FunctionSecrets.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -22967,56 +22896,63 @@ def begin_restore_async(resource_group_name, name, backup_id, request, custom_he end # - # Gets the Git/FTP publishing credentials of an app. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Gets the Git/FTP publishing credentials of an app. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metric definitions of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [User] operation results. + # @return [Array] operation results. # - def begin_list_publishing_credentials(resource_group_name, name, custom_headers = nil) - response = begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! - response.body unless response.nil? + def list_metric_definitions_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets the Git/FTP publishing credentials of an app. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Gets the Git/FTP publishing credentials of an app. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metric definitions of the production slot. # @param custom_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_list_publishing_credentials_with_http_info(resource_group_name, name, custom_headers = nil) - begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! + def list_metric_definitions_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the Git/FTP publishing credentials of an app. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Gets the Git/FTP publishing credentials of an app. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metric definitions of the production slot. # @param [Hash{String => String}] 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_list_publishing_credentials_async(resource_group_name, name, custom_headers = nil) + def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23026,18 +22962,18 @@ def begin_list_publishing_credentials_async(resource_group_name, name, custom_he # Set Headers request_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.Web/sites/{name}/config/publishingcredentials/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -23053,7 +22989,7 @@ def begin_list_publishing_credentials_async(resource_group_name, name, custom_he if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::User.mapper() + result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23067,64 +23003,81 @@ def begin_list_publishing_credentials_async(resource_group_name, name, custom_he end # - # Restores a web app. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Restores a web app. + # Gets performance metrics of an app (or deployment slot, if specified). # - # @param subscription_name [String] Azure subscription # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metrics of the production slot. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StorageMigrationResponse] operation results. + # @return [Array] operation results. # - def begin_migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) - response = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! - response.body unless response.nil? + def list_metrics_slot(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) + first_page = list_metrics_slot_as_lazy(resource_group_name, name, slot, details, filter, custom_headers) + first_page.get_all_items end # - # Restores a web app. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Restores a web app. + # Gets performance metrics of an app (or deployment slot, if specified). # - # @param subscription_name [String] Azure subscription # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metrics of the production slot. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_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_migrate_storage_with_http_info(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) - begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! + def list_metrics_slot_with_http_info(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) + list_metrics_slot_async(resource_group_name, name, slot, details, filter, custom_headers).value! end # - # Restores a web app. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Restores a web app. + # Gets performance metrics of an app (or deployment slot, if specified). # - # @param subscription_name [String] Azure subscription # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metrics of the production slot. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param [Hash{String => String}] 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_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) - fail ArgumentError, 'subscription_name is nil' if subscription_name.nil? + def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'migration_options is nil' if migration_options.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23134,27 +23087,19 @@ def begin_migrate_storage_async(subscription_name, resource_group_name, name, mi # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::StorageMigrationOptions.mapper() - request_content = @client.serialize(request_mapper, migration_options) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'subscriptionName' => subscription_name,'api-version' => api_version}, - body: request_content, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'details' => details,'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -23170,7 +23115,7 @@ def begin_migrate_storage_async(subscription_name, resource_group_name, name, mi if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StorageMigrationResponse.mapper() + result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23184,63 +23129,66 @@ def begin_migrate_storage_async(subscription_name, resource_group_name, name, mi end # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_request_envelope [MigrateMySqlRequest] MySql migration - # options + # @param name [String] Name of web app. + # @param slot [String] Name of the deployment slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Operation] operation results. + # @return [MigrateMySqlStatus] operation results. # - def begin_migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers = nil) - response = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! + def get_migrate_my_sql_status_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_request_envelope [MigrateMySqlRequest] MySql migration - # options + # @param name [String] Name of web app. + # @param slot [String] Name of the deployment slot. # @param custom_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_migrate_my_sql_with_http_info(resource_group_name, name, migration_request_envelope, custom_headers = nil) - begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! + def get_migrate_my_sql_status_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param migration_request_envelope [MigrateMySqlRequest] MySql migration - # options + # @param name [String] Name of web app. + # @param slot [String] Name of the deployment slot. # @param [Hash{String => String}] 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_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers = nil) + def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'migration_request_envelope is nil' if migration_request_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23250,27 +23198,18 @@ def begin_migrate_my_sql_async(resource_group_name, name, migration_request_enve # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::MigrateMySqlRequest.mapper() - request_content = @client.serialize(request_mapper, migration_request_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -23286,7 +23225,7 @@ def begin_migrate_my_sql_async(resource_group_name, name, migration_request_enve if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Operation.mapper() + result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23300,66 +23239,70 @@ def begin_migrate_my_sql_async(resource_group_name, name, migration_request_enve end # - # Recovers a deleted web app. + # Gets all network features used by the app (or deployment slot, if specified). # - # Recovers a deleted web app. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param name [String] Name of the app. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get network features for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RecoverResponse] operation results. + # @return [NetworkFeatures] operation results. # - def begin_recover(resource_group_name, name, recovery_entity, custom_headers = nil) - response = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers).value! + def list_network_features_slot(resource_group_name, name, view, slot, custom_headers = nil) + response = list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! response.body unless response.nil? end # - # Recovers a deleted web app. + # Gets all network features used by the app (or deployment slot, if specified). # - # Recovers a deleted web app. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param name [String] Name of the app. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get network features for the production slot. # @param custom_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_recover_with_http_info(resource_group_name, name, recovery_entity, custom_headers = nil) - begin_recover_async(resource_group_name, name, recovery_entity, custom_headers).value! + def list_network_features_slot_with_http_info(resource_group_name, name, view, slot, custom_headers = nil) + list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! end # - # Recovers a deleted web app. + # Gets all network features used by the app (or deployment slot, if specified). # - # Recovers a deleted web app. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param name [String] Name of the app. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get network features for the production slot. # @param [Hash{String => String}] 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_recover_async(resource_group_name, name, recovery_entity, custom_headers = nil) + def list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'recovery_entity is nil' if recovery_entity.nil? + fail ArgumentError, 'view is nil' if view.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23369,33 +23312,24 @@ def begin_recover_async(resource_group_name, name, recovery_entity, custom_heade # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSiteRecoveryEntity.mapper() - request_content = @client.serialize(request_mapper, recovery_entity) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -23405,7 +23339,7 @@ def begin_recover_async(resource_group_name, name, recovery_entity, custom_heade if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RecoverResponse.mapper() + result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23419,105 +23353,74 @@ def begin_recover_async(resource_group_name, name, recovery_entity, custom_heade end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Start capturing network packets for the site. # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param slot [String] Name of the deployment slot to create or update. By - # default, this API attempts to create or modify the production slot. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Site] operation results. + # @return [String] operation results. # - def begin_create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) - response = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + def start_web_site_network_trace_slot(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + response = start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! response.body unless response.nil? end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Start capturing network packets for the site. # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param slot [String] Name of the deployment slot to create or update. By - # default, this API attempts to create or modify the production slot. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param custom_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_slot_with_http_info(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) - begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + def start_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Start capturing network packets for the site. # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param slot [String] Name of the deployment slot to create or update. By - # default, this API attempts to create or modify the production slot. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param [Hash{String => String}] 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_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + def start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23528,33 +23431,24 @@ def begin_create_or_update_slot_async(resource_group_name, name, site_envelope, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Site.mapper() - request_content = @client.serialize(request_mapper, site_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'skipDnsRegistration' => skip_dns_registration,'skipCustomDomainVerification' => skip_custom_domain_verification,'forceDnsRegistration' => force_dns_registration,'ttlInSeconds' => ttl_in_seconds,'api-version' => api_version}, - body: request_content, + query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + 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 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -23564,17 +23458,13 @@ def begin_create_or_update_slot_async(resource_group_name, name, site_envelope, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Site.mapper() - result.body = @client.deserialize(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::ARM::Web::Models::Site.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23588,70 +23478,59 @@ def begin_create_or_update_slot_async(resource_group_name, name, site_envelope, end # - # Restores a specific backup to another app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # - # Restores a specific backup to another app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RestoreResponse] operation results. + # @return [String] operation results. # - def begin_restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - response = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def stop_web_site_network_trace_slot(resource_group_name, name, slot, custom_headers = nil) + response = stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Restores a specific backup to another app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # - # Restores a specific backup to another app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. # @param custom_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_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def stop_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Restores a specific backup to another app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # - # Restores a specific backup to another app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. # @param [Hash{String => String}] 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_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? - fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23662,23 +23541,14 @@ def begin_restore_slot_async(resource_group_name, name, backup_id, request, slot # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() - request_content = @client.serialize(request_mapper, request) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -23698,7 +23568,13 @@ def begin_restore_slot_async(resource_group_name, name, backup_id, request, slot if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23712,60 +23588,65 @@ def begin_restore_slot_async(resource_group_name, name, backup_id, request, slot end # - # Gets the Git/FTP publishing credentials of an app. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Gets the Git/FTP publishing credentials of an app. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # the API generate a new publishing password for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [User] operation results. # - def begin_list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) - response = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def generate_new_site_publishing_password_slot(resource_group_name, name, slot, custom_headers = nil) + response = generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Gets the Git/FTP publishing credentials of an app. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Gets the Git/FTP publishing credentials of an app. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # the API generate a new publishing password for the production slot. # @param custom_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_list_publishing_credentials_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + def generate_new_site_publishing_password_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the Git/FTP publishing credentials of an app. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Gets the Git/FTP publishing credentials of an app. + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # the API generate a new publishing password for the production slot. # @param [Hash{String => String}] 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_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) + def generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -23778,7 +23659,7 @@ def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot # Set Headers request_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.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword' request_url = @base_url || @client.base_url @@ -23795,22 +23676,12 @@ def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::User.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -23819,72 +23690,74 @@ def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot end # - # Recovers a deleted web app. + # Gets perfmon counters for web app. # - # Recovers a deleted web app. + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param name [String] Name of web app. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RecoverResponse] operation results. + # @return [Array] operation results. # - def begin_recover_slot(resource_group_name, name, recovery_entity, slot, custom_headers = nil) - response = begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers).value! - response.body unless response.nil? + def list_perf_mon_counters_slot(resource_group_name, name, slot, filter = nil, custom_headers = nil) + first_page = list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter, custom_headers) + first_page.get_all_items end # - # Recovers a deleted web app. + # Gets perfmon counters for web app. # - # Recovers a deleted web app. + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param name [String] Name of web app. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param custom_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_recover_slot_with_http_info(resource_group_name, name, recovery_entity, slot, custom_headers = nil) - begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers).value! + def list_perf_mon_counters_slot_with_http_info(resource_group_name, name, slot, filter = nil, custom_headers = nil) + list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter, custom_headers).value! end # - # Recovers a deleted web app. + # Gets perfmon counters for web app. # - # Recovers a deleted web app. + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param name [String] Name of web app. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param [Hash{String => String}] 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_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers = nil) + def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'recovery_entity is nil' if recovery_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23895,15 +23768,7 @@ def begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, c # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSiteRecoveryEntity.mapper() - request_content = @client.serialize(request_mapper, recovery_entity) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters' request_url = @base_url || @client.base_url @@ -23911,11 +23776,11 @@ def begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, c middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, + skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -23931,7 +23796,7 @@ def begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, c if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RecoverResponse.mapper() + result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23945,68 +23810,62 @@ def begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, c end # - # Swaps two deployment slots of an app. + # Gets web app's event logs. # - # Swaps two deployment slots of an app. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [SitePhpErrorLogFlag] operation results. # - def begin_swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - response = begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! - nil + def get_site_php_error_log_flag_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Swaps two deployment slots of an app. + # Gets web app's event logs. # - # Swaps two deployment slots of an app. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_swap_slot_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + def get_site_php_error_log_flag_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Swaps two deployment slots of an app. + # Gets web app's event logs. # - # Swaps two deployment slots of an app. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -24017,15 +23876,7 @@ def begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() - request_content = @client.serialize(request_mapper, slot_swap_entity) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging' request_url = @base_url || @client.base_url @@ -24033,22 +23884,31 @@ def begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 || status_code == 202 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -24057,69 +23917,62 @@ def begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot end # - # Updates the source control configuration of an app. + # Gets the premier add-ons of an app. # - # Updates the source control configuration of an app. + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the source control configuration for the production slot. + # the API will get the premier add-ons for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteSourceControl] operation results. + # @return [PremierAddOn] operation results. # - def begin_create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers = nil) - response = begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers).value! + def list_premier_add_ons_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Updates the source control configuration of an app. + # Gets the premier add-ons of an app. # - # Updates the source control configuration of an app. + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the source control configuration for the production slot. + # the API will get the premier add-ons for the production slot. # @param custom_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_source_control_slot_with_http_info(resource_group_name, name, site_source_control, slot, custom_headers = nil) - begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers).value! + def list_premier_add_ons_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Updates the source control configuration of an app. + # Gets the premier add-ons of an app. # - # Updates the source control configuration of an app. + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the source control configuration for the production slot. + # the API will get the premier add-ons for the production slot. # @param [Hash{String => String}] 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_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers = nil) + def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -24130,15 +23983,7 @@ def begin_create_or_update_source_control_slot_async(resource_group_name, name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() - request_content = @client.serialize(request_mapper, site_source_control) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons' request_url = @base_url || @client.base_url @@ -24146,17 +23991,16 @@ def begin_create_or_update_source_control_slot_async(resource_group_name, name, middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 || status_code == 201 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -24166,17 +24010,7 @@ def begin_create_or_update_source_control_slot_async(resource_group_name, name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -24190,62 +24024,67 @@ def begin_create_or_update_source_control_slot_async(resource_group_name, name, end # - # Swaps two deployment slots of an app. + # Gets a named add-on of an app. # - # Swaps two deployment slots of an app. + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [PremierAddOn] operation results. # - def begin_swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers = nil) - response = begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! - nil + def get_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + response = get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + response.body unless response.nil? end # - # Swaps two deployment slots of an app. + # Gets a named add-on of an app. # - # Swaps two deployment slots of an app. + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the named add-on for the production slot. # @param custom_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_swap_slot_with_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers = nil) - begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! + def get_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! end # - # Swaps two deployment slots of an app. + # Gets a named add-on of an app. # - # Swaps two deployment slots of an app. + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the named add-on for the production slot. # @param [Hash{String => String}] 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_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers = nil) + def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -24255,38 +24094,39 @@ def begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_e # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() - request_content = @client.serialize(request_mapper, slot_swap_entity) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => 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 = @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 || status_code == 202 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -24295,63 +24135,74 @@ def begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_e end # - # Updates the source control configuration of an app. + # Updates a named add-on of an app. # - # Updates the source control configuration of an app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteSourceControl] operation results. + # @return [PremierAddOn] operation results. # - def begin_create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers = nil) - response = begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers).value! + def add_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) + response = add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! response.body unless response.nil? end # - # Updates the source control configuration of an app. + # Updates a named add-on of an app. # - # Updates the source control configuration of an app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the named add-on for the production slot. # @param custom_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_source_control_with_http_info(resource_group_name, name, site_source_control, custom_headers = nil) - begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers).value! + def add_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) + add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! end # - # Updates the source control configuration of an app. + # Updates a named add-on of an app. # - # Updates the source control configuration of an app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_source_control [SiteSourceControl] JSON representation of a - # SiteSourceControl object. See example. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the named add-on for the production slot. # @param [Hash{String => String}] 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_source_control_async(resource_group_name, name, site_source_control, custom_headers = nil) + def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -24365,17 +24216,17 @@ def begin_create_or_update_source_control_async(resource_group_name, name, site_ request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() - request_content = @client.serialize(request_mapper, site_source_control) + request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + request_content = @client.serialize(request_mapper, premier_add_on) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -24387,7 +24238,7 @@ def begin_create_or_update_source_control_async(resource_group_name, name, site_ http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 201 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -24397,17 +24248,7 @@ def begin_create_or_update_source_control_async(resource_group_name, name, site_ if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end - # Deserialize Response - if status_code == 201 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -24421,52 +24262,68 @@ def begin_create_or_update_source_control_async(resource_group_name, name, site_ end # - # Get all apps for a subscription. + # Delete a premier add-on from an app. # - # Get all apps for a subscription. + # Delete a premier add-on from an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppCollection] 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? + def delete_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + response = delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + nil end # - # Get all apps for a subscription. + # Delete a premier add-on from an app. # - # Get all apps for a subscription. + # Delete a premier add-on from an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the named add-on for the production slot. # @param custom_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! + def delete_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! end # - # Get all apps for a subscription. + # Delete a premier add-on from an app. # - # Get all apps for a subscription. + # Delete a premier add-on from an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the named add-on for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -24474,17 +24331,18 @@ def list_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response @@ -24496,16 +24354,6 @@ def list_next_async(next_page_link, custom_headers = nil) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -24514,52 +24362,71 @@ def list_next_async(next_page_link, custom_headers = nil) end # - # Gets all web, mobile, and API apps in the specified resource group. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets all web, mobile, and API apps in the specified resource group. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppCollection] operation results. + # @return [Array] 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? + def list_processes_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_processes_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets all web, mobile, and API apps in the specified resource group. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets all web, mobile, and API apps in the specified resource group. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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! + def list_processes_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_processes_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets all web, mobile, and API apps in the specified resource group. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets all web, mobile, and API apps in the specified resource group. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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? + def list_processes_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -24567,13 +24434,14 @@ def list_by_resource_group_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -24583,7 +24451,7 @@ def list_by_resource_group_next_async(next_page_link, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -24593,7 +24461,7 @@ def list_by_resource_group_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -24607,52 +24475,75 @@ def list_by_resource_group_next_async(next_page_link, custom_headers = nil) end # - # Gets existing backups of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets existing backups of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItemCollection] operation results. + # @return [ProcessInfo] operation results. # - def list_backups_next(next_page_link, custom_headers = nil) - response = list_backups_next_async(next_page_link, custom_headers).value! + def get_process_slot(resource_group_name, name, process_id, slot, custom_headers = nil) + response = get_process_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! response.body unless response.nil? end # - # Gets existing backups of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets existing backups of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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_backups_next_with_http_info(next_page_link, custom_headers = nil) - list_backups_next_async(next_page_link, custom_headers).value! + def get_process_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers = nil) + get_process_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! end # - # Gets existing backups of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Gets existing backups of an app. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_backups_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_process_slot_async(resource_group_name, name, process_id, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -24660,13 +24551,14 @@ def list_backups_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -24676,7 +24568,7 @@ def list_backups_next_async(next_page_link, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -24686,7 +24578,7 @@ def list_backups_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -24700,52 +24592,74 @@ def list_backups_next_async(next_page_link, custom_headers = nil) end # - # List the configurations of an app + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # List the configurations of an app + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResourceCollection] operation results. # - def list_configurations_next(next_page_link, custom_headers = nil) - response = list_configurations_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def delete_process_slot(resource_group_name, name, process_id, slot, custom_headers = nil) + response = delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! + nil end # - # List the configurations of an app + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # List the configurations of an app + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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_configurations_next_with_http_info(next_page_link, custom_headers = nil) - list_configurations_next_async(next_page_link, custom_headers).value! + def delete_process_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers = nil) + delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! end # - # List the configurations of an app + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # List the configurations of an app + # Terminate a process by its ID for a web site, or a deployment slot, or + # specific scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_configurations_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -24753,38 +24667,29 @@ def list_configurations_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -24793,58 +24698,75 @@ def list_configurations_next_async(next_page_link, custom_headers = nil) end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] operation results. + # @return [Object] operation results. # - def list_deployments_next(next_page_link, custom_headers = nil) - response = list_deployments_next_async(next_page_link, custom_headers).value! + def get_process_dump_slot(resource_group_name, name, process_id, slot, custom_headers = nil) + response = get_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! response.body unless response.nil? end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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_deployments_next_with_http_info(next_page_link, custom_headers = nil) - list_deployments_next_async(next_page_link, custom_headers).value! + def get_process_dump_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers = nil) + get_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get a memory dump of a process by its ID for a specific scaled-out instance + # in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_deployments_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -24852,13 +24774,14 @@ def list_deployments_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -24868,22 +24791,12 @@ def list_deployments_next_async(next_page_link, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -24892,52 +24805,75 @@ def list_deployments_next_async(next_page_link, custom_headers = nil) end # - # Lists ownership identifiers for domain associated with web app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Lists ownership identifiers for domain associated with web app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [IdentifierCollection] operation results. + # @return [Array] operation results. # - def list_domain_ownership_identifiers_next(next_page_link, custom_headers = nil) - response = list_domain_ownership_identifiers_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def list_process_modules_slot(resource_group_name, name, process_id, slot, custom_headers = nil) + first_page = list_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers) + first_page.get_all_items end # - # Lists ownership identifiers for domain associated with web app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Lists ownership identifiers for domain associated with web app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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_domain_ownership_identifiers_next_with_http_info(next_page_link, custom_headers = nil) - list_domain_ownership_identifiers_next_async(next_page_link, custom_headers).value! + def list_process_modules_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers = nil) + list_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! end # - # Lists ownership identifiers for domain associated with web app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Lists ownership identifiers for domain associated with web app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_domain_ownership_identifiers_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -24945,13 +24881,14 @@ def list_domain_ownership_identifiers_next_async(next_page_link, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -24961,7 +24898,7 @@ def list_domain_ownership_identifiers_next_async(next_page_link, custom_headers http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -24971,7 +24908,7 @@ def list_domain_ownership_identifiers_next_async(next_page_link, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -24985,52 +24922,83 @@ def list_domain_ownership_identifiers_next_async(next_page_link, custom_headers end # - # Get hostname bindings for an app or a deployment slot. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Get hostname bindings for an app or a deployment slot. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param base_address1 [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBindingCollection] operation results. + # @return [ProcessModuleInfo] operation results. # - def list_host_name_bindings_next(next_page_link, custom_headers = nil) - response = list_host_name_bindings_next_async(next_page_link, custom_headers).value! + def get_process_module_slot(resource_group_name, name, process_id, base_address, slot, base_address1, custom_headers = nil) + response = get_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, base_address1, custom_headers).value! response.body unless response.nil? end # - # Get hostname bindings for an app or a deployment slot. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Get hostname bindings for an app or a deployment slot. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param base_address1 [String] # @param custom_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_host_name_bindings_next_with_http_info(next_page_link, custom_headers = nil) - list_host_name_bindings_next_async(next_page_link, custom_headers).value! + def get_process_module_slot_with_http_info(resource_group_name, name, process_id, base_address, slot, base_address1, custom_headers = nil) + get_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, base_address1, custom_headers).value! end # - # Get hostname bindings for an app or a deployment slot. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # Get hostname bindings for an app or a deployment slot. + # Get process information by its ID for a specific scaled-out instance in a web + # site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param base_address [String] Module base address. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param base_address1 [String] # @param [Hash{String => String}] 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_host_name_bindings_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, base_address1, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'base_address is nil' if base_address.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'base_address1 is nil' if base_address1.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25038,13 +25006,14 @@ def list_host_name_bindings_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{base_address}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'base_address' => base_address1,'subscriptionId' => @client.subscription_id}, + query_params: {'baseAddress' => base_address,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -25054,7 +25023,7 @@ def list_host_name_bindings_next_async(next_page_link, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -25064,7 +25033,7 @@ def list_host_name_bindings_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -25078,52 +25047,75 @@ def list_host_name_bindings_next_async(next_page_link, custom_headers = nil) end # - # Gets all scale-out instances of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets all scale-out instances of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppInstanceCollection] operation results. + # @return [Array] operation results. # - def list_instance_identifiers_next(next_page_link, custom_headers = nil) - response = list_instance_identifiers_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def list_process_threads_slot(resource_group_name, name, process_id, slot, custom_headers = nil) + first_page = list_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers) + first_page.get_all_items end # - # Gets all scale-out instances of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets all scale-out instances of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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_instance_identifiers_next_with_http_info(next_page_link, custom_headers = nil) - list_instance_identifiers_next_async(next_page_link, custom_headers).value! + def list_process_threads_slot_with_http_info(resource_group_name, name, process_id, slot, custom_headers = nil) + list_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! end # - # Gets all scale-out instances of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # Gets all scale-out instances of an app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_instance_identifiers_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25131,13 +25123,14 @@ def list_instance_identifiers_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -25147,7 +25140,7 @@ def list_instance_identifiers_next_async(next_page_link, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -25157,7 +25150,7 @@ def list_instance_identifiers_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -25171,58 +25164,79 @@ def list_instance_identifiers_next_async(next_page_link, custom_headers = nil) end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] operation results. + # @return [ProcessThreadInfo] operation results. # - def list_instance_deployments_next(next_page_link, custom_headers = nil) - response = list_instance_deployments_next_async(next_page_link, custom_headers).value! + def get_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, custom_headers = nil) + response = get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers).value! response.body unless response.nil? end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_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_instance_deployments_next_with_http_info(next_page_link, custom_headers = nil) - list_instance_deployments_next_async(next_page_link, custom_headers).value! + def get_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, custom_headers = nil) + get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get thread information by Thread ID for a specific process, in a specific + # scaled-out instance in a web site. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param thread_id [String] TID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param [Hash{String => String}] 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_instance_deployments_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'process_id is nil' if process_id.nil? + fail ArgumentError, 'thread_id is nil' if thread_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25230,13 +25244,14 @@ def list_instance_deployments_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -25246,7 +25261,7 @@ def list_instance_deployments_next_async(next_page_link, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -25256,7 +25271,7 @@ def list_instance_deployments_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -25270,52 +25285,65 @@ def list_instance_deployments_next_async(next_page_link, custom_headers = nil) end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get public certificates for an app or a deployment slot. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get public certificates for an app or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets hostname bindings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceMetricDefinitionCollection] operation results. + # @return [Array] operation results. # - def list_metric_definitions_next(next_page_link, custom_headers = nil) - response = list_metric_definitions_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def list_public_certificates_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_public_certificates_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get public certificates for an app or a deployment slot. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get public certificates for an app or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets hostname bindings for the production slot. # @param custom_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_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil) - list_metric_definitions_next_async(next_page_link, custom_headers).value! + def list_public_certificates_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get public certificates for an app or a deployment slot. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get public certificates for an app or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets hostname bindings for the production slot. # @param [Hash{String => String}] 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_metric_definitions_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25323,13 +25351,14 @@ def list_metric_definitions_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -25349,7 +25378,7 @@ def list_metric_definitions_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -25363,52 +25392,75 @@ def list_metric_definitions_next_async(next_page_link, custom_headers = nil) end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets performance metrics of an app (or deployment slot, if specified). + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API the named binding for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceMetricCollection] operation results. + # @return [PublicCertificate] operation results. # - def list_metrics_next(next_page_link, custom_headers = nil) - response = list_metrics_next_async(next_page_link, custom_headers).value! + def get_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + response = get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! response.body unless response.nil? end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets performance metrics of an app (or deployment slot, if specified). + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API the named binding for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metrics_next_with_http_info(next_page_link, custom_headers = nil) - list_metrics_next_async(next_page_link, custom_headers).value! + def get_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets performance metrics of an app (or deployment slot, if specified). + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API the named binding for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metrics_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25416,13 +25468,14 @@ def list_metrics_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -25442,7 +25495,7 @@ def list_metrics_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -25456,52 +25509,76 @@ def list_metrics_next_async(next_page_link, custom_headers = nil) end # - # Gets perfmon counters for web app. + # Creates a hostname binding for an app. # - # Gets perfmon counters for web app. + # Creates a hostname binding for an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create a binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PerfMonCounterCollection] operation results. + # @return [PublicCertificate] operation results. # - def list_perf_mon_counters_next(next_page_link, custom_headers = nil) - response = list_perf_mon_counters_next_async(next_page_link, custom_headers).value! + def create_or_update_public_certificate_slot(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers = nil) + response = create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers).value! response.body unless response.nil? end # - # Gets perfmon counters for web app. + # Creates a hostname binding for an app. # - # Gets perfmon counters for web app. + # Creates a hostname binding for an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create a binding for the production slot. # @param custom_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_perf_mon_counters_next_with_http_info(next_page_link, custom_headers = nil) - list_perf_mon_counters_next_async(next_page_link, custom_headers).value! + def create_or_update_public_certificate_slot_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers = nil) + create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers).value! end # - # Gets perfmon counters for web app. + # Creates a hostname binding for an app. # - # Gets perfmon counters for web app. + # Creates a hostname binding for an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create a binding for the production slot. # @param [Hash{String => String}] 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_perf_mon_counters_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, 'public_certificate is nil' if public_certificate.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25509,17 +25586,27 @@ def list_perf_mon_counters_next_async(next_page_link, custom_headers = nil) # Set 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_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() + request_content = @client.serialize(request_mapper, public_certificate) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -25535,7 +25622,7 @@ def list_perf_mon_counters_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -25549,52 +25636,68 @@ def list_perf_mon_counters_next_async(next_page_link, custom_headers = nil) end # - # Gets an app's deployment slots. + # Deletes a hostname binding for an app. # - # Gets an app's deployment slots. + # Deletes a hostname binding for an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppCollection] operation results. # - def list_slots_next(next_page_link, custom_headers = nil) - response = list_slots_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def delete_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + response = delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! + nil end # - # Gets an app's deployment slots. + # Deletes a hostname binding for an app. # - # Gets an app's deployment slots. + # Deletes a hostname binding for an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_slots_next_with_http_info(next_page_link, custom_headers = nil) - list_slots_next_async(next_page_link, custom_headers).value! + def delete_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! end # - # Gets an app's deployment slots. + # Deletes a hostname binding for an app. # - # Gets an app's deployment slots. + # Deletes a hostname binding for an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. + # @param public_certificate_name [String] Public certificate name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_slots_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25602,38 +25705,29 @@ def list_slots_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -25642,52 +25736,75 @@ def list_slots_next_async(next_page_link, custom_headers = nil) end # - # Gets existing backups of an app. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Gets existing backups of an app. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing profile for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItemCollection] operation results. + # @return [NOT_IMPLEMENTED] operation results. # - def list_backups_slot_next(next_page_link, custom_headers = nil) - response = list_backups_slot_next_async(next_page_link, custom_headers).value! + def list_publishing_profile_xml_with_secrets_slot(resource_group_name, name, publishing_profile_options, slot, custom_headers = nil) + response = list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers).value! response.body unless response.nil? end # - # Gets existing backups of an app. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Gets existing backups of an app. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing profile for the production slot. # @param custom_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_backups_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_backups_slot_next_async(next_page_link, custom_headers).value! + def list_publishing_profile_xml_with_secrets_slot_with_http_info(resource_group_name, name, publishing_profile_options, slot, custom_headers = nil) + list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers).value! end # - # Gets existing backups of an app. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Gets existing backups of an app. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing profile for the production slot. # @param [Hash{String => String}] 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_backups_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, name, publishing_profile_options, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25695,17 +25812,27 @@ def list_backups_slot_next_async(next_page_link, custom_headers = nil) # Set 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_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmPublishingProfileOptions.mapper() + request_content = @client.serialize(request_mapper, publishing_profile_options) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -25721,7 +25848,13 @@ def list_backups_slot_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Stream' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -25735,52 +25868,122 @@ def list_backups_slot_next_async(next_page_link, custom_headers = nil) end # - # List the configurations of an app + # Recovers a web app to a previous snapshot. # - # List the configurations of an app + # Recovers a web app to a previous snapshot. # - # @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 + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResourceCollection] operation results. + def recover_slot(resource_group_name, name, recovery_entity, slot, custom_headers = nil) + response = recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers).value! + nil + end + # - def list_configurations_slot_next(next_page_link, custom_headers = nil) - response = list_configurations_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @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 recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers = nil) + # Send request + promise = begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise end # - # List the configurations of an app + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # List the configurations of an app + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API resets configuration settings for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def reset_slot_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + nil + end + + # + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. + # + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API resets configuration settings for the production slot. # @param custom_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_configurations_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_configurations_slot_next_async(next_page_link, custom_headers).value! + def reset_slot_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # List the configurations of an app + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # List the configurations of an app + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API resets configuration settings for the production slot. # @param [Hash{String => String}] 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_configurations_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25788,17 +25991,18 @@ def list_configurations_slot_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -25810,16 +26014,6 @@ def list_configurations_slot_next_async(next_page_link, custom_headers = nil) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -25828,58 +26022,82 @@ def list_configurations_slot_next_async(next_page_link, custom_headers = nil) end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Restarts an app (or deployment slot, if specified). # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Restarts an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restart the production slot. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] operation results. # - def list_deployments_slot_next(next_page_link, custom_headers = nil) - response = list_deployments_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def restart_slot(resource_group_name, name, slot, soft_restart = nil, synchronous = nil, custom_headers = nil) + response = restart_slot_async(resource_group_name, name, slot, soft_restart, synchronous, custom_headers).value! + nil end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Restarts an app (or deployment slot, if specified). # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Restarts an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restart the production slot. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param custom_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_deployments_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_deployments_slot_next_async(next_page_link, custom_headers).value! + def restart_slot_with_http_info(resource_group_name, name, slot, soft_restart = nil, synchronous = nil, custom_headers = nil) + restart_slot_async(resource_group_name, name, slot, soft_restart, synchronous, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Restarts an app (or deployment slot, if specified). # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Restarts an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restart the production slot. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param [Hash{String => String}] 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_deployments_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def restart_slot_async(resource_group_name, name, slot, soft_restart = nil, synchronous = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25887,17 +26105,18 @@ def list_deployments_slot_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -25909,16 +26128,6 @@ def list_deployments_slot_next_async(next_page_link, custom_headers = nil) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -25927,52 +26136,65 @@ def list_deployments_slot_next_async(next_page_link, custom_headers = nil) end # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [IdentifierCollection] operation results. + # @return [Array] operation results. # - def list_domain_ownership_identifiers_slot_next(next_page_link, custom_headers = nil) - response = list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def list_site_extensions_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_site_extensions_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param custom_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_domain_ownership_identifiers_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers).value! + def list_site_extensions_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_site_extensions_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] 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_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_site_extensions_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -25980,13 +26202,14 @@ def list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_hea # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -25996,7 +26219,7 @@ def list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_hea http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -26006,7 +26229,7 @@ def list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_hea if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -26020,52 +26243,79 @@ def list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_hea end # - # Get hostname bindings for an app or a deployment slot. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # Get hostname bindings for an app or a deployment slot. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBindingCollection] operation results. + # @return [SiteExtensionInfo] operation results. # - def list_host_name_bindings_slot_next(next_page_link, custom_headers = nil) - response = list_host_name_bindings_slot_next_async(next_page_link, custom_headers).value! + def get_site_extension_slot(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + response = get_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers).value! response.body unless response.nil? end # - # Get hostname bindings for an app or a deployment slot. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # Get hostname bindings for an app or a deployment slot. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param custom_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_host_name_bindings_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_host_name_bindings_slot_next_async(next_page_link, custom_headers).value! + def get_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + get_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers).value! end # - # Get hostname bindings for an app or a deployment slot. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # Get hostname bindings for an app or a deployment slot. + # Get site extension information by its ID for a web site, or a deployment + # slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param [Hash{String => String}] 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_host_name_bindings_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'extension_name is nil' if extension_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26073,13 +26323,14 @@ def list_host_name_bindings_slot_next_async(next_page_link, custom_headers = nil # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{extensionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id}, + query_params: {'siteExtensionId' => site_extension_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -26089,7 +26340,7 @@ def list_host_name_bindings_slot_next_async(next_page_link, custom_headers = nil http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -26099,7 +26350,7 @@ def list_host_name_bindings_slot_next_async(next_page_link, custom_headers = nil if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -26113,151 +26364,126 @@ def list_host_name_bindings_slot_next_async(next_page_link, custom_headers = nil end # - # Gets all scale-out instances of an app. + # Install site extension on a web site, or a deployment slot. # - # Gets all scale-out instances of an app. + # Install site extension on a web site, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppInstanceCollection] operation results. + # @return [SiteExtensionInfo] operation results. # - def list_instance_identifiers_slot_next(next_page_link, custom_headers = nil) - response = list_instance_identifiers_slot_next_async(next_page_link, custom_headers).value! + def install_site_extension_slot(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + response = install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers).value! response.body unless response.nil? end # - # Gets all scale-out instances of an app. - # - # Gets all scale-out instances of an app. - # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param custom_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_instance_identifiers_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_instance_identifiers_slot_next_async(next_page_link, custom_headers).value! - end - - # - # Gets all scale-out instances of an app. - # - # Gets all scale-out instances of an app. - # - # @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. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - def list_instance_identifiers_slot_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 + def install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + # Send request + promise = begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers) - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) end - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Remove a site extension from a web site, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Remove a site extension from a web site, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] operation results. # - def list_instance_deployments_slot_next(next_page_link, custom_headers = nil) - response = list_instance_deployments_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def delete_site_extension_slot(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + response = delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers).value! + nil end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Remove a site extension from a web site, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Remove a site extension from a web site, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param custom_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_instance_deployments_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_instance_deployments_slot_next_async(next_page_link, custom_headers).value! + def delete_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Remove a site extension from a web site, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Remove a site extension from a web site, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] # @param [Hash{String => String}] 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_instance_deployments_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'extension_name is nil' if extension_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26265,38 +26491,29 @@ def list_instance_deployments_slot_next_async(next_page_link, custom_headers = n # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{extensionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id}, + query_params: {'siteExtensionId' => site_extension_id,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless status_code == 204 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -26305,52 +26522,72 @@ def list_instance_deployments_slot_next_async(next_page_link, custom_headers = n end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get the difference in configuration settings between two web app slots. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get the difference in configuration settings between two web app slots. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceMetricDefinitionCollection] operation results. + # @return [Array] operation results. # - def list_metric_definitions_slot_next(next_page_link, custom_headers = nil) - response = list_metric_definitions_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def list_slot_differences_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + first_page = list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_entity, slot, custom_headers) + first_page.get_all_items end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get the difference in configuration settings between two web app slots. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get the difference in configuration settings between two web app slots. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param custom_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_metric_definitions_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_metric_definitions_slot_next_async(next_page_link, custom_headers).value! + def list_slot_differences_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get the difference in configuration settings between two web app slots. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Get the difference in configuration settings between two web app slots. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param [Hash{String => String}] 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_metric_definitions_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26358,17 +26595,27 @@ def list_metric_definitions_slot_next_async(next_page_link, custom_headers = nil # Set 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_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() + request_content = @client.serialize(request_mapper, slot_swap_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -26384,7 +26631,7 @@ def list_metric_definitions_slot_next_async(next_page_link, custom_headers = nil if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SlotDifferenceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -26398,52 +26645,112 @@ def list_metric_definitions_slot_next_async(next_page_link, custom_headers = nil end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Swaps two deployment slots of an app. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Swaps two deployment slots of an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceMetricCollection] operation results. - # - def list_metrics_slot_next(next_page_link, custom_headers = nil) - response = list_metrics_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + response = swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + nil end # - # Gets performance metrics of an app (or deployment slot, if specified). + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Gets performance metrics of an app (or deployment slot, if specified). + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + def swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + # Send request + promise = begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the user. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Website Name. + # @param slot [String] Website Slot. + # @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_snapshots_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_snapshots_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the user. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Website Name. + # @param slot [String] Website Slot. # @param custom_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_metrics_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_metrics_slot_next_async(next_page_link, custom_headers).value! + def list_snapshots_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_snapshots_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Returns all Snapshots to the user. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Returns all Snapshots to the user. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Website Name. + # @param slot [String] Website Slot. # @param [Hash{String => String}] 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_metrics_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_snapshots_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26451,13 +26758,14 @@ def list_metrics_slot_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -26477,7 +26785,7 @@ def list_metrics_slot_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -26491,52 +26799,65 @@ def list_metrics_slot_next_async(next_page_link, custom_headers = nil) end # - # Gets perfmon counters for web app. + # Gets the source control configuration of an app. # - # Gets perfmon counters for web app. + # Gets the source control configuration of an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the source control configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PerfMonCounterCollection] operation results. + # @return [SiteSourceControl] operation results. # - def list_perf_mon_counters_slot_next(next_page_link, custom_headers = nil) - response = list_perf_mon_counters_slot_next_async(next_page_link, custom_headers).value! + def get_source_control_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Gets perfmon counters for web app. + # Gets the source control configuration of an app. # - # Gets perfmon counters for web app. + # Gets the source control configuration of an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the source control configuration for the production slot. # @param custom_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_perf_mon_counters_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_perf_mon_counters_slot_next_async(next_page_link, custom_headers).value! + def get_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets perfmon counters for web app. + # Gets the source control configuration of an app. # - # Gets perfmon counters for web app. + # Gets the source control configuration of an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the source control configuration for the production slot. # @param [Hash{String => String}] 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_perf_mon_counters_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def get_source_control_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26544,13 +26865,14 @@ def list_perf_mon_counters_slot_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -26570,7 +26892,7 @@ def list_perf_mon_counters_slot_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -26584,52 +26906,118 @@ def list_perf_mon_counters_slot_next_async(next_page_link, custom_headers = nil) end # - # Get the difference in configuration settings between two web app slots. + # Updates the source control configuration of an app. # - # Get the difference in configuration settings between two web app slots. + # Updates the source control configuration of an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the source control configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SlotDifferenceCollection] operation results. + # @return [SiteSourceControl] operation results. # - def list_slot_differences_slot_next(next_page_link, custom_headers = nil) - response = list_slot_differences_slot_next_async(next_page_link, custom_headers).value! + def create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers = nil) + response = create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers).value! response.body unless response.nil? end # - # Get the difference in configuration settings between two web app slots. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the source control configuration for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Get the difference in configuration settings between two web app slots. + # @return [Concurrent::Promise] promise which provides async access to http + # response. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + def create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers = nil) + # Send request + promise = begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the source control configuration of an app. + # + # Deletes the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the source control configuration for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_source_control_slot(resource_group_name, name, slot, custom_headers = nil) + response = delete_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! + nil + end + + # + # Deletes the source control configuration of an app. + # + # Deletes the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the source control configuration for the production slot. # @param custom_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_slot_differences_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_slot_differences_slot_next_async(next_page_link, custom_headers).value! + def delete_source_control_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + delete_source_control_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Get the difference in configuration settings between two web app slots. + # Deletes the source control configuration of an app. # - # Get the difference in configuration settings between two web app slots. + # Deletes the source control configuration of an app. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the source control configuration for the production slot. # @param [Hash{String => String}] 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_slot_differences_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def delete_source_control_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26637,38 +27025,29 @@ def list_slot_differences_slot_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + 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 + unless status_code == 200 || status_code == 202 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SlotDifferenceCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -26677,52 +27056,64 @@ def list_slot_differences_slot_next_async(next_page_link, custom_headers = nil) end # - # Returns all Snapshots to the user. + # Starts an app (or deployment slot, if specified). # - # Returns all Snapshots to the user. + # Starts an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will start the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SnapshotCollection] operation results. # - def list_snapshots_slot_next(next_page_link, custom_headers = nil) - response = list_snapshots_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def start_slot(resource_group_name, name, slot, custom_headers = nil) + response = start_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Returns all Snapshots to the user. + # Starts an app (or deployment slot, if specified). # - # Returns all Snapshots to the user. + # Starts an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will start the production slot. # @param custom_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_snapshots_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_snapshots_slot_next_async(next_page_link, custom_headers).value! + def start_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + start_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Returns all Snapshots to the user. + # Starts an app (or deployment slot, if specified). # - # Returns all Snapshots to the user. + # Starts an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will start the production slot. # @param [Hash{String => String}] 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_snapshots_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def start_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26730,17 +27121,18 @@ def list_snapshots_slot_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -26752,16 +27144,6 @@ def list_snapshots_slot_next_async(next_page_link, custom_headers = nil) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -26770,58 +27152,64 @@ def list_snapshots_slot_next_async(next_page_link, custom_headers = nil) end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Stops an app (or deployment slot, if specified). # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Stops an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will stop the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CsmUsageQuotaCollection] operation results. # - def list_usages_slot_next(next_page_link, custom_headers = nil) - response = list_usages_slot_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def stop_slot(resource_group_name, name, slot, custom_headers = nil) + response = stop_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Stops an app (or deployment slot, if specified). # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Stops an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will stop the production slot. # @param custom_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_usages_slot_next_with_http_info(next_page_link, custom_headers = nil) - list_usages_slot_next_async(next_page_link, custom_headers).value! + def stop_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + stop_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Stops an app (or deployment slot, if specified). # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # Stops an app (or deployment slot, if specified). # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will stop the production slot. # @param [Hash{String => String}] 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_usages_slot_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def stop_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26829,17 +27217,18 @@ def list_usages_slot_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -26851,16 +27240,6 @@ def list_usages_slot_next_async(next_page_link, custom_headers = nil) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -26869,52 +27248,64 @@ def list_usages_slot_next_async(next_page_link, custom_headers = nil) end # - # Get the difference in configuration settings between two web app slots. + # Sync web app repository. # - # Get the difference in configuration settings between two web app slots. + # Sync web app repository. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SlotDifferenceCollection] operation results. # - def list_slot_differences_from_production_next(next_page_link, custom_headers = nil) - response = list_slot_differences_from_production_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def sync_repository_slot(resource_group_name, name, slot, custom_headers = nil) + response = sync_repository_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Get the difference in configuration settings between two web app slots. + # Sync web app repository. # - # Get the difference in configuration settings between two web app slots. + # Sync web app repository. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_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_slot_differences_from_production_next_with_http_info(next_page_link, custom_headers = nil) - list_slot_differences_from_production_next_async(next_page_link, custom_headers).value! + def sync_repository_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + sync_repository_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Get the difference in configuration settings between two web app slots. + # Sync web app repository. # - # Get the difference in configuration settings between two web app slots. + # Sync web app repository. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] 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_slot_differences_from_production_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def sync_repository_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -26922,13 +27313,14 @@ def list_slot_differences_from_production_next_async(next_page_link, custom_head # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -26944,16 +27336,6 @@ def list_slot_differences_from_production_next_async(next_page_link, custom_head end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SlotDifferenceCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -26962,52 +27344,64 @@ def list_slot_differences_from_production_next_async(next_page_link, custom_head end # - # Returns all Snapshots to the user. + # Syncs function trigger metadata to the scale controller # - # Returns all Snapshots to the user. + # Syncs function trigger metadata to the scale controller # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SnapshotCollection] operation results. # - def list_snapshots_next(next_page_link, custom_headers = nil) - response = list_snapshots_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def sync_function_triggers_slot(resource_group_name, name, slot, custom_headers = nil) + response = sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Returns all Snapshots to the user. + # Syncs function trigger metadata to the scale controller # - # Returns all Snapshots to the user. + # Syncs function trigger metadata to the scale controller # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. # @param custom_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_snapshots_next_with_http_info(next_page_link, custom_headers = nil) - list_snapshots_next_async(next_page_link, custom_headers).value! + def sync_function_triggers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Returns all Snapshots to the user. + # Syncs function trigger metadata to the scale controller # - # Returns all Snapshots to the user. + # Syncs function trigger metadata to the scale controller # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. # @param [Hash{String => String}] 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_snapshots_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def sync_function_triggers_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -27015,38 +27409,29 @@ def list_snapshots_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + 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 + unless 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? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -27055,58 +27440,65 @@ def list_snapshots_next_async(next_page_link, custom_headers = nil) end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CsmUsageQuotaCollection] operation results. + # @return [Array] operation results. # - def list_usages_next(next_page_link, custom_headers = nil) - response = list_usages_next_async(next_page_link, custom_headers).value! - response.body unless response.nil? + def list_triggered_web_jobs_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_triggered_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param custom_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_usages_next_with_http_info(next_page_link, custom_headers = nil) - list_usages_next_async(next_page_link, custom_headers).value! + def list_triggered_web_jobs_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_triggered_web_jobs_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # - # @param next_page_link [String] The NextLink from the previous successful call - # to List operation. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] 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_usages_next_async(next_page_link, custom_headers = nil) - fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + def list_triggered_web_jobs_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' request_headers = {} @@ -27114,13 +27506,14 @@ def list_usages_next_async(next_page_link, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = '{nextLink}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - skip_encoding_path_params: {'nextLink' => next_page_link}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -27140,7 +27533,7 @@ def list_usages_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() + result_mapper = Azure::ARM::Web::Models::TriggeredWebJobCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -27154,231 +27547,13228 @@ def list_usages_next_async(next_page_link, custom_headers = nil) end # - # Get all apps for a subscription. + # Gets a triggered web job by its ID for an app, or a deployment slot. # - # Get all apps for a subscription. + # Gets a triggered web job by its ID for an app, or a deployment slot. # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppCollection] which provide lazy access to pages of the - # response. + # @return [TriggeredWebJob] operation results. # - 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 + def get_triggered_web_job_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = get_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! + response.body unless response.nil? end # - # Gets all web, mobile, and API apps in the specified resource group. + # Gets a triggered web job by its ID for an app, or a deployment slot. # - # Gets all web, mobile, and API apps in the specified resource group. + # Gets a triggered web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param include_slots [Boolean] Specify true to include - # deployment slots in results. The default is false, which only gives you the - # production slot of all apps. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppCollection] which provide lazy access to pages of the - # response. + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_by_resource_group_as_lazy(resource_group_name, include_slots = nil, custom_headers = nil) - response = list_by_resource_group_async(resource_group_name, include_slots, 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 + def get_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + get_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! end # - # Gets existing backups of an app. + # Gets a triggered web job by its ID for an app, or a deployment slot. # - # Gets existing backups of an app. + # Gets a triggered web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. # - # @return [BackupItemCollection] which provide lazy access to pages of the - # response. + # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_backups_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_backups_async(resource_group_name, name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_backups_next_async(next_page_link, custom_headers) + def get_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end - page + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredWebJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the configurations of an app + # Delete a triggered web job by its ID for an app, or a deployment slot. # - # List the configurations of an app + # Delete a triggered web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResourceCollection] which provide lazy access to pages of - # the response. # - def list_configurations_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_configurations_async(resource_group_name, name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_configurations_next_async(next_page_link, custom_headers) - end - page - end + def delete_triggered_web_job_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = delete_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! + nil end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Delete a triggered web job by its ID for an app, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Delete a triggered web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] which provide lazy access to pages of the - # response. + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_deployments_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_deployments_async(resource_group_name, name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_deployments_next_async(next_page_link, custom_headers) - end - page - end + def delete_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + delete_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! end # - # Lists ownership identifiers for domain associated with web app. + # Delete a triggered web job by its ID for an app, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Delete a triggered web job by its ID for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. # - # @return [IdentifierCollection] which provide lazy access to pages of the - # response. + # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_domain_ownership_identifiers_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers).value! - unless response.nil? - page = response.body - page.next_method = Proc.new do |next_page_link| - list_domain_ownership_identifiers_next_async(next_page_link, custom_headers) - end - page - end - end + def delete_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @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_triggered_web_job_history_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + first_page = list_triggered_web_job_history_slot_as_lazy(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers) + first_page.get_all_items + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param custom_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_triggered_web_job_history_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + list_triggered_web_job_history_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param [Hash{String => String}] 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_triggered_web_job_history_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredJobHistoryCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param id [String] History ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TriggeredJobHistory] operation results. + # + def get_triggered_web_job_history_slot(resource_group_name, name, web_job_id, id, slot, web_job_name, custom_headers = nil) + response = get_triggered_web_job_history_slot_async(resource_group_name, name, web_job_id, id, slot, web_job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param id [String] History ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param custom_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_triggered_web_job_history_slot_with_http_info(resource_group_name, name, web_job_id, id, slot, web_job_name, custom_headers = nil) + get_triggered_web_job_history_slot_async(resource_group_name, name, web_job_id, id, slot, web_job_name, custom_headers).value! + end + + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param id [String] History ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param [Hash{String => String}] 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_triggered_web_job_history_slot_async(resource_group_name, name, web_job_id, id, slot, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredJobHistory.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Run a triggered web job for an app, or a deployment slot. + # + # Run a triggered web job for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def run_triggered_web_job_slot(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = run_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! + nil + end + + # + # Run a triggered web job for an app, or a deployment slot. + # + # Run a triggered web job for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def run_triggered_web_job_slot_with_http_info(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + run_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! + end + + # + # Run a triggered web job for an app, or a deployment slot. + # + # Run a triggered web job for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param web_job_name [String] + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def run_triggered_web_job_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get quota information of the production slot. + # @param filter [String] Return only information specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @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_usages_slot(resource_group_name, name, slot, filter = nil, custom_headers = nil) + first_page = list_usages_slot_as_lazy(resource_group_name, name, slot, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get quota information of the production slot. + # @param filter [String] Return only information specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param custom_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_usages_slot_with_http_info(resource_group_name, name, slot, filter = nil, custom_headers = nil) + list_usages_slot_async(resource_group_name, name, slot, filter, custom_headers).value! + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get quota information of the production slot. + # @param filter [String] Return only information specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param [Hash{String => String}] 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_usages_slot_async(resource_group_name, name, slot, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/usages' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 virtual networks the app (or deployment slot) is connected to. + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get virtual network connections for the production slot. + # @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_vnet_connections_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get virtual network connections for the production slot. + # @param custom_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_vnet_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + end + + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get virtual network connections for the production slot. + # @param [Hash{String => String}] 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_vnet_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VnetInfoElementType', + type: { + name: 'Composite', + class_name: 'VnetInfo' + } + } + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the named virtual network for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetInfo] operation results. + # + def get_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers = nil) + response = get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the named virtual network for the production slot. + # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers = nil) + get_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! + end + + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the named virtual network for the production slot. + # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update connections for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetInfo] operation results. + # + def create_or_update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + response = create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update connections for the production slot. + # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + create_or_update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update connections for the production slot. + # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the connection for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_vnet_connection_slot(resource_group_name, name, vnet_name, slot, custom_headers = nil) + response = delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! + nil + end + + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the connection for the production slot. + # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, slot, custom_headers = nil) + delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers).value! + end + + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the connection for the production slot. + # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 404 + 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 + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update connections for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetInfo] operation results. + # + def update_vnet_connection_slot(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + response = update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update connections for the production slot. + # @param custom_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_vnet_connection_slot_with_http_info(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + update_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers).value! + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update connections for the production slot. + # @param [Hash{String => String}] 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_vnet_connection_slot_async(resource_group_name, name, vnet_name, connection_envelope, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an app's Virtual Network gateway. + # + # Gets an app's Virtual Network gateway. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a gateway for the production slot's Virtual Network. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetGateway] operation results. + # + def get_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers = nil) + response = get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an app's Virtual Network gateway. + # + # Gets an app's Virtual Network gateway. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a gateway for the production slot's Virtual Network. + # @param custom_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_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers = nil) + get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers).value! + end + + # + # Gets an app's Virtual Network gateway. + # + # Gets an app's Virtual Network gateway. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a gateway for the production slot's Virtual Network. + # @param [Hash{String => String}] 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_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update a gateway for the production slot's Virtual + # Network. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetGateway] operation results. + # + def create_or_update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + response = create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update a gateway for the production slot's Virtual + # Network. + # @param custom_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_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + create_or_update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update a gateway for the production slot's Virtual + # Network. + # @param [Hash{String => String}] 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_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update a gateway for the production slot's Virtual + # Network. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetGateway] operation results. + # + def update_vnet_connection_gateway_slot(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + response = update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update a gateway for the production slot's Virtual + # Network. + # @param custom_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_vnet_connection_gateway_slot_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + update_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers).value! + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will add or update a gateway for the production slot's Virtual + # Network. + # @param [Hash{String => String}] 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_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @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_web_jobs_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param custom_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_web_jobs_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_web_jobs_slot_async(resource_group_name, name, slot, custom_headers).value! + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param [Hash{String => String}] 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_web_jobs_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/webjobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webjob information for an app, or a deployment slot. + # + # Get webjob information for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_name [String] Name of the web job. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebJob] operation results. + # + def get_web_job_slot(resource_group_name, name, web_job_name, slot, custom_headers = nil) + response = get_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Get webjob information for an app, or a deployment slot. + # + # Get webjob information for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_name [String] Name of the web job. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param custom_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_web_job_slot_with_http_info(resource_group_name, name, web_job_name, slot, custom_headers = nil) + get_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers).value! + end + + # + # Get webjob information for an app, or a deployment slot. + # + # Get webjob information for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_name [String] Name of the web job. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param [Hash{String => String}] 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_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @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_slot_differences_from_production(resource_group_name, name, slot_swap_entity, custom_headers = nil) + first_page = list_slot_differences_from_production_as_lazy(resource_group_name, name, slot_swap_entity, custom_headers) + first_page.get_all_items + end + + # + # Get the difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param custom_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_slot_differences_from_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers = nil) + list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! + end + + # + # Get the difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param [Hash{String => String}] 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_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() + request_content = @client.serialize(request_mapper, slot_swap_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Web::Models::SlotDifferenceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Swaps two deployment slots of an app. + # + # Swaps two deployment slots of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers = nil) + response = swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @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 swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers = nil) + # Send request + promise = begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the user. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Website Name. + # @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_snapshots(resource_group_name, name, custom_headers = nil) + first_page = list_snapshots_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the user. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Website Name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_snapshots_with_http_info(resource_group_name, name, custom_headers = nil) + list_snapshots_async(resource_group_name, name, custom_headers).value! + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the user. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Website Name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_snapshots_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/snapshots' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 source control configuration of an app. + # + # Gets the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteSourceControl] operation results. + # + def get_source_control(resource_group_name, name, custom_headers = nil) + response = get_source_control_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the source control configuration of an app. + # + # Gets the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_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_source_control_with_http_info(resource_group_name, name, custom_headers = nil) + get_source_control_async(resource_group_name, name, custom_headers).value! + end + + # + # Gets the source control configuration of an app. + # + # Gets the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] 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_source_control_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/sourcecontrols/web' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 source control configuration of an app. + # + # Updates the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteSourceControl] operation results. + # + def create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers = nil) + response = create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @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_source_control_async(resource_group_name, name, site_source_control, custom_headers = nil) + # Send request + promise = begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the source control configuration of an app. + # + # Deletes the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_source_control(resource_group_name, name, custom_headers = nil) + response = delete_source_control_async(resource_group_name, name, custom_headers).value! + nil + end + + # + # Deletes the source control configuration of an app. + # + # Deletes the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_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_source_control_with_http_info(resource_group_name, name, custom_headers = nil) + delete_source_control_async(resource_group_name, name, custom_headers).value! + end + + # + # Deletes the source control configuration of an app. + # + # Deletes the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] 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_source_control_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/sourcecontrols/web' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Starts an app (or deployment slot, if specified). + # + # Starts an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def start(resource_group_name, name, custom_headers = nil) + response = start_async(resource_group_name, name, custom_headers).value! + nil + end + + # + # Starts an app (or deployment slot, if specified). + # + # Starts an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def start_with_http_info(resource_group_name, name, custom_headers = nil) + start_async(resource_group_name, name, custom_headers).value! + end + + # + # Starts an app (or deployment slot, if specified). + # + # Starts an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def start_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/start' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Stops an app (or deployment slot, if specified). + # + # Stops an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def stop(resource_group_name, name, custom_headers = nil) + response = stop_async(resource_group_name, name, custom_headers).value! + nil + end + + # + # Stops an app (or deployment slot, if specified). + # + # Stops an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def stop_with_http_info(resource_group_name, name, custom_headers = nil) + stop_async(resource_group_name, name, custom_headers).value! + end + + # + # Stops an app (or deployment slot, if specified). + # + # Stops an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def stop_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/stop' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Sync web app repository. + # + # Sync web app repository. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def sync_repository(resource_group_name, name, custom_headers = nil) + response = sync_repository_async(resource_group_name, name, custom_headers).value! + nil + end + + # + # Sync web app repository. + # + # Sync web app repository. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def sync_repository_with_http_info(resource_group_name, name, custom_headers = nil) + sync_repository_async(resource_group_name, name, custom_headers).value! + end + + # + # Sync web app repository. + # + # Sync web app repository. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def sync_repository_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/sync' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Syncs function trigger metadata to the scale controller + # + # Syncs function trigger metadata to the scale controller + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def sync_function_triggers(resource_group_name, name, custom_headers = nil) + response = sync_function_triggers_async(resource_group_name, name, custom_headers).value! + nil + end + + # + # Syncs function trigger metadata to the scale controller + # + # Syncs function trigger metadata to the scale controller + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def sync_function_triggers_with_http_info(resource_group_name, name, custom_headers = nil) + sync_function_triggers_async(resource_group_name, name, custom_headers).value! + end + + # + # Syncs function trigger metadata to the scale controller + # + # Syncs function trigger metadata to the scale controller + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def sync_function_triggers_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/syncfunctiontriggers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 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 triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @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_triggered_web_jobs(resource_group_name, name, custom_headers = nil) + first_page = list_triggered_web_jobs_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items + end + + # + # List triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_triggered_web_jobs_with_http_info(resource_group_name, name, custom_headers = nil) + list_triggered_web_jobs_async(resource_group_name, name, custom_headers).value! + end + + # + # List triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_triggered_web_jobs_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/triggeredwebjobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredWebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a triggered web job by its ID for an app, or a deployment slot. + # + # Gets a triggered web job by its ID for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TriggeredWebJob] operation results. + # + def get_triggered_web_job(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = get_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a triggered web job by its ID for an app, or a deployment slot. + # + # Gets a triggered web job by its ID for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param custom_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_triggered_web_job_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + get_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + end + + # + # Gets a triggered web job by its ID for an app, or a deployment slot. + # + # Gets a triggered web job by its ID for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param [Hash{String => String}] 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_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/triggeredwebjobs/{webJobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredWebJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a triggered web job by its ID for an app, or a deployment slot. + # + # Delete a triggered web job by its ID for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_triggered_web_job(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = delete_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + nil + end + + # + # Delete a triggered web job by its ID for an app, or a deployment slot. + # + # Delete a triggered web job by its ID for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param custom_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_triggered_web_job_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + delete_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + end + + # + # Delete a triggered web job by its ID for an app, or a deployment slot. + # + # Delete a triggered web job by its ID for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param [Hash{String => String}] 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_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/triggeredwebjobs/{webJobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @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_triggered_web_job_history(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + first_page = list_triggered_web_job_history_as_lazy(resource_group_name, name, web_job_id, web_job_name, custom_headers) + first_page.get_all_items + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param custom_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_triggered_web_job_history_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + list_triggered_web_job_history_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param [Hash{String => String}] 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_triggered_web_job_history_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/triggeredwebjobs/{webJobName}/history' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredJobHistoryCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param id [String] History ID. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [TriggeredJobHistory] operation results. + # + def get_triggered_web_job_history(resource_group_name, name, web_job_id, id, web_job_name, custom_headers = nil) + response = get_triggered_web_job_history_async(resource_group_name, name, web_job_id, id, web_job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param id [String] History ID. + # @param web_job_name [String] + # @param custom_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_triggered_web_job_history_with_http_info(resource_group_name, name, web_job_id, id, web_job_name, custom_headers = nil) + get_triggered_web_job_history_async(resource_group_name, name, web_job_id, id, web_job_name, custom_headers).value! + end + + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # Gets a triggered web job's history by its ID for an app, , or a deployment + # slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param id [String] History ID. + # @param web_job_name [String] + # @param [Hash{String => String}] 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_triggered_web_job_history_async(resource_group_name, name, web_job_id, id, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredJobHistory.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Run a triggered web job for an app, or a deployment slot. + # + # Run a triggered web job for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def run_triggered_web_job(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = run_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + nil + end + + # + # Run a triggered web job for an app, or a deployment slot. + # + # Run a triggered web job for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def run_triggered_web_job_with_http_info(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + run_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! + end + + # + # Run a triggered web job for an app, or a deployment slot. + # + # Run a triggered web job for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def run_triggered_web_job_async(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_id is nil' if web_job_id.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/triggeredwebjobs/{webJobName}/run' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'webJobId' => web_job_id,'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param filter [String] Return only information specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @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_usages(resource_group_name, name, filter = nil, custom_headers = nil) + first_page = list_usages_as_lazy(resource_group_name, name, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param filter [String] Return only information specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param custom_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_usages_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) + list_usages_async(resource_group_name, name, filter, custom_headers).value! + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param filter [String] Return only information specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param [Hash{String => String}] 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_usages_async(resource_group_name, name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/usages' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 virtual networks the app (or deployment slot) is connected to. + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @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_vnet_connections(resource_group_name, name, custom_headers = nil) + response = list_vnet_connections_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_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_vnet_connections_with_http_info(resource_group_name, name, custom_headers = nil) + list_vnet_connections_async(resource_group_name, name, custom_headers).value! + end + + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # Gets the virtual networks the app (or deployment slot) is connected to. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] 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_vnet_connections_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/virtualNetworkConnections' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VnetInfoElementType', + type: { + name: 'Composite', + class_name: 'VnetInfo' + } + } + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetInfo] operation results. + # + def get_vnet_connection(resource_group_name, name, vnet_name, custom_headers = nil) + response = get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) + get_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! + end + + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # Gets a virtual network the app (or deployment slot) is connected to by name. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetInfo] operation results. + # + def create_or_update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + response = create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + create_or_update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_vnet_connection(resource_group_name, name, vnet_name, custom_headers = nil) + response = delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! + nil + end + + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) + delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers).value! + end + + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # Deletes a connection from an app (or deployment slot to a named virtual + # network. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the virtual network. + # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 404 + 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 + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetInfo] operation results. + # + def update_vnet_connection(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + response = update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param custom_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_vnet_connection_with_http_info(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + update_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers).value! + end + + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # Adds a Virtual Network connection to an app or slot (PUT) or updates the + # connection properties (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of an existing Virtual Network. + # @param connection_envelope [VnetInfo] Properties of the Virtual Network + # connection. See example. + # @param [Hash{String => String}] 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_vnet_connection_async(resource_group_name, name, vnet_name, connection_envelope, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an app's Virtual Network gateway. + # + # Gets an app's Virtual Network gateway. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetGateway] operation results. + # + def get_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) + response = get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an app's Virtual Network gateway. + # + # Gets an app's Virtual Network gateway. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param custom_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_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) + get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value! + end + + # + # Gets an app's Virtual Network gateway. + # + # Gets an app's Virtual Network gateway. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param [Hash{String => String}] 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_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetGateway] operation results. + # + def create_or_update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + response = create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param custom_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_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + create_or_update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param [Hash{String => String}] 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_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetGateway] operation results. + # + def update_vnet_connection_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + response = update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param custom_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_vnet_connection_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + update_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! + end + + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param vnet_name [String] Name of the Virtual Network. + # @param gateway_name [String] Name of the gateway. Currently, the only + # supported string is "primary". + # @param connection_envelope [VnetGateway] The properties to update this + # gateway with. + # @param [Hash{String => String}] 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_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? + fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetGateway.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @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_web_jobs(resource_group_name, name, custom_headers = nil) + first_page = list_web_jobs_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_web_jobs_with_http_info(resource_group_name, name, custom_headers = nil) + list_web_jobs_async(resource_group_name, name, custom_headers).value! + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_web_jobs_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/webjobs' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webjob information for an app, or a deployment slot. + # + # Get webjob information for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_name [String] Name of the web job. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebJob] operation results. + # + def get_web_job(resource_group_name, name, web_job_name, custom_headers = nil) + response = get_web_job_async(resource_group_name, name, web_job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get webjob information for an app, or a deployment slot. + # + # Get webjob information for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_name [String] Name of the web job. + # @param custom_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_web_job_with_http_info(resource_group_name, name, web_job_name, custom_headers = nil) + get_web_job_async(resource_group_name, name, web_job_name, custom_headers).value! + end + + # + # Get webjob information for an app, or a deployment slot. + # + # Get webjob information for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param web_job_name [String] Name of the web job. + # @param [Hash{String => String}] 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_web_job_async(resource_group_name, name, web_job_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'web_job_name is nil' if web_job_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/webjobs/{webJobName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebJob.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Site] operation results. + # + def begin_create_or_update(resource_group_name, name, site_envelope, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, name, site_envelope, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, name, site_envelope, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + begin_create_or_update_async(resource_group_name, name, site_envelope, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + end + + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, name, site_envelope, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Site.mapper() + request_content = @client.serialize(request_mapper, site_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'skipDnsRegistration' => skip_dns_registration,'skipCustomDomainVerification' => skip_custom_domain_verification,'forceDnsRegistration' => force_dns_registration,'ttlInSeconds' => ttl_in_seconds,'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::Site.mapper() + result.body = @client.deserialize(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::ARM::Web::Models::Site.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RestoreResponse] operation results. + # + def begin_restore(resource_group_name, name, backup_id, request, custom_headers = nil) + response = begin_restore_async(resource_group_name, name, backup_id, request, custom_headers).value! + response.body unless response.nil? + end + + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . + # @param custom_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, name, backup_id, request, custom_headers = nil) + begin_restore_async(resource_group_name, name, backup_id, request, custom_headers).value! + end + + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . + # @param [Hash{String => String}] 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, name, backup_id, request, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? + fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/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,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Web::Models::RestoreResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [User] operation results. + # + def begin_list_publishing_credentials(resource_group_name, name, custom_headers = nil) + response = begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_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_list_publishing_credentials_with_http_info(resource_group_name, name, custom_headers = nil) + begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] 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_list_publishing_credentials_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/config/publishingcredentials/list' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Web::Models::User.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployStatus] operation results. + # + def begin_create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers = nil) + response = begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_msdeploy_operation_with_http_info(resource_group_name, name, msdeploy, custom_headers = nil) + begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers).value! + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 409 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 function for web site, or a deployment slot. + # + # Create function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param function_envelope [FunctionEnvelope] Function details. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FunctionEnvelope] operation results. + # + def begin_create_function(resource_group_name, name, function_name, function_envelope, custom_headers = nil) + response = begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # Create function for web site, or a deployment slot. + # + # Create function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param function_envelope [FunctionEnvelope] Function details. + # @param custom_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_function_with_http_info(resource_group_name, name, function_name, function_envelope, custom_headers = nil) + begin_create_function_async(resource_group_name, name, function_name, function_envelope, custom_headers).value! + end + + # + # Create function for web site, or a deployment slot. + # + # Create function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param function_envelope [FunctionEnvelope] Function details. + # @param [Hash{String => String}] 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_function_async(resource_group_name, name, function_name, function_envelope, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? + fail ArgumentError, 'function_envelope is nil' if function_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::FunctionEnvelope.mapper() + request_content = @client.serialize(request_mapper, function_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::FunctionEnvelope.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployStatus] operation results. + # + def begin_create_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + response = begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_instance_msdeploy_operation_with_http_info(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers).value! + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 409 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Restores a web app. + # + # Restores a web app. + # + # @param subscription_name [String] Azure subscription. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_options [StorageMigrationOptions] Migration + # migrationOptions. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageMigrationResponse] operation results. + # + def begin_migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) + response = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! + response.body unless response.nil? + end + + # + # Restores a web app. + # + # Restores a web app. + # + # @param subscription_name [String] Azure subscription. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_options [StorageMigrationOptions] Migration + # migrationOptions. + # @param custom_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_migrate_storage_with_http_info(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) + begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! + end + + # + # Restores a web app. + # + # Restores a web app. + # + # @param subscription_name [String] Azure subscription. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_options [StorageMigrationOptions] Migration + # migrationOptions. + # @param [Hash{String => String}] 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_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) + fail ArgumentError, 'subscription_name is nil' if subscription_name.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'migration_options is nil' if migration_options.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::StorageMigrationOptions.mapper() + request_content = @client.serialize(request_mapper, migration_options) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'subscriptionName' => subscription_name,'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::StorageMigrationResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_request_envelope [MigrateMySqlRequest] MySql migration + # options. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Operation] operation results. + # + def begin_migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers = nil) + response = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_request_envelope [MigrateMySqlRequest] MySql migration + # options. + # @param custom_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_migrate_my_sql_with_http_info(resource_group_name, name, migration_request_envelope, custom_headers = nil) + begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! + end + + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param migration_request_envelope [MigrateMySqlRequest] MySql migration + # options. + # @param [Hash{String => String}] 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_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'migration_request_envelope is nil' if migration_request_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MigrateMySqlRequest.mapper() + request_content = @client.serialize(request_mapper, migration_request_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Web::Models::Operation.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Recovers a web app to a previous snapshot. + # + # Recovers a web app to a previous snapshot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_recover(resource_group_name, name, recovery_entity, custom_headers = nil) + response = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers).value! + nil + end + + # + # Recovers a web app to a previous snapshot. + # + # Recovers a web app to a previous snapshot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots 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 begin_recover_with_http_info(resource_group_name, name, recovery_entity, custom_headers = nil) + begin_recover_async(resource_group_name, name, recovery_entity, custom_headers).value! + end + + # + # Recovers a web app to a previous snapshot. + # + # Recovers a web app to a previous snapshot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots 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 begin_recover_async(resource_group_name, name, recovery_entity, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'recovery_entity is nil' if recovery_entity.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SnapshotRecoveryRequest.mapper() + request_content = @client.serialize(request_mapper, recovery_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 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 + + # + # Install site extension on a web site, or a deployment slot. + # + # Install site extension on a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteExtensionInfo] operation results. + # + def begin_install_site_extension(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + response = begin_install_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Install site extension on a web site, or a deployment slot. + # + # Install site extension on a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] + # @param custom_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_install_site_extension_with_http_info(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + begin_install_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers).value! + end + + # + # Install site extension on a web site, or a deployment slot. + # + # Install site extension on a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param extension_name [String] + # @param [Hash{String => String}] 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_install_site_extension_async(resource_group_name, name, site_extension_id, extension_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? + fail ArgumentError, 'extension_name is nil' if extension_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/siteextensions/{extensionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id}, + query_params: {'siteExtensionId' => site_extension_id,'api-version' => 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 || status_code == 429 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param slot [String] Name of the deployment slot to create or update. By + # default, this API attempts to create or modify the production slot. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Site] operation results. + # + def begin_create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + response = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param slot [String] Name of the deployment slot to create or update. By + # default, this API attempts to create or modify the production slot. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_slot_with_http_info(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + end + + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param slot [String] Name of the deployment slot to create or update. By + # default, this API attempts to create or modify the production slot. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation. + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS. + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_envelope is nil' if site_envelope.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Site.mapper() + request_content = @client.serialize(request_mapper, site_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'skipDnsRegistration' => skip_dns_registration,'skipCustomDomainVerification' => skip_custom_domain_verification,'forceDnsRegistration' => force_dns_registration,'ttlInSeconds' => ttl_in_seconds,'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::Site.mapper() + result.body = @client.deserialize(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::ARM::Web::Models::Site.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RestoreResponse] operation results. + # + def begin_restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + response = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. + # @param custom_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_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + end + + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # Restores a specific backup to another app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request . + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. + # @param [Hash{String => String}] 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_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? + fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/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,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Web::Models::RestoreResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing credentials for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [User] operation results. + # + def begin_list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) + response = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing credentials for the production slot. + # @param custom_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_list_publishing_credentials_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing credentials for the production slot. + # @param [Hash{String => String}] 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_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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::ARM::Web::Models::User.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployStatus] operation results. + # + def begin_create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers = nil) + response = begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, msdeploy, custom_headers = nil) + begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers).value! + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 409 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 function for web site, or a deployment slot. + # + # Create function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param function_envelope [FunctionEnvelope] Function details. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FunctionEnvelope] operation results. + # + def begin_create_instance_function_slot(resource_group_name, name, function_name, slot, function_envelope, custom_headers = nil) + response = begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # Create function for web site, or a deployment slot. + # + # Create function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param function_envelope [FunctionEnvelope] Function details. + # @param custom_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_instance_function_slot_with_http_info(resource_group_name, name, function_name, slot, function_envelope, custom_headers = nil) + begin_create_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers).value! + end + + # + # Create function for web site, or a deployment slot. + # + # Create function for web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param function_name [String] Function name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param function_envelope [FunctionEnvelope] Function details. + # @param [Hash{String => String}] 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_instance_function_slot_async(resource_group_name, name, function_name, slot, function_envelope, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'function_name is nil' if function_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'function_envelope is nil' if function_envelope.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::FunctionEnvelope.mapper() + request_content = @client.serialize(request_mapper, function_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::FunctionEnvelope.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployStatus] operation results. + # + def begin_create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + response = begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_instance_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers).value! + end + + # + # Invoke the MSDeploy web app extension. + # + # Invoke the MSDeploy web app extension. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] ID of web app instance. + # @param msdeploy [MSDeploy] Details of MSDeploy 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_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 == 409 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Recovers a web app to a previous snapshot. + # + # Recovers a web app to a previous snapshot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_recover_slot(resource_group_name, name, recovery_entity, slot, custom_headers = nil) + response = begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers).value! + nil + end + + # + # Recovers a web app to a previous snapshot. + # + # Recovers a web app to a previous snapshot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param custom_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_recover_slot_with_http_info(resource_group_name, name, recovery_entity, slot, custom_headers = nil) + begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers).value! + end + + # + # Recovers a web app to a previous snapshot. + # + # Recovers a web app to a previous snapshot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param [Hash{String => String}] 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_recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'recovery_entity is nil' if recovery_entity.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SnapshotRecoveryRequest.mapper() + request_content = @client.serialize(request_mapper, recovery_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => 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 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 + + # + # Install site extension on a web site, or a deployment slot. + # + # Install site extension on a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteExtensionInfo] operation results. + # + def begin_install_site_extension_slot(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + response = begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Install site extension on a web site, or a deployment slot. + # + # Install site extension on a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] + # @param custom_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_install_site_extension_slot_with_http_info(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + begin_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers).value! + end + + # + # Install site extension on a web site, or a deployment slot. + # + # Install site extension on a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param site_extension_id [String] Site extension name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param extension_name [String] + # @param [Hash{String => String}] 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_install_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, extension_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'extension_name is nil' if extension_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_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.Web/sites/{name}/slots/{slot}/siteextensions/{extensionName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id}, + query_params: {'siteExtensionId' => site_extension_id,'api-version' => 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 || status_code == 429 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfo.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Swaps two deployment slots of an app. + # + # Swaps two deployment slots of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_swap_slot_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + response = begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + nil + end + + # + # Swaps two deployment slots of an app. + # + # Swaps two deployment slots of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. + # @param custom_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_swap_slot_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + begin_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + end + + # + # Swaps two deployment slots of an app. + # + # Swaps two deployment slots of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. + # @param [Hash{String => String}] 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_swap_slot_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() + request_content = @client.serialize(request_mapper, slot_swap_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates the source control configuration of an app. + # + # Updates the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the source control configuration for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteSourceControl] operation results. + # + def begin_create_or_update_source_control_slot(resource_group_name, name, site_source_control, slot, custom_headers = nil) + response = begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the source control configuration of an app. + # + # Updates the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the source control configuration for the production slot. + # @param custom_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_source_control_slot_with_http_info(resource_group_name, name, site_source_control, slot, custom_headers = nil) + begin_create_or_update_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers).value! + end + + # + # Updates the source control configuration of an app. + # + # Updates the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the source control configuration for the production slot. + # @param [Hash{String => String}] 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_source_control_slot_async(resource_group_name, name, site_source_control, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + request_content = @client.serialize(request_mapper, site_source_control) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Swaps two deployment slots of an app. + # + # Swaps two deployment slots of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_swap_slot_with_production(resource_group_name, name, slot_swap_entity, custom_headers = nil) + response = begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! + nil + end + + # + # Swaps two deployment slots of an app. + # + # Swaps two deployment slots of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param custom_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_swap_slot_with_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers = nil) + begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! + end + + # + # Swaps two deployment slots of an app. + # + # Swaps two deployment slots of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param [Hash{String => String}] 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_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() + request_content = @client.serialize(request_mapper, slot_swap_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates the source control configuration of an app. + # + # Updates the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteSourceControl] operation results. + # + def begin_create_or_update_source_control(resource_group_name, name, site_source_control, custom_headers = nil) + response = begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the source control configuration of an app. + # + # Updates the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param custom_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_source_control_with_http_info(resource_group_name, name, site_source_control, custom_headers = nil) + begin_create_or_update_source_control_async(resource_group_name, name, site_source_control, custom_headers).value! + end + + # + # Updates the source control configuration of an app. + # + # Updates the source control configuration of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param site_source_control [SiteSourceControl] JSON representation of a + # SiteSourceControl object. See example. + # @param [Hash{String => String}] 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_source_control_async(resource_group_name, name, site_source_control, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_source_control is nil' if site_source_control.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + request_content = @client.serialize(request_mapper, site_source_control) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteSourceControl.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all apps for a subscription. + # + # Get all apps for a 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 [WebAppCollection] 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 + + # + # Get all apps for a subscription. + # + # Get all apps for a 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 + + # + # Get all apps for a subscription. + # + # Get all apps for a 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::ARM::Web::Models::WebAppCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all web, mobile, and API apps in the specified resource group. + # + # Gets all web, mobile, and API apps in the specified 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 [WebAppCollection] operation results. + # + def list_by_resource_group_next(next_page_link, custom_headers = nil) + response = list_by_resource_group_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all web, mobile, and API apps in the specified resource group. + # + # Gets all web, mobile, and API apps in the specified resource group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) + list_by_resource_group_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all web, mobile, and API apps in the specified resource group. + # + # Gets all web, mobile, and API apps in the specified 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::ARM::Web::Models::WebAppCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 existing backups of an app. + # + # Gets existing backups of an app. + # + # @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 [BackupItemCollection] operation results. + # + def list_backups_next(next_page_link, custom_headers = nil) + response = list_backups_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets existing backups of an app. + # + # Gets existing backups of an app. + # + # @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_backups_next_with_http_info(next_page_link, custom_headers = nil) + list_backups_next_async(next_page_link, custom_headers).value! + end + + # + # Gets existing backups of an app. + # + # Gets existing backups of an app. + # + # @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_backups_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the configurations of an app + # + # List the configurations of an app + # + # @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 [SiteConfigResourceCollection] operation results. + # + def list_configurations_next(next_page_link, custom_headers = nil) + response = list_configurations_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the configurations of an app + # + # List the configurations of an app + # + # @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_configurations_next_with_http_info(next_page_link, custom_headers = nil) + list_configurations_next_async(next_page_link, custom_headers).value! + end + + # + # List the configurations of an app + # + # List the configurations of an app + # + # @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_configurations_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @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 [ContinuousWebJobCollection] operation results. + # + def list_continuous_web_jobs_next(next_page_link, custom_headers = nil) + response = list_continuous_web_jobs_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @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_continuous_web_jobs_next_with_http_info(next_page_link, custom_headers = nil) + list_continuous_web_jobs_next_async(next_page_link, custom_headers).value! + end + + # + # List continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @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_continuous_web_jobs_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ContinuousWebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @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 [DeploymentCollection] operation results. + # + def list_deployments_next(next_page_link, custom_headers = nil) + response = list_deployments_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @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_deployments_next_with_http_info(next_page_link, custom_headers = nil) + list_deployments_next_async(next_page_link, custom_headers).value! + end + + # + # List deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @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_deployments_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @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 [IdentifierCollection] operation results. + # + def list_domain_ownership_identifiers_next(next_page_link, custom_headers = nil) + response = list_domain_ownership_identifiers_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @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_domain_ownership_identifiers_next_with_http_info(next_page_link, custom_headers = nil) + list_domain_ownership_identifiers_next_async(next_page_link, custom_headers).value! + end + + # + # Lists ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @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_domain_ownership_identifiers_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @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 [FunctionEnvelopeCollection] operation results. + # + def list_functions_next(next_page_link, custom_headers = nil) + response = list_functions_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @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_functions_next_with_http_info(next_page_link, custom_headers = nil) + list_functions_next_async(next_page_link, custom_headers).value! + end + + # + # List the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @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_functions_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::FunctionEnvelopeCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @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 [HostNameBindingCollection] operation results. + # + def list_host_name_bindings_next(next_page_link, custom_headers = nil) + response = list_host_name_bindings_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @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_host_name_bindings_next_with_http_info(next_page_link, custom_headers = nil) + list_host_name_bindings_next_async(next_page_link, custom_headers).value! + end + + # + # Get hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @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_host_name_bindings_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @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 [WebAppInstanceCollection] operation results. + # + def list_instance_identifiers_next(next_page_link, custom_headers = nil) + response = list_instance_identifiers_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @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_instance_identifiers_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_identifiers_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @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_instance_identifiers_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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 [ProcessInfoCollection] operation results. + # + def list_instance_processes_next(next_page_link, custom_headers = nil) + response = list_instance_processes_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_instance_processes_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_processes_next_async(next_page_link, custom_headers).value! + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_instance_processes_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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 [ProcessModuleInfoCollection] operation results. + # + def list_instance_process_modules_next(next_page_link, custom_headers = nil) + response = list_instance_process_modules_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_instance_process_modules_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_process_modules_next_async(next_page_link, custom_headers).value! + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_instance_process_modules_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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 [ProcessThreadInfoCollection] operation results. + # + def list_instance_process_threads_next(next_page_link, custom_headers = nil) + response = list_instance_process_threads_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_instance_process_threads_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_process_threads_next_async(next_page_link, custom_headers).value! + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_instance_process_threads_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # @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 [ResourceMetricDefinitionCollection] operation results. + # + def list_metric_definitions_next(next_page_link, custom_headers = nil) + response = list_metric_definitions_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # @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_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil) + list_metric_definitions_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # @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_metric_definitions_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @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 [ResourceMetricCollection] operation results. + # + def list_metrics_next(next_page_link, custom_headers = nil) + response = list_metrics_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @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_metrics_next_with_http_info(next_page_link, custom_headers = nil) + list_metrics_next_async(next_page_link, custom_headers).value! + end + + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @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_metrics_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @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 [PerfMonCounterCollection] operation results. + # + def list_perf_mon_counters_next(next_page_link, custom_headers = nil) + response = list_perf_mon_counters_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @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_perf_mon_counters_next_with_http_info(next_page_link, custom_headers = nil) + list_perf_mon_counters_next_async(next_page_link, custom_headers).value! + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @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_perf_mon_counters_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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 [ProcessInfoCollection] operation results. + # + def list_processes_next(next_page_link, custom_headers = nil) + response = list_processes_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_processes_next_with_http_info(next_page_link, custom_headers = nil) + list_processes_next_async(next_page_link, custom_headers).value! + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_processes_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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 [ProcessModuleInfoCollection] operation results. + # + def list_process_modules_next(next_page_link, custom_headers = nil) + response = list_process_modules_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_process_modules_next_with_http_info(next_page_link, custom_headers = nil) + list_process_modules_next_async(next_page_link, custom_headers).value! + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_process_modules_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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 [ProcessThreadInfoCollection] operation results. + # + def list_process_threads_next(next_page_link, custom_headers = nil) + response = list_process_threads_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_process_threads_next_with_http_info(next_page_link, custom_headers = nil) + list_process_threads_next_async(next_page_link, custom_headers).value! + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_process_threads_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @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 [PublicCertificateCollection] operation results. + # + def list_public_certificates_next(next_page_link, custom_headers = nil) + response = list_public_certificates_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @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_public_certificates_next_with_http_info(next_page_link, custom_headers = nil) + list_public_certificates_next_async(next_page_link, custom_headers).value! + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @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_public_certificates_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of siteextensions for a web site, or a deployment slot. + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # @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 [SiteExtensionInfoCollection] operation results. + # + def list_site_extensions_next(next_page_link, custom_headers = nil) + response = list_site_extensions_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # @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_site_extensions_next_with_http_info(next_page_link, custom_headers = nil) + list_site_extensions_next_async(next_page_link, custom_headers).value! + end + + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # @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_site_extensions_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 an app's deployment slots. + # + # Gets an app's deployment slots. + # + # @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 [WebAppCollection] operation results. + # + def list_slots_next(next_page_link, custom_headers = nil) + response = list_slots_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets an app's deployment slots. + # + # Gets an app's deployment slots. + # + # @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_slots_next_with_http_info(next_page_link, custom_headers = nil) + list_slots_next_async(next_page_link, custom_headers).value! + end + + # + # Gets an app's deployment slots. + # + # Gets an app's deployment slots. + # + # @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_slots_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 existing backups of an app. + # + # Gets existing backups of an app. + # + # @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 [BackupItemCollection] operation results. + # + def list_backups_slot_next(next_page_link, custom_headers = nil) + response = list_backups_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets existing backups of an app. + # + # Gets existing backups of an app. + # + # @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_backups_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_backups_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Gets existing backups of an app. + # + # Gets existing backups of an app. + # + # @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_backups_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the configurations of an app + # + # List the configurations of an app + # + # @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 [SiteConfigResourceCollection] operation results. + # + def list_configurations_slot_next(next_page_link, custom_headers = nil) + response = list_configurations_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the configurations of an app + # + # List the configurations of an app + # + # @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_configurations_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_configurations_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List the configurations of an app + # + # List the configurations of an app + # + # @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_configurations_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @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 [ContinuousWebJobCollection] operation results. + # + def list_continuous_web_jobs_slot_next(next_page_link, custom_headers = nil) + response = list_continuous_web_jobs_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @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_continuous_web_jobs_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_continuous_web_jobs_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @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_continuous_web_jobs_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ContinuousWebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @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 [DeploymentCollection] operation results. + # + def list_deployments_slot_next(next_page_link, custom_headers = nil) + response = list_deployments_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @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_deployments_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_deployments_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @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_deployments_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @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 [IdentifierCollection] operation results. + # + def list_domain_ownership_identifiers_slot_next(next_page_link, custom_headers = nil) + response = list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Lists ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @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_domain_ownership_identifiers_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Lists ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @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_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @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 [FunctionEnvelopeCollection] operation results. + # + def list_instance_functions_slot_next(next_page_link, custom_headers = nil) + response = list_instance_functions_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @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_instance_functions_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_functions_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @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_instance_functions_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::FunctionEnvelopeCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @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 [HostNameBindingCollection] operation results. + # + def list_host_name_bindings_slot_next(next_page_link, custom_headers = nil) + response = list_host_name_bindings_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @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_host_name_bindings_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_host_name_bindings_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Get hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @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_host_name_bindings_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @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 [WebAppInstanceCollection] operation results. + # + def list_instance_identifiers_slot_next(next_page_link, custom_headers = nil) + response = list_instance_identifiers_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @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_instance_identifiers_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_identifiers_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @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_instance_identifiers_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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 [ProcessInfoCollection] operation results. + # + def list_instance_processes_slot_next(next_page_link, custom_headers = nil) + response = list_instance_processes_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_instance_processes_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_processes_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_instance_processes_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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 [ProcessModuleInfoCollection] operation results. + # + def list_instance_process_modules_slot_next(next_page_link, custom_headers = nil) + response = list_instance_process_modules_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_instance_process_modules_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_process_modules_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_instance_process_modules_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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 [ProcessThreadInfoCollection] operation results. + # + def list_instance_process_threads_slot_next(next_page_link, custom_headers = nil) + response = list_instance_process_threads_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_instance_process_threads_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_instance_process_threads_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_instance_process_threads_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # @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 [ResourceMetricDefinitionCollection] operation results. + # + def list_metric_definitions_slot_next(next_page_link, custom_headers = nil) + response = list_metric_definitions_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # @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_metric_definitions_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_metric_definitions_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # @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_metric_definitions_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @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 [ResourceMetricCollection] operation results. + # + def list_metrics_slot_next(next_page_link, custom_headers = nil) + response = list_metrics_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @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_metrics_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_metrics_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @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_metrics_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @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 [PerfMonCounterCollection] operation results. + # + def list_perf_mon_counters_slot_next(next_page_link, custom_headers = nil) + response = list_perf_mon_counters_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @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_perf_mon_counters_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_perf_mon_counters_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @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_perf_mon_counters_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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 [ProcessInfoCollection] operation results. + # + def list_processes_slot_next(next_page_link, custom_headers = nil) + response = list_processes_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_processes_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_processes_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @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_processes_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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 [ProcessModuleInfoCollection] operation results. + # + def list_process_modules_slot_next(next_page_link, custom_headers = nil) + response = list_process_modules_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_process_modules_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_process_modules_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @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_process_modules_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessModuleInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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 [ProcessThreadInfoCollection] operation results. + # + def list_process_threads_slot_next(next_page_link, custom_headers = nil) + response = list_process_threads_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_process_threads_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_process_threads_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @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_process_threads_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ProcessThreadInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @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 [PublicCertificateCollection] operation results. + # + def list_public_certificates_slot_next(next_page_link, custom_headers = nil) + response = list_public_certificates_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @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_public_certificates_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_public_certificates_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @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_public_certificates_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 list of siteextensions for a web site, or a deployment slot. + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # @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 [SiteExtensionInfoCollection] operation results. + # + def list_site_extensions_slot_next(next_page_link, custom_headers = nil) + response = list_site_extensions_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # @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_site_extensions_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_site_extensions_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # @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_site_extensions_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteExtensionInfoCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @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 [SlotDifferenceCollection] operation results. + # + def list_slot_differences_slot_next(next_page_link, custom_headers = nil) + response = list_slot_differences_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @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_slot_differences_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_slot_differences_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Get the difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @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_slot_differences_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SlotDifferenceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all Snapshots to the user. + # + # Returns all Snapshots to the 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 [SnapshotCollection] operation results. + # + def list_snapshots_slot_next(next_page_link, custom_headers = nil) + response = list_snapshots_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the 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_snapshots_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_snapshots_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the 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_snapshots_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @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 [TriggeredWebJobCollection] operation results. + # + def list_triggered_web_jobs_slot_next(next_page_link, custom_headers = nil) + response = list_triggered_web_jobs_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @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_triggered_web_jobs_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_triggered_web_jobs_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @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_triggered_web_jobs_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredWebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @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 [TriggeredJobHistoryCollection] operation results. + # + def list_triggered_web_job_history_slot_next(next_page_link, custom_headers = nil) + response = list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @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_triggered_web_job_history_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @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_triggered_web_job_history_slot_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredJobHistoryCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @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 [CsmUsageQuotaCollection] operation results. + # + def list_usages_slot_next(next_page_link, custom_headers = nil) + response = list_usages_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @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_usages_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_usages_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @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_usages_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @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 [WebJobCollection] operation results. + # + def list_web_jobs_slot_next(next_page_link, custom_headers = nil) + response = list_web_jobs_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @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_web_jobs_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_web_jobs_slot_next_async(next_page_link, custom_headers).value! + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @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_web_jobs_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @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 [SlotDifferenceCollection] operation results. + # + def list_slot_differences_from_production_next(next_page_link, custom_headers = nil) + response = list_slot_differences_from_production_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @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_slot_differences_from_production_next_with_http_info(next_page_link, custom_headers = nil) + list_slot_differences_from_production_next_async(next_page_link, custom_headers).value! + end + + # + # Get the difference in configuration settings between two web app slots. + # + # Get the difference in configuration settings between two web app slots. + # + # @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_slot_differences_from_production_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SlotDifferenceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all Snapshots to the user. + # + # Returns all Snapshots to the 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 [SnapshotCollection] operation results. + # + def list_snapshots_next(next_page_link, custom_headers = nil) + response = list_snapshots_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the 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_snapshots_next_with_http_info(next_page_link, custom_headers = nil) + list_snapshots_next_async(next_page_link, custom_headers).value! + end + + # + # Returns all Snapshots to the user. + # + # Returns all Snapshots to the 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_snapshots_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SnapshotCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @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 [TriggeredWebJobCollection] operation results. + # + def list_triggered_web_jobs_next(next_page_link, custom_headers = nil) + response = list_triggered_web_jobs_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @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_triggered_web_jobs_next_with_http_info(next_page_link, custom_headers = nil) + list_triggered_web_jobs_next_async(next_page_link, custom_headers).value! + end + + # + # List triggered web jobs for an app, or a deployment slot. + # + # List triggered web jobs for an app, or a deployment slot. + # + # @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_triggered_web_jobs_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredWebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @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 [TriggeredJobHistoryCollection] operation results. + # + def list_triggered_web_job_history_next(next_page_link, custom_headers = nil) + response = list_triggered_web_job_history_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @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_triggered_web_job_history_next_with_http_info(next_page_link, custom_headers = nil) + list_triggered_web_job_history_next_async(next_page_link, custom_headers).value! + end + + # + # List a triggered web job's history for an app, or a deployment slot. + # + # List a triggered web job's history for an app, or a deployment slot. + # + # @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_triggered_web_job_history_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 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::TriggeredJobHistoryCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @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 [CsmUsageQuotaCollection] operation results. + # + def list_usages_next(next_page_link, custom_headers = nil) + response = list_usages_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @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_usages_next_with_http_info(next_page_link, custom_headers = nil) + list_usages_next_async(next_page_link, custom_headers).value! + end + + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # Gets the quota usage information of an app (or deployment slot, if + # specified). + # + # @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_usages_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @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 [WebJobCollection] operation results. + # + def list_web_jobs_next(next_page_link, custom_headers = nil) + response = list_web_jobs_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @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_web_jobs_next_with_http_info(next_page_link, custom_headers = nil) + list_web_jobs_next_async(next_page_link, custom_headers).value! + end + + # + # List webjobs for an app, or a deployment slot. + # + # List webjobs for an app, or a deployment slot. + # + # @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_web_jobs_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::WebJobCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 all apps for a subscription. + # + # Get all apps for a subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebAppCollection] which provide lazy access to pages of the + # response. + # + def list_as_lazy(custom_headers = nil) + response = list_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all web, mobile, and API apps in the specified resource group. + # + # Gets all web, mobile, and API apps in the specified resource group. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param include_slots [Boolean] Specify true to include + # deployment slots in results. The default is false, which only gives you the + # production slot of all apps. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebAppCollection] which provide lazy access to pages of the + # response. + # + def list_by_resource_group_as_lazy(resource_group_name, include_slots = nil, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, include_slots, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_by_resource_group_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets existing backups of an app. + # + # Gets existing backups of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupItemCollection] which provide lazy access to pages of the + # response. + # + def list_backups_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_backups_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_backups_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List the configurations of an app + # + # List the configurations of an app + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteConfigResourceCollection] which provide lazy access to pages of + # the response. + # + def list_configurations_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_configurations_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_configurations_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ContinuousWebJobCollection] which provide lazy access to pages of + # the response. + # + def list_continuous_web_jobs_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_continuous_web_jobs_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_continuous_web_jobs_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DeploymentCollection] which provide lazy access to pages of the + # response. + # + def list_deployments_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_deployments_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_deployments_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IdentifierCollection] which provide lazy access to pages of the + # response. + # + def list_domain_ownership_identifiers_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_domain_ownership_identifiers_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_domain_ownership_identifiers_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FunctionEnvelopeCollection] which provide lazy access to pages of + # the response. + # + def list_functions_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_functions_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_functions_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Get hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HostNameBindingCollection] which provide lazy access to pages of the + # response. + # + def list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_host_name_bindings_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_host_name_bindings_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebAppInstanceCollection] which provide lazy access to pages of the + # response. + # + def list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_instance_identifiers_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_instance_identifiers_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProcessInfoCollection] which provide lazy access to pages of the + # response. + # + def list_instance_processes_as_lazy(resource_group_name, name, instance_id, custom_headers = nil) + response = list_instance_processes_async(resource_group_name, name, instance_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_instance_processes_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProcessModuleInfoCollection] which provide lazy access to pages of + # the response. + # + def list_instance_process_modules_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers = nil) + response = list_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_instance_process_modules_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProcessThreadInfoCollection] which provide lazy access to pages of + # the response. + # + def list_instance_process_threads_as_lazy(resource_group_name, name, process_id, instance_id, custom_headers = nil) + response = list_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_instance_process_threads_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # Gets all metric definitions of an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceMetricDefinitionCollection] which provide lazy access to + # pages of the response. + # + def list_metric_definitions_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_metric_definitions_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_metric_definitions_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ResourceMetricCollection] which provide lazy access to pages of the + # response. + # + def list_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + response = list_metrics_async(resource_group_name, name, details, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_metrics_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PerfMonCounterCollection] which provide lazy access to pages of the + # response. + # + def list_perf_mon_counters_as_lazy(resource_group_name, name, filter = nil, custom_headers = nil) + response = list_perf_mon_counters_async(resource_group_name, name, filter, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_perf_mon_counters_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProcessInfoCollection] which provide lazy access to pages of the + # response. + # + def list_processes_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_processes_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_processes_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProcessModuleInfoCollection] which provide lazy access to pages of + # the response. + # + def list_process_modules_as_lazy(resource_group_name, name, process_id, custom_headers = nil) + response = list_process_modules_async(resource_group_name, name, process_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_process_modules_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ProcessThreadInfoCollection] which provide lazy access to pages of + # the response. + # + def list_process_threads_as_lazy(resource_group_name, name, process_id, custom_headers = nil) + response = list_process_threads_async(resource_group_name, name, process_id, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_process_threads_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicCertificateCollection] which provide lazy access to pages of + # the response. + # + def list_public_certificates_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_public_certificates_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_public_certificates_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # Get list of siteextensions for a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteExtensionInfoCollection] which provide lazy access to pages of + # the response. + # + def list_site_extensions_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_site_extensions_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_site_extensions_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets an app's deployment slots. + # + # Gets an app's deployment slots. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebAppCollection] which provide lazy access to pages of the + # response. + # + def list_slots_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_slots_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_slots_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets existing backups of an app. + # + # Gets existing backups of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get backups of the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackupItemCollection] which provide lazy access to pages of the + # response. + # + def list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_backups_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_backups_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List the configurations of an app + # + # List the configurations of an app + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SiteConfigResourceCollection] which provide lazy access to pages of + # the response. + # + def list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_configurations_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_configurations_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List continuous web jobs for an app, or a deployment slot. + # + # List continuous web jobs for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ContinuousWebJobCollection] which provide lazy access to pages of + # the response. + # + def list_continuous_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_continuous_web_jobs_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_continuous_web_jobs_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List deployments for an app, or a deployment slot. + # + # List deployments for an app, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [DeploymentCollection] which provide lazy access to pages of the + # response. + # + def list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_deployments_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_deployments_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists ownership identifiers for domain associated with web app. + # + # Lists ownership identifiers for domain associated with web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the binding for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [IdentifierCollection] which provide lazy access to pages of the + # response. + # + def list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # List the functions for a web site, or a deployment slot. + # + # List the functions for a web site, or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API deletes a deployment for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FunctionEnvelopeCollection] which provide lazy access to pages of + # the response. + # + def list_instance_functions_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_instance_functions_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_instance_functions_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Get hostname bindings for an app or a deployment slot. + # + # Get hostname bindings for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets hostname bindings for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [HostNameBindingCollection] which provide lazy access to pages of the + # response. + # + def list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_host_name_bindings_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all scale-out instances of an app. + # + # Gets all scale-out instances of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets the production slot instances. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [WebAppInstanceCollection] which provide lazy access to pages of the + # response. + # + def list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_instance_identifiers_slot_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Get hostname bindings for an app or a deployment slot. - # - # Get hostname bindings for an app or a deployment slot. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBindingCollection] which provide lazy access to pages of the + # @return [ProcessInfoCollection] which provide lazy access to pages of the # response. # - def list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_host_name_bindings_async(resource_group_name, name, custom_headers).value! + def list_instance_processes_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers = nil) + response = list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_host_name_bindings_next_async(next_page_link, custom_headers) + list_instance_processes_slot_next_async(next_page_link, custom_headers) end page end end # - # Gets all scale-out instances of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Gets all scale-out instances of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppInstanceCollection] which provide lazy access to pages of the - # response. + # @return [ProcessModuleInfoCollection] which provide lazy access to pages of + # the response. # - def list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_instance_identifiers_async(resource_group_name, name, custom_headers).value! + def list_instance_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + response = list_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_instance_identifiers_next_async(next_page_link, custom_headers) + list_instance_process_modules_slot_next_async(next_page_link, custom_headers) end page end end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Site name. + # @param process_id [String] PID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] which provide lazy access to pages of the - # response. + # @return [ProcessThreadInfoCollection] which provide lazy access to pages of + # the response. # - def list_instance_deployments_as_lazy(resource_group_name, name, instance_id, custom_headers = nil) - response = list_instance_deployments_async(resource_group_name, name, instance_id, custom_headers).value! + def list_instance_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, instance_id, custom_headers = nil) + response = list_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_instance_deployments_next_async(next_page_link, custom_headers) + list_instance_process_threads_slot_next_async(next_page_link, custom_headers) end page end @@ -27392,18 +40782,20 @@ def list_instance_deployments_as_lazy(resource_group_name, name, instance_id, cu # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metric definitions of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [ResourceMetricDefinitionCollection] which provide lazy access to # pages of the response. # - def list_metric_definitions_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_metric_definitions_async(resource_group_name, name, custom_headers).value! + def list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_metric_definitions_next_async(next_page_link, custom_headers) + list_metric_definitions_slot_next_async(next_page_link, custom_headers) end page end @@ -27417,6 +40809,8 @@ def list_metric_definitions_as_lazy(resource_group_name, name, custom_headers = # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get metrics of the production slot. # @param details [Boolean] Specify "true" to include metric details in the # response. It is "false" by default. # @param filter [String] Return only metrics specified in the filter (using @@ -27429,12 +40823,12 @@ def list_metric_definitions_as_lazy(resource_group_name, name, custom_headers = # @return [ResourceMetricCollection] which provide lazy access to pages of the # response. # - def list_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) - response = list_metrics_async(resource_group_name, name, details, filter, custom_headers).value! + def list_metrics_slot_as_lazy(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) + response = list_metrics_slot_async(resource_group_name, name, slot, details, filter, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_metrics_next_async(next_page_link, custom_headers) + list_metrics_slot_next_async(next_page_link, custom_headers) end page end @@ -27447,7 +40841,9 @@ def list_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of web app. + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param filter [String] Return only usages/metrics specified in the filter. # Filter conforms to odata syntax. Example: $filter=(startTime eq # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq @@ -27458,324 +40854,326 @@ def list_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, # @return [PerfMonCounterCollection] which provide lazy access to pages of the # response. # - def list_perf_mon_counters_as_lazy(resource_group_name, name, filter = nil, custom_headers = nil) - response = list_perf_mon_counters_async(resource_group_name, name, filter, custom_headers).value! + def list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter = nil, custom_headers = nil) + response = list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_perf_mon_counters_next_async(next_page_link, custom_headers) + list_perf_mon_counters_slot_next_async(next_page_link, custom_headers) end page end end # - # Gets an app's deployment slots. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # - # Gets an app's deployment slots. + # Get list of processes for a web site, or a deployment slot, or for a specific + # scaled-out instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppCollection] which provide lazy access to pages of the + # @return [ProcessInfoCollection] which provide lazy access to pages of the # response. # - def list_slots_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_slots_async(resource_group_name, name, custom_headers).value! + def list_processes_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_processes_slot_async(resource_group_name, name, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_slots_next_async(next_page_link, custom_headers) + list_processes_slot_next_async(next_page_link, custom_headers) end page end end # - # Gets existing backups of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # - # Gets existing backups of an app. + # List module information for a process by its ID for a specific scaled-out + # instance in a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param process_id [String] PID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get backups of the production slot. + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItemCollection] which provide lazy access to pages of the - # response. + # @return [ProcessModuleInfoCollection] which provide lazy access to pages of + # the response. # - def list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_backups_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_process_modules_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers = nil) + response = list_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_backups_slot_next_async(next_page_link, custom_headers) + list_process_modules_slot_next_async(next_page_link, custom_headers) end page end end # - # List the configurations of an app + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # - # List the configurations of an app + # List the threads in a process by its ID for a specific scaled-out instance in + # a web site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param process_id [String] PID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResourceCollection] which provide lazy access to pages of + # @return [ProcessThreadInfoCollection] which provide lazy access to pages of # the response. # - def list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_configurations_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_process_threads_slot_as_lazy(resource_group_name, name, process_id, slot, custom_headers = nil) + response = list_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_configurations_slot_next_async(next_page_link, custom_headers) + list_process_threads_slot_next_async(next_page_link, custom_headers) end page end end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get public certificates for an app or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Get public certificates for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. + # the API gets hostname bindings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] which provide lazy access to pages of the - # response. + # @return [PublicCertificateCollection] which provide lazy access to pages of + # the response. # - def list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_deployments_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_public_certificates_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_deployments_slot_next_async(next_page_link, custom_headers) + list_public_certificates_slot_next_async(next_page_link, custom_headers) end page end end # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # - # Lists ownership identifiers for domain associated with web app. + # Get list of siteextensions for a web site, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [IdentifierCollection] which provide lazy access to pages of the - # response. + # @return [SiteExtensionInfoCollection] which provide lazy access to pages of + # the response. # - def list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_site_extensions_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_site_extensions_slot_async(resource_group_name, name, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_domain_ownership_identifiers_slot_next_async(next_page_link, custom_headers) + list_site_extensions_slot_next_async(next_page_link, custom_headers) end page end end # - # Get hostname bindings for an app or a deployment slot. + # Get the difference in configuration settings between two web app slots. # - # Get hostname bindings for an app or a deployment slot. + # Get the difference in configuration settings between two web app slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets hostname bindings for the production slot. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBindingCollection] which provide lazy access to pages of the + # @return [SlotDifferenceCollection] which provide lazy access to pages of the # response. # - def list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + response = list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_host_name_bindings_slot_next_async(next_page_link, custom_headers) + list_slot_differences_slot_next_async(next_page_link, custom_headers) end page end end # - # Gets all scale-out instances of an app. + # Returns all Snapshots to the user. # - # Gets all scale-out instances of an app. + # Returns all Snapshots to the user. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets the production slot instances. + # @param name [String] Website Name. + # @param slot [String] Website Slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [WebAppInstanceCollection] which provide lazy access to pages of the + # @return [SnapshotCollection] which provide lazy access to pages of the # response. # - def list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_snapshots_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_snapshots_slot_async(resource_group_name, name, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_instance_identifiers_slot_next_async(next_page_link, custom_headers) + list_snapshots_slot_next_async(next_page_link, custom_headers) end page end end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List triggered web jobs for an app, or a deployment slot. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # List triggered web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [DeploymentCollection] which provide lazy access to pages of the + # @return [TriggeredWebJobCollection] which provide lazy access to pages of the # response. # - def list_instance_deployments_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers = nil) - response = list_instance_deployments_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! + def list_triggered_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_triggered_web_jobs_slot_async(resource_group_name, name, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_instance_deployments_slot_next_async(next_page_link, custom_headers) + list_triggered_web_jobs_slot_next_async(next_page_link, custom_headers) end page end end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # List a triggered web job's history for an app, or a deployment slot. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # List a triggered web job's history for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metric definitions of the production slot. + # the API deletes a deployment for the production slot. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceMetricDefinitionCollection] which provide lazy access to - # pages of the response. + # @return [TriggeredJobHistoryCollection] which provide lazy access to pages of + # the response. # - def list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_triggered_web_job_history_slot_as_lazy(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers = nil) + response = list_triggered_web_job_history_slot_async(resource_group_name, name, web_job_id, slot, web_job_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_metric_definitions_slot_next_async(next_page_link, custom_headers) + list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers) end page end end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets the quota usage information of an app (or deployment slot, if + # specified). # - # Gets performance metrics of an app (or deployment slot, if specified). + # Gets the quota usage information of an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metrics of the production slot. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using + # the API will get quota information of the production slot. + # @param filter [String] Return only information specified in the filter (using # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceMetricCollection] which provide lazy access to pages of the + # @return [CsmUsageQuotaCollection] which provide lazy access to pages of the # response. # - def list_metrics_slot_as_lazy(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) - response = list_metrics_slot_async(resource_group_name, name, slot, details, filter, custom_headers).value! + def list_usages_slot_as_lazy(resource_group_name, name, slot, filter = nil, custom_headers = nil) + response = list_usages_slot_async(resource_group_name, name, slot, filter, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_metrics_slot_next_async(next_page_link, custom_headers) + list_usages_slot_next_async(next_page_link, custom_headers) end page end end # - # Gets perfmon counters for web app. + # List webjobs for an app, or a deployment slot. # - # Gets perfmon counters for web app. + # List webjobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Site name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PerfMonCounterCollection] which provide lazy access to pages of the + # @return [WebJobCollection] which provide lazy access to pages of the # response. # - def list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter = nil, custom_headers = nil) - response = list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter, custom_headers).value! + def list_web_jobs_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_web_jobs_slot_async(resource_group_name, name, slot, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_perf_mon_counters_slot_next_async(next_page_link, custom_headers) + list_web_jobs_slot_next_async(next_page_link, custom_headers) end page end @@ -27791,20 +41189,18 @@ def list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter # @param name [String] Name of the app. # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [SlotDifferenceCollection] which provide lazy access to pages of the # response. # - def list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - response = list_slot_differences_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + def list_slot_differences_from_production_as_lazy(resource_group_name, name, slot_swap_entity, custom_headers = nil) + response = list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_slot_differences_slot_next_async(next_page_link, custom_headers) + list_slot_differences_from_production_next_async(next_page_link, custom_headers) end page end @@ -27817,136 +41213,127 @@ def list_slot_differences_slot_as_lazy(resource_group_name, name, slot_swap_enti # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Website Name - # @param slot [String] Website Slot + # @param name [String] Website Name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [SnapshotCollection] which provide lazy access to pages of the # response. # - def list_snapshots_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) - response = list_snapshots_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_snapshots_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_snapshots_async(resource_group_name, name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_snapshots_slot_next_async(next_page_link, custom_headers) + list_snapshots_next_async(next_page_link, custom_headers) end page end end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List triggered web jobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get quota information of the production slot. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CsmUsageQuotaCollection] which provide lazy access to pages of the + # @return [TriggeredWebJobCollection] which provide lazy access to pages of the # response. # - def list_usages_slot_as_lazy(resource_group_name, name, slot, filter = nil, custom_headers = nil) - response = list_usages_slot_async(resource_group_name, name, slot, filter, custom_headers).value! + def list_triggered_web_jobs_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_triggered_web_jobs_async(resource_group_name, name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_usages_slot_next_async(next_page_link, custom_headers) + list_triggered_web_jobs_next_async(next_page_link, custom_headers) end page end end # - # Get the difference in configuration settings between two web app slots. + # List a triggered web job's history for an app, or a deployment slot. # - # Get the difference in configuration settings between two web app slots. + # List a triggered web job's history for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. + # @param name [String] Site name. + # @param web_job_id [String] Web job ID. + # @param web_job_name [String] # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SlotDifferenceCollection] which provide lazy access to pages of the - # response. + # @return [TriggeredJobHistoryCollection] which provide lazy access to pages of + # the response. # - def list_slot_differences_from_production_as_lazy(resource_group_name, name, slot_swap_entity, custom_headers = nil) - response = list_slot_differences_from_production_async(resource_group_name, name, slot_swap_entity, custom_headers).value! + def list_triggered_web_job_history_as_lazy(resource_group_name, name, web_job_id, web_job_name, custom_headers = nil) + response = list_triggered_web_job_history_async(resource_group_name, name, web_job_id, web_job_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_slot_differences_from_production_next_async(next_page_link, custom_headers) + list_triggered_web_job_history_next_async(next_page_link, custom_headers) end page end end # - # Returns all Snapshots to the user. + # Gets the quota usage information of an app (or deployment slot, if + # specified). # - # Returns all Snapshots to the user. + # Gets the quota usage information of an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Website Name + # @param name [String] Name of the app. + # @param filter [String] Return only information specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SnapshotCollection] which provide lazy access to pages of the + # @return [CsmUsageQuotaCollection] which provide lazy access to pages of the # response. # - def list_snapshots_as_lazy(resource_group_name, name, custom_headers = nil) - response = list_snapshots_async(resource_group_name, name, custom_headers).value! + def list_usages_as_lazy(resource_group_name, name, filter = nil, custom_headers = nil) + response = list_usages_async(resource_group_name, name, filter, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_snapshots_next_async(next_page_link, custom_headers) + list_usages_next_async(next_page_link, custom_headers) end page end end # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List webjobs for an app, or a deployment slot. # - # Gets the quota usage information of an app (or deployment slot, if - # specified). + # List webjobs for an app, or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param filter [String] Return only information specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] Site name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CsmUsageQuotaCollection] which provide lazy access to pages of the + # @return [WebJobCollection] which provide lazy access to pages of the # response. # - def list_usages_as_lazy(resource_group_name, name, filter = nil, custom_headers = nil) - response = list_usages_async(resource_group_name, name, filter, custom_headers).value! + def list_web_jobs_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_web_jobs_async(resource_group_name, name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| - list_usages_next_async(next_page_link, custom_headers) + list_web_jobs_next_async(next_page_link, custom_headers) end page end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_site_management_client.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_site_management_client.rb old mode 100755 new mode 100644 index d2fd780d02..8145844276 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_site_management_client.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_site_management_client.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. @@ -649,8 +649,8 @@ def check_name_availability_async(name, type, is_fqdn = nil, custom_headers = ni # Get a list of available geographical regions. # # @param sku [SkuName] Name of SKU used to filter the regions. Possible values - # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - # 'Isolated' + # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', + # 'Dynamic', 'Isolated' # @param linux_workers_enabled [Boolean] Specify true if you want # to filter to only regions that support Linux workers. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -669,8 +669,8 @@ def list_geo_regions(sku = nil, linux_workers_enabled = nil, custom_headers = ni # Get a list of available geographical regions. # # @param sku [SkuName] Name of SKU used to filter the regions. Possible values - # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - # 'Isolated' + # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', + # 'Dynamic', 'Isolated' # @param linux_workers_enabled [Boolean] Specify true if you want # to filter to only regions that support Linux workers. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -688,8 +688,8 @@ def list_geo_regions_with_http_info(sku = nil, linux_workers_enabled = nil, cust # Get a list of available geographical regions. # # @param sku [SkuName] Name of SKU used to filter the regions. Possible values - # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - # 'Isolated' + # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', + # 'Dynamic', 'Isolated' # @param linux_workers_enabled [Boolean] Specify true if you want # to filter to only regions that support Linux workers. # @param [Hash{String => String}] A hash of custom headers that will be added @@ -925,6 +925,111 @@ def list_skus_async(custom_headers = nil) promise.execute end + # + # Verifies if this VNET is compatible with an App Service Environment. + # + # Verifies if this VNET is compatible with an App Service Environment by + # analyzing the Network Security Group rules. + # + # @param parameters [VnetParameters] VNET information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VnetValidationFailureDetails] operation results. + # + def verify_hosting_environment_vnet(parameters, custom_headers = nil) + response = verify_hosting_environment_vnet_async(parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Verifies if this VNET is compatible with an App Service Environment. + # + # Verifies if this VNET is compatible with an App Service Environment by + # analyzing the Network Security Group rules. + # + # @param parameters [VnetParameters] VNET information + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def verify_hosting_environment_vnet_with_http_info(parameters, custom_headers = nil) + verify_hosting_environment_vnet_async(parameters, custom_headers).value! + end + + # + # Verifies if this VNET is compatible with an App Service Environment. + # + # Verifies if this VNET is compatible with an App Service Environment by + # analyzing the Network Security Group rules. + # + # @param parameters [VnetParameters] VNET information + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def verify_hosting_environment_vnet_async(parameters, custom_headers = nil) + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? + api_version = '2016-03-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = accept_language unless accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::VnetParameters.mapper() + request_content = self.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet' + + request_url = @base_url || self.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = self.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::VnetValidationFailureDetails.mapper() + result.body = self.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Move resources between resource groups. # @@ -1607,8 +1712,8 @@ def list_source_controls_as_lazy_async(custom_headers = nil) # Get a list of available geographical regions. # # @param sku [SkuName] Name of SKU used to filter the regions. Possible values - # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - # 'Isolated' + # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', + # 'Dynamic', 'Isolated' # @param linux_workers_enabled [Boolean] Specify true if you want # to filter to only regions that support Linux workers. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -1627,8 +1732,8 @@ def list_geo_regions_as_lazy(sku = nil, linux_workers_enabled = nil, custom_head # Get a list of available geographical regions. # # @param sku [SkuName] Name of SKU used to filter the regions. Possible values - # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - # 'Isolated' + # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', + # 'Dynamic', 'Isolated' # @param linux_workers_enabled [Boolean] Specify true if you want # to filter to only regions that support Linux workers. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -1646,8 +1751,8 @@ def list_geo_regions_as_lazy_with_http_info(sku = nil, linux_workers_enabled = n # Get a list of available geographical regions. # # @param sku [SkuName] Name of SKU used to filter the regions. Possible values - # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - # 'Isolated' + # include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', + # 'Dynamic', 'Isolated' # @param linux_workers_enabled [Boolean] Specify true if you want # to filter to only regions that support Linux workers. # @param [Hash{String => String}] A hash of custom headers that will be added diff --git a/runtime/ms_rest_azure/CHANGELOG.md b/runtime/ms_rest_azure/CHANGELOG.md index ed26ce06d4..0ad4ba2f2b 100644 --- a/runtime/ms_rest_azure/CHANGELOG.md +++ b/runtime/ms_rest_azure/CHANGELOG.md @@ -1,3 +1,9 @@ +##2017.09.11 ms_rest_azure version 0.9.0 +* [Breaking Change] Managed Service Identity authentication to acquire token does not require `tenant_id`.[Issue #930](https://github.com/Azure/azure-sdk-for-ruby/issues/930) [PR #931](https://github.com/Azure/azure-sdk-for-ruby/pull/931) + +##2017.08.28 ms_rest_azure version 0.8.2 +* Enable Managed Service Identity authentication features into ms_rest_azure runtime for azure_mgmt_* sdks.[Issue #884](https://github.com/Azure/azure-sdk-for-ruby/issues/884) [PR #889](https://github.com/Azure/azure-sdk-for-ruby/pull/889) + ##2017.07.10 ms_rest_azure version 0.8.1 * [Bug Fix] Fixed the issue with the polling status object to handle the response code and provisioning status correctly.[Issue #817](https://github.com/Azure/azure-sdk-for-ruby/issues/817) [PR #828](https://github.com/Azure/azure-sdk-for-ruby/pull/828) @@ -24,7 +30,7 @@ * Improved AzureOperationError class to expose error_message and error_code properties [#1450](https://github.com/Azure/autorest/pull/1450) ##2016.09.15 ms_rest_azure version 0.5.0 -* Updating ms_rest dependecy to version 0.5.0 +* Updating ms_rest dependency to version 0.5.0 * Adding known Azure Environments in ruby runtime for easy discovery * Default Azure active directory url is updated from `https://login.windows.net/` to `https://login.microsoftonline.com/` (Breaking Change) * Using bundled default ca-cert from ms_rest diff --git a/runtime/ms_rest_azure/README.md b/runtime/ms_rest_azure/README.md index d1f73ccf27..820de23bfb 100644 --- a/runtime/ms_rest_azure/README.md +++ b/runtime/ms_rest_azure/README.md @@ -37,10 +37,19 @@ To start working on the gem the only additional dev dependecy is required - rspe Reference it in the gemfile and also add this line to your client's gemspec file: ```ruby -spec.add_runtime_dependency 'ms_rest_azure', '~> 0.8.0' +spec.add_runtime_dependency 'ms_rest_azure', '~> 0.9.0' ``` Don't forget to correct the version. +# Utilizing MSI(Managed Service Identity) Token Provider + +MSI support has been enabled in `ms_rest_azure` version `0.9.0`. Below code snippet demonstrates how to use MSITokenProvider with default port `50342`: + +```ruby +provider = MsRestAzure::MSITokenProvider.new() +credentials = MsRest::TokenCredentials.new(provider) +``` + # Utilizing Telemetry Extension in your SDK We encourage the customer of ms_rest_azure library to provide information about their product sent via telemetry extension point as below: diff --git a/runtime/ms_rest_azure/lib/ms_rest_azure.rb b/runtime/ms_rest_azure/lib/ms_rest_azure.rb index 07183432b7..d06734f98e 100644 --- a/runtime/ms_rest_azure/lib/ms_rest_azure.rb +++ b/runtime/ms_rest_azure/lib/ms_rest_azure.rb @@ -11,6 +11,7 @@ require 'ms_rest_azure/azure_service_client.rb' require 'ms_rest_azure/cloud_error_data.rb' require 'ms_rest_azure/credentials/application_token_provider.rb' +require 'ms_rest_azure/credentials/msi_token_provider.rb' require 'ms_rest_azure/polling_state.rb' require 'ms_rest_azure/sub_resource.rb' require 'ms_rest_azure/resource.rb' diff --git a/runtime/ms_rest_azure/lib/ms_rest_azure/credentials/application_token_provider.rb b/runtime/ms_rest_azure/lib/ms_rest_azure/credentials/application_token_provider.rb index df119dc779..036193ead0 100644 --- a/runtime/ms_rest_azure/lib/ms_rest_azure/credentials/application_token_provider.rb +++ b/runtime/ms_rest_azure/lib/ms_rest_azure/credentials/application_token_provider.rb @@ -45,7 +45,7 @@ class ApplicationTokenProvider < MsRest::TokenProvider # @param tenant_id [String] tenant id (also known as domain). # @param client_id [String] client id. # @param client_secret [String] client secret. - # @param settings [ActiveDirectoryServiceSettings] client secret. + # @param settings [ActiveDirectoryServiceSettings] active directory setting. def initialize(tenant_id, client_id, client_secret, settings = ActiveDirectoryServiceSettings.get_azure_settings) fail ArgumentError, 'Tenant id cannot be nil' if tenant_id.nil? fail ArgumentError, 'Client id cannot be nil' if client_id.nil? @@ -81,7 +81,7 @@ def token_expired end # - # Retrieves a new authenticaion token. + # Retrieves a new authentication token. # # @return [String] new authentication token. def acquire_token diff --git a/runtime/ms_rest_azure/lib/ms_rest_azure/credentials/msi_token_provider.rb b/runtime/ms_rest_azure/lib/ms_rest_azure/credentials/msi_token_provider.rb new file mode 100644 index 0000000000..ff4a178c53 --- /dev/null +++ b/runtime/ms_rest_azure/lib/ms_rest_azure/credentials/msi_token_provider.rb @@ -0,0 +1,105 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +module MsRestAzure + # + # Class that provides access to authentication token via Managed Service Identity. + # + class MSITokenProvider < MsRest::TokenProvider + + private + + TOKEN_ACQUIRE_URL = 'http://localhost:{port}/oauth2/token' + REQUEST_BODY_PATTERN = 'resource={resource_uri}' + DEFAULT_SCHEME = 'Bearer' + + # @return [MSIActiveDirectoryServiceSettings] settings. + attr_accessor :settings + + # @return [Integer] port number where MSI service is running. + attr_accessor :port + + # @return [String] auth token. + attr_accessor :token + + # @return [Time] the date when the current token expires. + attr_accessor :token_expires_on + + # @return [Integer] the amount of time we refresh token before it expires. + attr_reader :expiration_threshold + + # @return [String] the type of token. + attr_reader :token_type + + public + + # + # Creates and initialize new instance of the MSITokenProvider class. + # @param port [Integer] port number where MSI service is running. + # @param settings [ActiveDirectoryServiceSettings] active directory setting. + def initialize(port = 50342, settings = ActiveDirectoryServiceSettings.get_azure_settings) + fail ArgumentError, 'Port cannot be nil' if port.nil? + fail ArgumentError, 'Port must be an Integer' unless port.is_a? Integer + fail ArgumentError, 'Azure AD settings cannot be nil' if settings.nil? + + @port = port + @settings = settings + + @expiration_threshold = 5 * 60 + end + + # + # Returns the string value which needs to be attached + # to HTTP request header in order to be authorized. + # + # @return [String] authentication headers. + def get_authentication_header + acquire_token if token_expired + "#{token_type} #{token}" + end + + private + + # + # Checks whether token is about to expire. + # + # @return [Bool] True if token is about to expire, false otherwise. + def token_expired + @token.nil? || Time.now >= @token_expires_on + expiration_threshold + end + + # + # Retrieves a new authentication token. + # + # @return [String] new authentication token. + def acquire_token + token_acquire_url = TOKEN_ACQUIRE_URL.dup + token_acquire_url['{port}'] = @port.to_s + + url = URI.parse(token_acquire_url) + + connection = Faraday.new(:url => url, :ssl => MsRest.ssl_options) do |builder| + builder.adapter Faraday.default_adapter + end + + request_body = REQUEST_BODY_PATTERN.dup + request_body['{resource_uri}'] = ERB::Util.url_encode(@settings.token_audience) + + response = connection.post do |request| + request.headers['content-type'] = 'application/x-www-form-urlencoded' + request.headers['Metadata'] = 'true' + request.body = request_body + end + + fail AzureOperationError, + 'Couldn\'t acquire access token from Managed Service Identity, please verify your tenant id, port and settings' unless response.status == 200 + + response_body = JSON.load(response.body) + @token = response_body['access_token'] + @token_expires_on = Time.at(Integer(response_body['expires_on'])) + @token_type = response_body['token_type'] + end + end + +end diff --git a/runtime/ms_rest_azure/lib/ms_rest_azure/version.rb b/runtime/ms_rest_azure/lib/ms_rest_azure/version.rb index ba59c4f1b1..c137b6be4e 100644 --- a/runtime/ms_rest_azure/lib/ms_rest_azure/version.rb +++ b/runtime/ms_rest_azure/lib/ms_rest_azure/version.rb @@ -3,5 +3,5 @@ # Licensed under the MIT License. See License.txt in the project root for license information. module MsRestAzure - VERSION = '0.8.1' + VERSION = '0.9.0' end diff --git a/runtime/ms_rest_azure/spec/msi_token_provider_spec.rb b/runtime/ms_rest_azure/spec/msi_token_provider_spec.rb new file mode 100644 index 0000000000..ebfcc0dc16 --- /dev/null +++ b/runtime/ms_rest_azure/spec/msi_token_provider_spec.rb @@ -0,0 +1,40 @@ +# encoding: utf-8 +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. + +require 'rspec' +require 'ms_rest_azure' + +module MsRestAzure + + describe MSITokenProvider do + it 'should throw error if nil data is passed into constructor' do + expect { MSITokenProvider.new(nil) }.to raise_error(ArgumentError) + expect { MSITokenProvider.new(50431,nil) }.to raise_error(ArgumentError) + end + + it 'should set defaults for managed service identity' do + azure_cloud = MsRestAzure::AzureEnvironments::AzureCloud + + token_provider = MSITokenProvider.new + expect(token_provider.send(:port)).to eq(50342) + settings = token_provider.send(:settings) + expect(settings.authentication_endpoint).to eq(azure_cloud.active_directory_endpoint_url) + expect(settings.token_audience).to eq(azure_cloud.active_directory_resource_id) + end + + it 'should set customs for managed service identity' do + port = 50333 + settings = ActiveDirectoryServiceSettings.new() + settings.authentication_endpoint = 'https://login.microsoftonline.com/' + settings.token_audience = 'https://vault.azure.net' + + token_provider = MSITokenProvider.new(port, settings) + expect(token_provider.send(:port)).to eq(port) + settings = token_provider.send(:settings) + expect(settings.authentication_endpoint).to eq(settings.authentication_endpoint) + expect(settings.token_audience).to eq(settings.token_audience) + end + end + +end diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 1cafbad4b7..8590f3683a 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -14,7 +14,7 @@ "autorest_options": { "namespace": "Azure::ARM::AnalysisServices", "package-name": "azure_mgmt_analysis_services", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_analysis_services/lib", "wrapper_filesOrDirs": [ @@ -26,31 +26,55 @@ "autorest_options": { "namespace": "Azure::ARM::Authorization", "package-name": "azure_mgmt_authorization", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_authorization/lib", "wrapper_filesOrDirs": [ "azure_mgmt_authorization.rb" ] }, + "azure_mgmt_automation": { + "markdown": "specification/automation/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::Automation", + "package-name": "azure_mgmt_automation", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_automation/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_automation.rb" + ] + }, "azure_mgmt_batch": { "markdown": "specification/batch/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Batch", "package-name": "azure_mgmt_batch", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_batch/lib", "wrapper_filesOrDirs": [ "azure_mgmt_batch.rb" ] }, + "azure_mgmt_billing": { + "markdown": "specification/billing/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::Billing", + "package-name": "azure_mgmt_billing", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_billing/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_billing.rb" + ] + }, "azure_mgmt_cdn": { "markdown": "specification/cdn/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::CDN", "package-name": "azure_mgmt_cdn", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_cdn/lib", "wrapper_filesOrDirs": [ @@ -62,7 +86,7 @@ "autorest_options": { "namespace": "Azure::ARM::CognitiveServices", "package-name": "azure_mgmt_cognitive_services", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_cognitive_services/lib", "wrapper_filesOrDirs": [ @@ -74,7 +98,7 @@ "autorest_options": { "namespace": "Azure::ARM::Commerce", "package-name": "azure_mgmt_commerce", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_commerce/lib", "wrapper_filesOrDirs": [ @@ -86,19 +110,67 @@ "autorest_options": { "namespace": "Azure::ARM::Compute", "package-name": "azure_mgmt_compute", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_compute/lib", "wrapper_filesOrDirs": [ "azure_mgmt_compute.rb" ] }, + "azure_mgmt_consumption": { + "markdown": "specification/consumption/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::Consumption", + "package-name": "azure_mgmt_consumption", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_consumption/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_consumption.rb" + ] + }, + "azure_mgmt_container_instance": { + "markdown": "specification/containerinstance/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::ContainerInstance", + "package-name": "azure_mgmt_container_instance", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_container_instance/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_container_instance.rb" + ] + }, + "azure_mgmt_container_registry": { + "markdown": "specification/containerregistry/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::ContainerRegistry", + "package-name": "azure_mgmt_container_registry", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_container_registry/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_container_registry.rb" + ] + }, + "azure_mgmt_customer_insights": { + "markdown": "specification/customer-insights/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::CustomerInsights", + "package-name": "azure_mgmt_customer_insights", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_customer_insights/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_customer_insights.rb" + ] + }, "azure_mgmt_datalake_analytics": { "markdown": "specification/datalake-analytics/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::DataLakeAnalytics", "package-name": "azure_mgmt_datalake_analytics", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_datalake_analytics/lib", "wrapper_filesOrDirs": [ @@ -110,7 +182,7 @@ "autorest_options": { "namespace": "Azure::ARM::DataLakeStore", "package-name": "azure_mgmt_datalake_store", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_datalake_store/lib", "wrapper_filesOrDirs": [ @@ -122,7 +194,7 @@ "autorest_options": { "namespace": "Azure::ARM::DevTestLabs", "package-name": "azure_mgmt_devtestlabs", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_devtestlabs/lib", "wrapper_filesOrDirs": [ @@ -134,7 +206,7 @@ "autorest_options": { "namespace": "Azure::ARM::Dns", "package-name": "azure_mgmt_dns", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_dns/lib", "wrapper_filesOrDirs": [ @@ -146,19 +218,31 @@ "autorest_options": { "namespace": "Azure::ARM::EventHub", "package-name": "azure_mgmt_event_hub", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_event_hub/lib", "wrapper_filesOrDirs": [ "azure_mgmt_event_hub.rb" ] }, + "azure_mgmt_event_grid": { + "markdown": "specification/eventgrid/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::EventGrid", + "package-name": "azure_mgmt_event_grid", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_event_grid/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_event_grid.rb" + ] + }, "azure_mgmt_features": { "markdown": "specification/resources/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Features", "package-name": "azure_mgmt_features", - "package-version": "0.11.0", + "package-version": "0.14.0", "tag": "package-features-2015-12" }, "output_dir": "management/azure_mgmt_features/lib", @@ -171,7 +255,7 @@ "autorest_options": { "namespace": "Azure::ARM::Graph", "package-name": "azure_mgmt_graph", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_graph/lib", "wrapper_filesOrDirs": [ @@ -183,7 +267,7 @@ "autorest_options": { "namespace": "Azure::ARM::IotHub", "package-name": "azure_mgmt_iot_hub", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_iot_hub/lib", "wrapper_filesOrDirs": [ @@ -195,19 +279,32 @@ "autorest_options": { "namespace": "Azure::ARM::KeyVault", "package-name": "azure_mgmt_key_vault", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_key_vault/lib", "wrapper_filesOrDirs": [ "azure_mgmt_key_vault.rb" ] }, + "azure_mgmt_links": { + "markdown": "specification/resources/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::Links", + "package-name": "azure_mgmt_links", + "package-version": "0.14.0", + "tag": "package-links-2016-09" + }, + "output_dir": "management/azure_mgmt_links/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_links.rb" + ] + }, "azure_mgmt_locks": { "markdown": "specification/resources/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Locks", "package-name": "azure_mgmt_locks", - "package-version": "0.11.0", + "package-version": "0.14.0", "tag": "package-locks-2016-09" }, "output_dir": "management/azure_mgmt_locks/lib", @@ -220,7 +317,7 @@ "autorest_options": { "namespace": "Azure::ARM::Logic", "package-name": "azure_mgmt_logic", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_logic/lib", "wrapper_filesOrDirs": [ @@ -232,19 +329,44 @@ "autorest_options": { "namespace": "Azure::ARM::MachineLearning", "package-name": "azure_mgmt_machine_learning", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_machine_learning/lib", "wrapper_filesOrDirs": [ "azure_mgmt_machine_learning.rb" ] }, + "azure_mgmt_managed_applications": { + "markdown": "specification/resources/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::ManagedApplications", + "package-name": "azure_mgmt_managed_applications", + "package-version": "0.14.0", + "tag": "package-managedapplications-2016-09" + }, + "output_dir": "management/azure_mgmt_managed_applications/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_managed_applications.rb" + ] + }, + "azure_mgmt_marketplace_ordering": { + "markdown": "specification/marketplaceordering/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::MarketplaceOrdering", + "package-name": "azure_mgmt_marketplace_ordering", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_marketplace_ordering/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_marketplace_ordering.rb" + ] + }, "azure_mgmt_media_services": { "markdown": "specification/mediaservices/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::MediaServices", "package-name": "azure_mgmt_media_services", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_media_services/lib", "wrapper_filesOrDirs": [ @@ -256,7 +378,7 @@ "autorest_options": { "namespace": "Azure::ARM::MobileEngagement", "package-name": "azure_mgmt_mobile_engagement", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_mobile_engagement/lib", "wrapper_filesOrDirs": [ @@ -268,7 +390,7 @@ "autorest_options": { "namespace": "Azure::ARM::Monitor", "package-name": "azure_mgmt_monitor", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_monitor/lib", "wrapper_filesOrDirs": [ @@ -280,7 +402,7 @@ "autorest_options": { "namespace": "Azure::ARM::Network", "package-name": "azure_mgmt_network", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_network/lib", "wrapper_filesOrDirs": [ @@ -292,19 +414,31 @@ "autorest_options": { "namespace": "Azure::ARM::NotificationHubs", "package-name": "azure_mgmt_notification_hubs", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_notification_hubs/lib", "wrapper_filesOrDirs": [ "azure_mgmt_notification_hubs.rb" ] }, + "azure_mgmt_operational_insights": { + "markdown": "specification/operationalinsights/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::OperationalInsights", + "package-name": "azure_mgmt_operational_insights", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_operational_insights/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_operational_insights.rb" + ] + }, "azure_mgmt_policy": { "markdown": "specification/resources/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Policy", "package-name": "azure_mgmt_policy", - "package-version": "0.11.0", + "package-version": "0.14.0", "tag": "package-policy-2016-12" }, "output_dir": "management/azure_mgmt_policy/lib", @@ -317,7 +451,7 @@ "autorest_options": { "namespace": "Azure::ARM::PowerBiEmbedded", "package-name": "azure_mgmt_powerbi_embedded", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_powerbi_embedded/lib", "wrapper_filesOrDirs": [ @@ -329,7 +463,7 @@ "autorest_options": { "namespace": "Azure::ARM::RecoveryServices", "package-name": "azure_mgmt_recovery_services", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_recovery_services/lib", "wrapper_filesOrDirs": [ @@ -341,31 +475,55 @@ "autorest_options": { "namespace": "Azure::ARM::RecoveryServicesBackup", "package-name": "azure_mgmt_recovery_services_backup", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_recovery_services_backup/lib", "wrapper_filesOrDirs": [ "azure_mgmt_recovery_services_backup.rb" ] }, + "azure_mgmt_recovery_services_site_recovery": { + "markdown": "specification/recoveryservicessiterecovery/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::RecoveryServicesSiteRecovery", + "package-name": "azure_mgmt_recovery_services_site_recovery", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_recovery_services_site_recovery/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_recovery_services_site_recovery.rb" + ] + }, "azure_mgmt_redis": { "markdown": "specification/redis/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Redis", "package-name": "azure_mgmt_redis", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_redis/lib", "wrapper_filesOrDirs": [ "azure_mgmt_redis.rb" ] }, + "azure_mgmt_relay": { + "markdown": "specification/relay/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::Relay", + "package-name": "azure_mgmt_relay", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_relay/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_relay.rb" + ] + }, "azure_mgmt_resources": { "markdown": "specification/resources/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Resources", "package-name": "azure_mgmt_resources", - "package-version": "0.11.0", + "package-version": "0.14.0", "tag": "package-resources-2017-05" }, "output_dir": "management/azure_mgmt_resources/lib", @@ -373,12 +531,25 @@ "azure_mgmt_resources.rb" ] }, + "azure_mgmt_resources_management": { + "markdown": "specification/resources/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::ResourcesManagement", + "package-name": "azure_mgmt_resources_management", + "package-version": "0.14.0", + "tag": "package-management-2017-08" + }, + "output_dir": "management/azure_mgmt_resources_management/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_resources_management.rb" + ] + }, "azure_mgmt_scheduler": { "markdown": "specification/scheduler/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Scheduler", "package-name": "azure_mgmt_scheduler", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_scheduler/lib", "wrapper_filesOrDirs": [ @@ -390,7 +561,7 @@ "autorest_options": { "namespace": "Azure::ARM::Search", "package-name": "azure_mgmt_search", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_search/lib", "wrapper_filesOrDirs": [ @@ -402,7 +573,7 @@ "autorest_options": { "namespace": "Azure::ARM::ServerManagement", "package-name": "azure_mgmt_server_management", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_server_management/lib", "wrapper_filesOrDirs": [ @@ -414,31 +585,55 @@ "autorest_options": { "namespace": "Azure::ARM::ServiceBus", "package-name": "azure_mgmt_service_bus", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_service_bus/lib", "wrapper_filesOrDirs": [ "azure_mgmt_service_bus.rb" ] }, + "azure_mgmt_service_fabric": { + "markdown": "specification/servicefabric/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::ServiceFabric", + "package-name": "azure_mgmt_service_fabric", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_service_fabric/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_service_fabric.rb" + ] + }, "azure_mgmt_sql": { "markdown": "specification/sql/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::SQL", "package-name": "azure_mgmt_sql", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_sql/lib", "wrapper_filesOrDirs": [ "azure_mgmt_sql.rb" ] }, + "azure_mgmt_stor_simple8000_series": { + "markdown": "specification/storsimple8000series/resource-manager/readme.md", + "autorest_options": { + "namespace": "Azure::ARM::StorSimple8000Series", + "package-name": "azure_mgmt_stor_simple8000_series", + "package-version": "0.14.0" + }, + "output_dir": "management/azure_mgmt_stor_simple8000_series/lib", + "wrapper_filesOrDirs": [ + "azure_mgmt_stor_simple8000_series.rb" + ] + }, "azure_mgmt_storage": { "markdown": "specification/storage/resource-manager/readme.md", "autorest_options": { "namespace": "Azure::ARM::Storage", "package-name": "azure_mgmt_storage", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_storage/lib", "wrapper_filesOrDirs": [ @@ -448,9 +643,9 @@ "azure_mgmt_stream_analytics": { "markdown": "specification/streamanalytics/resource-manager/readme.md", "autorest_options": { - "Namespace": "Azure::ARM::StreamAnalytics", - "PackageName": "azure_mgmt_stream_analytics", - "PackageVersion": "0.10.0" + "namespace": "Azure::ARM::StreamAnalytics", + "package-name": "azure_mgmt_stream_analytics", + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_stream_analytics/lib", "wrapper_filesOrDirs": [ @@ -462,7 +657,7 @@ "autorest_options": { "namespace": "Azure::ARM::Subscriptions", "package-name": "azure_mgmt_subscriptions", - "package-version": "0.11.0", + "package-version": "0.14.0", "tag": "package-subscriptions-2016-06" }, "output_dir": "management/azure_mgmt_subscriptions/lib", @@ -475,7 +670,7 @@ "autorest_options": { "namespace": "Azure::ARM::TrafficManager", "package-name": "azure_mgmt_traffic_manager", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_traffic_manager/lib", "wrapper_filesOrDirs": [ @@ -487,7 +682,7 @@ "autorest_options": { "namespace": "Azure::ARM::Web", "package-name": "azure_mgmt_web", - "package-version": "0.11.0" + "package-version": "0.14.0" }, "output_dir": "management/azure_mgmt_web/lib", "wrapper_filesOrDirs": [